Fix internationalization
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 10 Apr 2012 18:21:56 +0000 (20:21 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 10 Apr 2012 18:28:10 +0000 (20:28 +0200)
The internationalization was broken by moving the XtSetLanguageProc
to behind 'bindtextdomain'.

xboard.c

index 7f1d394..0726ade 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -1193,6 +1193,11 @@ main (int argc, char **argv)
       programName++;
 
 #ifdef ENABLE_NLS
       programName++;
 
 #ifdef ENABLE_NLS
+    XtSetLanguageProc(NULL, NULL, NULL);
+    if (appData.debugMode) {
+      fprintf(debugFP, "locale = %s\n", setlocale(LC_ALL, NULL));
+    }
+
     bindtextdomain(PACKAGE, LOCALEDIR);
     textdomain(PACKAGE);
 #endif
     bindtextdomain(PACKAGE, LOCALEDIR);
     textdomain(PACKAGE);
 #endif
@@ -1256,12 +1261,6 @@ main (int argc, char **argv)
       XtAppInitialize(&appContext, "XBoard", shellOptions,
                      XtNumber(shellOptions),
                      &argc, argv, xboardResources, NULL, 0);
       XtAppInitialize(&appContext, "XBoard", shellOptions,
                      XtNumber(shellOptions),
                      &argc, argv, xboardResources, NULL, 0);
-#ifdef ENABLE_NLS
-    XtSetLanguageProc(NULL, NULL, NULL);
-    if (appData.debugMode) {
-      fprintf(debugFP, "locale = %s\n", setlocale(LC_ALL, NULL));
-    }
-#endif
 
     XtGetApplicationResources(shellWidget, (XtPointer) &appData,
                              clientResources, XtNumber(clientResources),
 
     XtGetApplicationResources(shellWidget, (XtPointer) &appData,
                              clientResources, XtNumber(clientResources),