Author: cazfi
Date: Fri Aug 21 06:30:56 2015
New Revision: 29620

URL: http://svn.gna.org/viewcvs/freeciv?rev=29620&view=rev
Log:
Introduced get_locale_dir(), used instead of direct LOCALEDIR usage.

See patch #6249

Modified:
    branches/S2_6/client/client_main.c
    branches/S2_6/server/srv_main.c
    branches/S2_6/tools/ruledit/ruledit.cpp
    branches/S2_6/utility/fcintl.c
    branches/S2_6/utility/fcintl.h
    branches/S2_6/utility/shared.c

Modified: branches/S2_6/client/client_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/client_main.c?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/client/client_main.c  (original)
+++ branches/S2_6/client/client_main.c  Fri Aug 21 06:30:56 2015
@@ -345,7 +345,7 @@
 
   init_nls();
 #ifdef ENABLE_NLS
-  (void) bindtextdomain("freeciv-nations", LOCALEDIR);
+  (void) bindtextdomain("freeciv-nations", get_locale_dir());
 #endif
 
   registry_module_init();

Modified: branches/S2_6/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/server/srv_main.c     (original)
+++ branches/S2_6/server/srv_main.c     Fri Aug 21 06:30:56 2015
@@ -209,7 +209,7 @@
   /* NLS init */
   init_nls();
 #ifdef ENABLE_NLS
-  (void) bindtextdomain("freeciv-nations", LOCALEDIR);
+  (void) bindtextdomain("freeciv-nations", get_locale_dir());
 #endif
 
   /* This is before ai module initializations so that if ai module

Modified: branches/S2_6/tools/ruledit/ruledit.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit.cpp?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/ruledit.cpp     (original)
+++ branches/S2_6/tools/ruledit/ruledit.cpp     Fri Aug 21 06:30:56 2015
@@ -62,7 +62,7 @@
   init_nls();
 
 #ifdef ENABLE_NLS
-  (void) bindtextdomain("freeciv-ruledit", LOCALEDIR);
+  (void) bindtextdomain("freeciv-ruledit", get_locale_dir());
 #endif
 
   init_character_encodings(FC_DEFAULT_DATA_ENCODING, FALSE);

Modified: branches/S2_6/utility/fcintl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/fcintl.c?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/utility/fcintl.c      (original)
+++ branches/S2_6/utility/fcintl.c      Fri Aug 21 06:30:56 2015
@@ -97,3 +97,11 @@
 {
   return autocap;
 }
+
+/**********************************************************************
+  Return directory containing locales.
+***********************************************************************/
+const char *get_locale_dir(void)
+{
+  return LOCALEDIR;
+}

Modified: branches/S2_6/utility/fcintl.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/fcintl.h?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/utility/fcintl.h      (original)
+++ branches/S2_6/utility/fcintl.h      Fri Aug 21 06:30:56 2015
@@ -78,6 +78,8 @@
 void capitalization_opt_in(void);
 bool is_capitalization_enabled(void);
 
+const char *get_locale_dir(void);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: branches/S2_6/utility/shared.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/shared.c?rev=29620&r1=29619&r2=29620&view=diff
==============================================================================
--- branches/S2_6/utility/shared.c      (original)
+++ branches/S2_6/utility/shared.c      Fri Aug 21 06:30:56 2015
@@ -1506,7 +1506,7 @@
 #endif /* WIN32_NATIVE */
 
   (void) setlocale(LC_ALL, "");
-  (void) bindtextdomain(PACKAGE, LOCALEDIR);
+  (void) bindtextdomain(PACKAGE, get_locale_dir());
   (void) textdomain(PACKAGE);
 
   /* Don't touch the defaults when LC_NUMERIC == "C".


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to