Author: cazfi Date: Fri Aug 21 06:30:46 2015 New Revision: 29619 URL: http://svn.gna.org/viewcvs/freeciv?rev=29619&view=rev Log: Introduced get_locale_dir(), used instead of direct LOCALEDIR usage.
See patch #6249 Modified: trunk/client/client_main.c trunk/server/srv_main.c trunk/tools/ruledit/ruledit.cpp trunk/utility/fcintl.c trunk/utility/fcintl.h trunk/utility/shared.c Modified: trunk/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/client_main.c?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/client/client_main.c (original) +++ trunk/client/client_main.c Fri Aug 21 06:30:46 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: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Fri Aug 21 06:30:46 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: trunk/tools/ruledit/ruledit.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/ruledit.cpp?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/tools/ruledit/ruledit.cpp (original) +++ trunk/tools/ruledit/ruledit.cpp Fri Aug 21 06:30:46 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: trunk/utility/fcintl.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.c?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/utility/fcintl.c (original) +++ trunk/utility/fcintl.c Fri Aug 21 06:30:46 2015 @@ -97,3 +97,11 @@ { return autocap; } + +/********************************************************************** + Return directory containing locales. +***********************************************************************/ +const char *get_locale_dir(void) +{ + return LOCALEDIR; +} Modified: trunk/utility/fcintl.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.h?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/utility/fcintl.h (original) +++ trunk/utility/fcintl.h Fri Aug 21 06:30:46 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: trunk/utility/shared.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/shared.c?rev=29619&r1=29618&r2=29619&view=diff ============================================================================== --- trunk/utility/shared.c (original) +++ trunk/utility/shared.c Fri Aug 21 06:30:46 2015 @@ -1496,7 +1496,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