Internationalization for WinBoard
[xboard.git] / winboard / wedittags.c
index 781d2cf..e0ea7ae 100644 (file)
@@ -39,6 +39,8 @@
 #include "backend.h"\r
 #include "winboard.h"\r
 \r
+#define _(s) T_(s)\r
+\r
 /* Module globals */\r
 static char *editTagsText;\r
 BOOL editTagsUp = FALSE;\r
@@ -63,7 +65,8 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
   switch (message) {\r
   case WM_INITDIALOG: /* message: initialize dialog box */\r
     /* Initialize the dialog items */\r
-    hwndText = GetDlgItem(hDlg, OPT_TagsText);\r
+    Translate(hDlg, DLG_EditTags);\r
+   hwndText = GetDlgItem(hDlg, OPT_TagsText);\r
     SendMessage(hwndText, WM_SETFONT, \r
       (WPARAM)font[boardSize][EDITTAGS_FONT]->hf, MAKELPARAM(FALSE, 0));\r
     SetDlgItemText(hDlg, OPT_TagsText, editTagsText);\r
@@ -71,10 +74,10 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     EnableWindow(GetDlgItem(hDlg, OPT_EditTags), !canEditTags);\r
     SendMessage(hwndText, EM_SETREADONLY, !canEditTags, 0);\r
     if (canEditTags) {\r
-      SetWindowText(hDlg, "Edit Tags");\r
+      SetWindowText(hDlg, _("Edit Tags"));\r
       SetFocus(hwndText);\r
     } else {\r
-      SetWindowText(hDlg, "Tags");\r
+      SetWindowText(hDlg, _("Tags"));\r
       SetFocus(GetDlgItem(hDlg, IDOK));\r
     }\r
     if (!editTagsDialog) {\r
@@ -126,7 +129,7 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
        }\r
        *p = NULLCHAR;\r
        err = ReplaceTags(str, &gameInfo);\r
-       if (err) DisplayError("Error replacing tags.", err);\r
+       if (err) DisplayError(_("Error replacing tags."), err);\r
 \r
        free(str);\r
       }\r