Hopefully fix up gettext in both libdvdomatic and the wx code.
authorCarl Hetherington <cth@carlh.net>
Fri, 1 Mar 2013 17:10:48 +0000 (17:10 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 1 Mar 2013 17:10:48 +0000 (17:10 +0000)
run/dvdomatic
src/lib/util.cc
src/tools/dvdomatic.cc
wscript

index 31fd09fb9fb0e14adbf30f53386d15594b9746db..147c001cdf3c8fc8e4be4fe0ff8f8f2b0d65e35f 100755 (executable)
@@ -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
index 892a7fd8647520a575c24203508391a5666656f3..3d70a3122166bce4f66b1f50f58fea05bb822954 100644 (file)
@@ -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 ();
        
index 52e551d2ae99d9158f41fd6a51d334b1d3438f9b..024f5a53ede0ddb582a7bc11691728325ac335ec 100644 (file)
@@ -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 f3df9cfed2e82fafd4dab36d76aa939d719799ef..019858100f2d773d0b97217246a5f67a19ee0aae 100644 (file)
--- 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'])