Fix dummy locales not working on Debian for Japanese and Korean.
This commit is contained in:
parent
9832c32998
commit
3b7038bcfd
2 changed files with 9 additions and 2 deletions
|
@ -57,8 +57,9 @@ if DUMMYLOCALES
|
|||
if test -d "$(DESTDIR)$(pkgdatadir)/locales/C" ; then rm -r "$(DESTDIR)$(pkgdatadir)/locales/C" ; fi
|
||||
echo | localedef --force "$(DESTDIR)$(pkgdatadir)/locales/C" 2> /dev/null; \
|
||||
for loc in `sed -n 's/^.*language_def..\(.._..\).*$$/\1/p' "$(srcdir)/src/language.cpp"`; do \
|
||||
if test -L "$(DESTDIR)$(pkgdatadir)/locales/$$loc" ; then rm "$(DESTDIR)$(pkgdatadir)/locales/$$loc" ; fi; \
|
||||
ln -s C "$(DESTDIR)$(pkgdatadir)/locales/$$loc"; done; \
|
||||
loclnk="$(DESTDIR)$(pkgdatadir)/locales/$$loc"@wesnoth; \
|
||||
if test -L "$$loclnk" ; then rm "$$loclnk" ; fi; \
|
||||
ln -s C "$$loclnk"; done; \
|
||||
true
|
||||
endif
|
||||
if TINYGUI
|
||||
|
|
|
@ -156,6 +156,12 @@ static void wesnoth_setlocale(int category, std::string const &slocale)
|
|||
else
|
||||
setenv("LOCPATH", locpath.c_str(), 1);
|
||||
else setenv("LOCPATH", (game_config::path + "/locales").c_str(), 1);
|
||||
std::string xlocale;
|
||||
if (!slocale.empty()) {
|
||||
// dummy suffix to prevent locale aliasing from kicking in
|
||||
xlocale = slocale + "@wesnoth";
|
||||
locale = xlocale.c_str();
|
||||
}
|
||||
#endif
|
||||
char* res = setlocale (category, locale);
|
||||
if (res == NULL)
|
||||
|
|
Loading…
Add table
Reference in a new issue