More fighting with i18n woes.
authorCarl Hetherington <cth@carlh.net>
Wed, 27 Mar 2013 12:19:57 +0000 (12:19 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 Mar 2013 12:19:57 +0000 (12:19 +0000)
src/lib/po/fr_FR.po
src/lib/util.cc
src/tools/dvdomatic.cc
src/tools/po/es_ES.po
src/tools/po/fr_FR.po
src/tools/po/it_IT.po
src/wx/po/es_ES.po
src/wx/po/fr_FR.po
src/wx/po/it_IT.po

index a4fb54755da2693f9f2f34e9900b64880e80aed6..640d6dc71d69b35df34369790e0c904e6dfefc37 100644 (file)
@@ -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"
index 9a7794ce8566000ec35dc629ea8df707016eed35..48cb17c2672223e915a8b9cbdf2206a8d7e6a4a7 100644 (file)
@@ -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.
index f6dc587c96768268e00ca0bf50e42d446df7d595..71b8ff6c403cb59315b200150778d07ca1151e74 100644 (file)
@@ -284,7 +284,7 @@ private:
        void file_changed (string f)
        {
                stringstream s;
-               s << _("DVD-o-matic");
+               s << wx_to_std (_("DVD-o-matic"));
                if (!f.empty ()) {
                        s << " - " << f;
                }
@@ -328,7 +328,7 @@ private:
                        } catch (std::exception& e) {
                                wxString p = c->GetPath ();
                                wxCharBuffer b = p.ToUTF8 ();
-                               error_dialog (this, std_to_wx (String::compose (wx_to_std (_("Could not open film at %1 (%2)")), wx_to_std (p), e.what())));
+                               error_dialog (this, wxString::Format (_("Could not open film at %s (%s)"), p.data(), std_to_wx (e.what()).data()));
                        }
                }
 
index 5b3330b702d8b6f9b386c560d2f516616fa8fb7a..23b2c9cdc1451b94854d3c5581626c2184e6fd87 100644 (file)
@@ -76,13 +76,13 @@ msgid "About"
 msgstr "Acerca de"
 
 #: src/tools/dvdomatic.cc:516
-msgid "Could not load film %1 (%2)"
-msgstr "No se pudo cargar la película %1 (%2)"
+msgid "Could not load film %s (%s)"
+msgstr "No se pudo cargar la película %s (%s)"
 
 #: src/tools/dvdomatic.cc:331
 #, c-format
-msgid "Could not open film at %1 (%2)"
-msgstr "No se pudo cargar la película en %1 (%2)"
+msgid "Could not open film at %s (%s)"
+msgstr "No se pudo cargar la película en %s (%s)"
 
 #: src/tools/dvdomatic.cc:287 src/tools/dvdomatic.cc:402
 #: src/tools/dvdomatic.cc:520
@@ -113,5 +113,5 @@ msgstr "Selecciona la película a abrir"
 
 #: src/tools/dvdomatic.cc:303
 #, c-format
-msgid "The directory %1 already exists."
-msgstr "La carpeta %1 ya existe."
+msgid "The directory %s already exists."
+msgstr "La carpeta %s ya existe."
index 857e5b512501657cc3f256b0671c4397389b20a2..b0c46117d3e350344a4f701c9f7e90c45e849b47 100644 (file)
@@ -75,13 +75,13 @@ msgid "About"
 msgstr "A Propos"
 
 #: src/tools/dvdomatic.cc:516
-msgid "Could not load film %1 (%2)"
-msgstr "Impossible de charger le film %1 (%2)"
+msgid "Could not load film %s (%s)"
+msgstr "Impossible de charger le film %s (%s)"
 
 #: src/tools/dvdomatic.cc:331
 #, c-format
-msgid "Could not open film at %1 (%2)"
-msgstr "Impossible d'ouvrir le film à %1 (%2)"
+msgid "Could not open film at %s (%s)"
+msgstr "Impossible d'ouvrir le film à %s (%s)"
 
 #: src/tools/dvdomatic.cc:287 src/tools/dvdomatic.cc:402
 #: src/tools/dvdomatic.cc:520
@@ -110,5 +110,5 @@ msgstr "Sélectionner le film à ouvrir"
 
 #: src/tools/dvdomatic.cc:303
 #, c-format
-msgid "The directory %1 already exists."
-msgstr "Le dossier %1 existe déjà."
+msgid "The directory %s already exists."
+msgstr "Le dossier %s existe déjà."
index 2ce0cb11e2a93d54ca5546aedc305ec992a0989f..9066530936195db648d2a9e578a3d7afe14bd4b4 100644 (file)
@@ -76,13 +76,13 @@ msgid "About"
 msgstr "Informazioni"
 
 #: src/tools/dvdomatic.cc:516
-msgid "Could not load film %1 (%2)"
-msgstr "Non posso caricare il film %1 (%2)"
+msgid "Could not load film %s (%s)"
+msgstr "Non posso caricare il film %s (%s)"
 
 #: src/tools/dvdomatic.cc:331
 #, c-format
-msgid "Could not open film at %1 (%2)"
-msgstr "Non posso aprire il film in %1 (%2)"
+msgid "Could not open film at %s (%s)"
+msgstr "Non posso aprire il film in %s (%s)"
 
 #: src/tools/dvdomatic.cc:287 src/tools/dvdomatic.cc:402
 #: src/tools/dvdomatic.cc:520
@@ -111,5 +111,5 @@ msgstr "Seleziona il film da aprire"
 
 #: src/tools/dvdomatic.cc:303
 #, c-format
-msgid "The directory %1 already exists."
-msgstr "La directory %1 esiste gia'."
+msgid "The directory %s already exists."
+msgstr "La directory %s esiste gia'."
index b142f832168f37e8f1c2280046d4424dbbad0ea4..58092d00b50a578a44521df1392b9172d73ec214 100644 (file)
@@ -55,8 +55,8 @@ msgstr "Idioma del audio (ej. ES)"
 
 #: src/wx/job_wrapper.cc:38
 #, c-format
-msgid "Bad setting for %1 (%2)"
-msgstr "Configuración erronea para %1 (%2)"
+msgid "Bad setting for %s (%s)"
+msgstr "Configuración erronea para %s (%s)"
 
 #: src/wx/film_editor.cc:296
 msgid "Bottom crop"
@@ -96,23 +96,23 @@ msgstr "Tipo de contenido"
 
 #: src/wx/film_viewer.cc:414
 #, c-format
-msgid "Could not decode video for view (%1)"
-msgstr "No se pudo decodificar el vídeo para mostrarlo (%1)"
+msgid "Could not decode video for view (%s)"
+msgstr "No se pudo decodificar el vídeo para mostrarlo (%s)"
 
 #: src/wx/job_wrapper.cc:40
 #, c-format
-msgid "Could not make DCP: %1"
-msgstr "No se pudo crear el DCP: %1"
+msgid "Could not make DCP: %s"
+msgstr "No se pudo crear el DCP: %s"
 
 #: src/wx/film_viewer.cc:108
 #, c-format
-msgid "Could not open content file (%1)"
-msgstr "No se pudo abrir el fichero (%1)"
+msgid "Could not open content file (%s)"
+msgstr "No se pudo abrir el fichero (%s)"
 
 #: src/wx/film_editor.cc:504
 #, c-format
-msgid "Could not set content: %1"
-msgstr "No se pudo establecer el contenido: %1"
+msgid "Could not set content: %s"
+msgstr "No se pudo establecer el contenido: %s"
 
 #: src/wx/new_film_dialog.cc:46
 msgid "Create in folder"
@@ -139,8 +139,8 @@ msgid "DVD-o-matic Preferences"
 msgstr "Preferencias DVD-o-matic"
 
 #: src/wx/audio_dialog.cc:101
-msgid "DVD-o-matic audio - %1"
-msgstr "Audio DVD-o-matic - %1"
+msgid "DVD-o-matic audio - %s"
+msgstr "Audio DVD-o-matic - %s"
 
 #: src/wx/config_dialog.cc:101
 msgid "Default DCI name details"
index e929598c22f7deae2b225c7c5d47a0c838a1a878..87e24df6984e3478bece030d943c26a48cdbdfbc 100644 (file)
@@ -54,8 +54,8 @@ msgstr "Langue audio (ex. FR)"
 
 #: src/wx/job_wrapper.cc:38
 #, c-format
-msgid "Bad setting for %1 (%2)"
-msgstr "Mauvais paramètre pour %1 (%2)"
+msgid "Bad setting for %s (%s)"
+msgstr "Mauvais paramètre pour %s (%s)"
 
 #: src/wx/film_editor.cc:296
 msgid "Bottom crop"
@@ -95,23 +95,23 @@ msgstr "Type de Contenu"
 
 #: src/wx/film_viewer.cc:414
 #, c-format
-msgid "Could not decode video for view (%1)"
-msgstr "Décodage de la vidéo pour visualisation impossible (%1)"
+msgid "Could not decode video for view (%s)"
+msgstr "Décodage de la vidéo pour visualisation impossible (%s)"
 
 #: src/wx/job_wrapper.cc:40
 #, c-format
-msgid "Could not make DCP: %1"
-msgstr "Impossible de créer le DCP : %1"
+msgid "Could not make DCP: %s"
+msgstr "Impossible de créer le DCP : %s"
 
 #: src/wx/film_viewer.cc:108
 #, c-format
-msgid "Could not open content file (%1)"
-msgstr "Ouverture du contenu impossible (%1)"
+msgid "Could not open content file (%s)"
+msgstr "Ouverture du contenu impossible (%s)"
 
 #: src/wx/film_editor.cc:504
 #, c-format
-msgid "Could not set content: %1"
-msgstr "Sélectionner du contenu impossible : %1"
+msgid "Could not set content: %s"
+msgstr "Sélectionner du contenu impossible : %s"
 
 #: src/wx/new_film_dialog.cc:46
 msgid "Create in folder"
@@ -138,8 +138,8 @@ msgid "DVD-o-matic Preferences"
 msgstr "Préférences DVD-o-matic"
 
 #: src/wx/audio_dialog.cc:101
-msgid "DVD-o-matic audio - %1"
-msgstr "Son DVD-o-matic  - %1"
+msgid "DVD-o-matic audio - %s"
+msgstr "Son DVD-o-matic  - %s"
 
 #: src/wx/config_dialog.cc:101
 msgid "Default DCI name details"
index c33f6a099ae86a78e44b99d7b26bd48068aa94f9..2e65d7d9837304161143bc5477f509628561e980 100644 (file)
@@ -55,8 +55,8 @@ msgstr "Lingua dell'audio (es. EN)"
 
 #: src/wx/job_wrapper.cc:38
 #, c-format
-msgid "Bad setting for %1 (%2)"
-msgstr "Valore sbagliato per %1 (%2)"
+msgid "Bad setting for %s (%s)"
+msgstr "Valore sbagliato per %s (%s)"
 
 #: src/wx/film_editor.cc:296
 msgid "Bottom crop"
@@ -96,23 +96,23 @@ msgstr "Tipo di contenuto"
 
 #: src/wx/film_viewer.cc:414
 #, c-format
-msgid "Could not decode video for view (%1)"
-msgstr "Non posso decodificare il video per guardarlo (%1)"
+msgid "Could not decode video for view (%s)"
+msgstr "Non posso decodificare il video per guardarlo (%s)"
 
 #: src/wx/job_wrapper.cc:40
 #, c-format
-msgid "Could not make DCP: %1"
-msgstr "Non posso creare il DCP: %1"
+msgid "Could not make DCP: %s"
+msgstr "Non posso creare il DCP: %s"
 
 #: src/wx/film_viewer.cc:108
 #, c-format
-msgid "Could not open content file (%1)"
-msgstr "Non posso aprire il file del contenuto (%1)"
+msgid "Could not open content file (%s)"
+msgstr "Non posso aprire il file del contenuto (%s)"
 
 #: src/wx/film_editor.cc:504
 #, c-format
-msgid "Could not set content: %1"
-msgstr "Non posso regolare il contenuto: %1"
+msgid "Could not set content: %s"
+msgstr "Non posso regolare il contenuto: %s"
 
 #: src/wx/new_film_dialog.cc:46
 msgid "Create in folder"
@@ -139,8 +139,8 @@ msgid "DVD-o-matic Preferences"
 msgstr "Preferenze DVD-o-matic"
 
 #: src/wx/audio_dialog.cc:101
-msgid "DVD-o-matic audio - %1"
-msgstr "Audio DVD-o-matic - %1"
+msgid "DVD-o-matic audio - %s"
+msgstr "Audio DVD-o-matic - %s"
 
 #: src/wx/config_dialog.cc:101
 msgid "Default DCI name details"