Internationalization for WinBoard
[xboard.git] / winboard / wsettings.c
index 856d76b..ac2c3b1 100644 (file)
@@ -20,6 +20,8 @@
 #include "winboard.h"\r
 #include "backendz.h"\r
 \r
+#define _(s) T_(s)\r
+\r
 int layoutList[2*MAX_OPTIONS];\r
 int checkList[2*MAX_OPTIONS];\r
 int comboList[2*MAX_OPTIONS];\r
@@ -277,9 +279,9 @@ SetOptionValues(HWND hDlg, ChessProgramState *cps)
                break;\r
        }\r
     }\r
-    SetDlgItemText( hDlg, IDOK, "OK" );\r
-    SetDlgItemText( hDlg, IDCANCEL, "Cancel" );\r
-    sprintf(title, "%s Engine Settings (%s)", cps->which, cps->tidy); \r
+    SetDlgItemText( hDlg, IDOK, _("OK") );\r
+    SetDlgItemText( hDlg, IDCANCEL, _("Cancel") );\r
+    sprintf(title, _("%s Engine Settings (%s)"), T_(cps->which), cps->tidy); \r
     title[0] &= ~32; // capitalize\r
     SetWindowText( hDlg, title);\r
     for(i=0; i<groups; i+=2) { \r
@@ -405,7 +407,7 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
                          ofn.lpstrFilter = filter;\r
                          ofn.lpstrFile = buf;\r
                          ofn.nMaxFile = sizeof(buf);\r
-                         ofn.lpstrTitle = "Choose Book";\r
+                         ofn.lpstrTitle = _("Choose Book");\r
                          ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_HIDEREADONLY;\r
 \r
                          if( GetOpenFileName( &ofn ) ) {\r