diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-27 12:19:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-27 12:19:57 +0000 |
| commit | 419bcdc816802e50fdebb89bc9dd4a73ede103f5 (patch) | |
| tree | 21f4feca34e28dbd4f1f94234ee69e3134abe0e1 /src/lib | |
| parent | 2f10afc2a4cc2156245a5db593ba7476c6caa4f5 (diff) | |
More fighting with i18n woes.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/po/fr_FR.po | 10 | ||||
| -rw-r--r-- | src/lib/util.cc | 25 |
2 files changed, 20 insertions, 15 deletions
diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index a4fb54755..640d6dc71 100644 --- a/src/lib/po/fr_FR.po +++ b/src/lib/po/fr_FR.po @@ -494,7 +494,6 @@ msgid "copying %1" msgstr "copie de %1" #: src/lib/exceptions.cc:36 -#, fuzzy msgid "could not create file %1" msgstr "Écriture vers fichier distant (%1) impossible" @@ -519,18 +518,16 @@ msgid "could not open external audio file for reading" msgstr "lecture du fichier audio externe impossible" #: src/lib/exceptions.cc:29 -#, fuzzy msgid "could not open file %1" -msgstr "lecture du fichier impossible" +msgstr "lecture du fichier (%1) impossible" #: src/lib/dcp_video_frame.cc:388 msgid "could not open file for reading" msgstr "lecture du fichier impossible" #: src/lib/exceptions.cc:44 -#, fuzzy msgid "could not read from file %1 (%2)" -msgstr "Création du dossier distant %1 (%2) impossible" +msgstr "Création du dossier distant %1 impossible (%2)" #: src/lib/encoder.cc:137 src/lib/encoder.cc:314 msgid "could not run sample-rate converter" @@ -545,9 +542,8 @@ msgid "could not start SSH session" msgstr "démarrage de session SSH impossible" #: src/lib/exceptions.cc:50 -#, fuzzy msgid "could not write to file %1 (%2)" -msgstr "Écriture vers fichier distant (%1) impossible" +msgstr "Écriture vers fichier distant (%1) impossible (%2)" #: src/lib/sndfile_decoder.cc:94 msgid "external audio files have differing lengths" diff --git a/src/lib/util.cc b/src/lib/util.cc index 9a7794ce8..48cb17c26 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -263,22 +263,31 @@ mo_path () void dvdomatic_setup_i18n (string lang) { +#ifdef DVDOMATIC_POSIX + lang += ".UTF8"; +#endif + + if (!lang.empty ()) { + /* Override our environment language; this is essential on + Windows. + */ + char cmd[64]; + snprintf (cmd, sizeof(cmd), "LANGUAGE=%s", lang.c_str ()); + putenv (cmd); + snprintf (cmd, sizeof(cmd), "LANG=%s", lang.c_str ()); + putenv (cmd); + } + setlocale (LC_ALL, ""); textdomain ("libdvdomatic"); - -#ifdef DVDOMATIC_WINDOWS - string const e = "LANGUAGE=" + lang; - putenv (e.c_str()); +#ifdef DVDOMATIC_WINDOWS bindtextdomain ("libdvdomatic", mo_path().string().c_str()); -#else - /* Hack to silence warning */ - lang.clear (); #endif #ifdef DVDOMATIC_POSIX bindtextdomain ("libdvdomatic", POSIX_LOCALE_PREFIX); -#endif +#endif } /** @param start Start position for the crop within the image. |
