From: Carl Hetherington Date: Fri, 1 Mar 2013 17:10:48 +0000 (+0000) Subject: Hopefully fix up gettext in both libdvdomatic and the wx code. X-Git-Tag: v2.0.48~1337^2~595^2~8^2 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=cbc6c5863ec336f0843a87a71e9d7a25a5e59286;hp=-c;p=dcpomatic.git Hopefully fix up gettext in both libdvdomatic and the wx code. --- cbc6c5863ec336f0843a87a71e9d7a25a5e59286 diff --git a/run/dvdomatic b/run/dvdomatic index 31fd09fb9..147c001cd 100755 --- a/run/dvdomatic +++ b/run/dvdomatic @@ -9,7 +9,7 @@ elif [ "$1" == "--valgrind" ]; then valgrind --tool="memcheck" build/src/tools/dvdomatic $* elif [ "$1" == "--i18n" ]; then shift - LANG=fr_FR.UTF8 build/src/tools/dvdomatic "$*" + LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 build/src/tools/dvdomatic "$*" else build/src/tools/dvdomatic "$*" fi diff --git a/src/lib/util.cc b/src/lib/util.cc index 892a7fd86..3d70a3122 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -235,7 +235,8 @@ seconds (struct timeval t) void dvdomatic_setup () { - bindtextdomain ("libdvdomatic", LOCALE_DIR); + bindtextdomain ("libdvdomatic", LOCALE_PREFIX); + setlocale (LC_ALL, ""); avfilter_register_all (); diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 52e551d2a..024f5a53e 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -443,7 +443,7 @@ setup_i18n () locale = new wxLocale (language, wxLOCALE_LOAD_DEFAULT); #ifdef __WXGTK__ - locale->AddCatalogLookupPathPrefix (wxT (LOCALE_DIR)); + locale->AddCatalogLookupPathPrefix (wxT (LOCALE_PREFIX "/locale")); #endif locale->AddCatalog ("libdvdomatic-wx"); diff --git a/wscript b/wscript index f3df9cfed..019858100 100644 --- a/wscript +++ b/wscript @@ -23,7 +23,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-msse', '-mfpmath=sse', '-ffast-math', '-fno-strict-aliasing', '-Wall', '-Wno-attributes', '-Wextra', - '-DLOCALE_DIR="%s/share/locale"' % conf.env['PREFIX']]) + '-DLOCALE_PREFIX="%s/share/locale"' % conf.env['PREFIX']]) if conf.options.target_windows: conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN', '-DBOOST_USE_WINDOWS_H', '-DUNICODE'])