summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-27 12:19:57 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-27 12:19:57 +0000
commit419bcdc816802e50fdebb89bc9dd4a73ede103f5 (patch)
tree21f4feca34e28dbd4f1f94234ee69e3134abe0e1
parent2f10afc2a4cc2156245a5db593ba7476c6caa4f5 (diff)
More fighting with i18n woes.
-rw-r--r--src/lib/po/fr_FR.po10
-rw-r--r--src/lib/util.cc25
-rw-r--r--src/tools/dvdomatic.cc4
-rw-r--r--src/tools/po/es_ES.po12
-rw-r--r--src/tools/po/fr_FR.po12
-rw-r--r--src/tools/po/it_IT.po12
-rw-r--r--src/wx/po/es_ES.po24
-rw-r--r--src/wx/po/fr_FR.po24
-rw-r--r--src/wx/po/it_IT.po24
9 files changed, 76 insertions, 71 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.
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index f6dc587c9..71b8ff6c4 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -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()));
}
}
diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po
index 5b3330b70..23b2c9cdc 100644
--- a/src/tools/po/es_ES.po
+++ b/src/tools/po/es_ES.po
@@ -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."
diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po
index 857e5b512..b0c46117d 100644
--- a/src/tools/po/fr_FR.po
+++ b/src/tools/po/fr_FR.po
@@ -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à."
diff --git a/src/tools/po/it_IT.po b/src/tools/po/it_IT.po
index 2ce0cb11e..906653093 100644
--- a/src/tools/po/it_IT.po
+++ b/src/tools/po/it_IT.po
@@ -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'."
diff --git a/src/wx/po/es_ES.po b/src/wx/po/es_ES.po
index b142f8321..58092d00b 100644
--- a/src/wx/po/es_ES.po
+++ b/src/wx/po/es_ES.po
@@ -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"
diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po
index e929598c2..87e24df69 100644
--- a/src/wx/po/fr_FR.po
+++ b/src/wx/po/fr_FR.po
@@ -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"
diff --git a/src/wx/po/it_IT.po b/src/wx/po/it_IT.po
index c33f6a099..2e65d7d98 100644
--- a/src/wx/po/it_IT.po
+++ b/src/wx/po/it_IT.po
@@ -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"