diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-21 11:37:50 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-21 11:37:50 +0000 |
| commit | 9d283e1f5ed5b06dea2ff818daf4eff2a7e8cae5 (patch) | |
| tree | e070c20bcb4e0da918be69799aae1bbe66d6d454 | |
| parent | fec9770dd454fdb6902180322fd3d221f2c86ed2 (diff) | |
Another attempt to fix i18n.
| -rw-r--r-- | src/lib/util.cc | 8 | ||||
| -rw-r--r-- | windows/installer.nsi.32.in | 5 | ||||
| -rw-r--r-- | windows/installer.nsi.64.in | 6 | ||||
| -rw-r--r-- | wscript | 5 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index abbc35749..765835bc4 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -251,8 +251,14 @@ dvdomatic_setup () void dvdomatic_setup_i18n (string lang) { +#ifdef DVDOMATIC_WINDOWS + string const e = "LANGUAGE=" + lang; + putenv (e.c_str()); +#endif + + setlocale (LC_ALL, ""); + textdomain ("libdvdomatic"); bindtextdomain ("libdvdomatic", LOCALE_PREFIX); - setlocale (LC_ALL, lang.c_str ()); } /** @param start Start position for the crop within the image. diff --git a/windows/installer.nsi.32.in b/windows/installer.nsi.32.in index 4911585de..b79703ff1 100644 --- a/windows/installer.nsi.32.in +++ b/windows/installer.nsi.32.in @@ -93,10 +93,11 @@ File "%deps%/etc/ImageMagick/delegates.xml" SetOutPath "$PROFILE\.magick" File "%deps%/etc/ImageMagick/delegates.xml" -SetOutPath "$INSTDIR\bin\fr_FR" +SetOutPath "$INSTDIR\locale\fr_FR" File "%binaries%/src/lib/mo/fr_FR/libdvdomatic.mo" +File "%binaries%/src/wx/mo/fr_FR/libdvdomatic-wx.mo" File "%binaries%/src/tools/mo/fr_FR/dvdomatic.mo" -SetOutPath "$INSTDIR\bin\it_IT" +SetOutPath "$INSTDIR\locale\it_IT" File "%binaries%/src/lib/mo/it_IT/libdvdomatic.mo" File "%binaries%/src/wx/mo/it_IT/libdvdomatic-wx.mo" File "%binaries%/src/tools/mo/it_IT/dvdomatic.mo" diff --git a/windows/installer.nsi.64.in b/windows/installer.nsi.64.in index 295f926b6..21980e61a 100644 --- a/windows/installer.nsi.64.in +++ b/windows/installer.nsi.64.in @@ -103,11 +103,11 @@ File "%deps%/etc/ImageMagick/delegates.xml" SetOutPath "$PROFILE\.magick" File "%deps%/etc/ImageMagick/delegates.xml" -SetOutPath "$INSTDIR\bin\fr_FR" +SetOutPath "$INSTDIR\locale\fr_FR" File "%binaries%/src/lib/mo/fr_FR/libdvdomatic.mo" +File "%binaries%/src/wx/mo/fr_FR/libdvdomatic-wx.mo" File "%binaries%/src/tools/mo/fr_FR/dvdomatic.mo" - -SetOutPath "$INSTDIR\bin\it_IT" +SetOutPath "$INSTDIR\locale\it_IT" File "%binaries%/src/lib/mo/it_IT/libdvdomatic.mo" File "%binaries%/src/wx/mo/it_IT/libdvdomatic-wx.mo" File "%binaries%/src/tools/mo/it_IT/dvdomatic.mo" @@ -22,11 +22,11 @@ def configure(conf): conf.load('winres') conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-msse', '-mfpmath=sse', '-ffast-math', '-fno-strict-aliasing', - '-Wall', '-Wno-attributes', '-Wextra', - '-DLOCALE_PREFIX="%s/share/locale"' % conf.env['PREFIX']]) + '-Wall', '-Wno-attributes', '-Wextra']) if conf.options.target_windows: conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN', '-DBOOST_USE_WINDOWS_H', '-DUNICODE']) + conv.env.append_value('CXXFLAGS', '-DLOCALE_PREFIX="../locale"') wxrc = os.popen('wx-config --rescomp').read().split()[1:] conf.env.append_value('WINRCFLAGS', wxrc) if conf.options.enable_debug: @@ -37,6 +37,7 @@ def configure(conf): boost_thread = 'boost_thread_win32-mt' else: conf.env.append_value('CXXFLAGS', '-DDVDOMATIC_POSIX') + conf.env.append_value('CXXFLAGS', '-DLOCALE_PREFIX="%s/share/locale"' % conf.env['PREFIX']) boost_lib_suffix = '' boost_thread = 'boost_thread' conf.env.append_value('LINKFLAGS', '-pthread') |
