From 7ea72d80eb1ddefc8b43afa682f0bf20e9b67b7d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 20 Mar 2013 15:01:03 +0000 Subject: Try to set gettext up correctly. --- src/lib/util.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index 53bdb4c79..e043f8576 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -249,6 +249,13 @@ dvdomatic_setup () ui_thread = this_thread::get_id (); } +void +dvdomatic_setup_i18n (string lang) +{ + bindtextdomain ("libdvdomatic", LOCALE_PREFIX); + setlocale (LC_ALL, lang.c_str ()); +} + /** @param start Start position for the crop within the image. * @param size Size of the cropped area. * @return FFmpeg crop filter string. -- cgit v1.2.3 From 6157fc6d7d8037a239a2494ad89da8c917145dae Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 20 Mar 2013 16:48:11 +0000 Subject: Remove redundant line. --- src/lib/util.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index e043f8576..abbc35749 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -236,7 +236,6 @@ void dvdomatic_setup () { bindtextdomain ("libdvdomatic", LOCALE_PREFIX); - setlocale (LC_ALL, ""); avfilter_register_all (); -- cgit v1.2.3 From 9d283e1f5ed5b06dea2ff818daf4eff2a7e8cae5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 21 Mar 2013 11:37:50 +0000 Subject: Another attempt to fix i18n. --- src/lib/util.cc | 8 +++++++- windows/installer.nsi.32.in | 5 +++-- windows/installer.nsi.64.in | 6 +++--- wscript | 5 +++-- 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src/lib/util.cc') 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" diff --git a/wscript b/wscript index 4f81e4934..171b71181 100644 --- a/wscript +++ b/wscript @@ -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') -- cgit v1.2.3 From 6cb347531ee421d6bb39da5e78d660b594c8c9b6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 21 Mar 2013 12:05:41 +0000 Subject: Remove duplicate line. --- src/lib/util.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index 765835bc4..03c1f43dd 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -235,8 +235,6 @@ seconds (struct timeval t) void dvdomatic_setup () { - bindtextdomain ("libdvdomatic", LOCALE_PREFIX); - avfilter_register_all (); Format::setup_formats (); -- cgit v1.2.3 From 1c207805aef4443c5fb6c102e5be8a5b50002868 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 21 Mar 2013 16:31:48 +0000 Subject: Add Manual Acevedo's initial Spanish translation. Hopefully finally fix up translations on Windows. --- src/lib/config.cc | 7 +++ src/lib/config.h | 1 + src/lib/util.cc | 27 ++++++++-- src/lib/util.h | 4 ++ src/tools/dvdomatic.cc | 32 ++++++++---- src/tools/po/es_ES.po | 117 ++++++++++++++++++++++++++++++++++++++++++++ windows/installer.nsi.32.in | 6 ++- windows/installer.nsi.64.in | 4 +- wscript | 3 +- 9 files changed, 181 insertions(+), 20 deletions(-) create mode 100644 src/tools/po/es_ES.po (limited to 'src/lib/util.cc') diff --git a/src/lib/config.cc b/src/lib/config.cc index ad132437a..5dce3748d 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -167,3 +167,10 @@ Config::default_directory_or (string a) const return _default_directory; } + +void +Config::drop () +{ + delete _instance; + _instance = 0; +} diff --git a/src/lib/config.h b/src/lib/config.h index 0e9c4a60a..ee46166e6 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -169,6 +169,7 @@ public: void write () const; static Config* instance (); + static void drop (); private: Config (); diff --git a/src/lib/util.cc b/src/lib/util.cc index 03c1f43dd..593d0e760 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -246,17 +246,36 @@ dvdomatic_setup () ui_thread = this_thread::get_id (); } +#ifdef DVDOMATIC_WINDOWS +boost::filesystem::path +mo_path () +{ + wchar_t buffer[512]; + GetModuleFileName (0, buffer, 512 * sizeof(wchar_t)); + boost::filesystem::path p (buffer); + p = p.parent_path (); + p = p.parent_path (); + p /= "locale"; + return p; +} +#endif + void dvdomatic_setup_i18n (string lang) { + setlocale (LC_ALL, ""); + textdomain ("libdvdomatic"); + #ifdef DVDOMATIC_WINDOWS string const e = "LANGUAGE=" + lang; putenv (e.c_str()); + + bindtextdomain ("libdvdomatic", mo_path().string().c_str()); #endif - - setlocale (LC_ALL, ""); - textdomain ("libdvdomatic"); - bindtextdomain ("libdvdomatic", LOCALE_PREFIX); + +#ifdef DVDOMATIC_POSIX + bindtextdomain ("libdvdomatic", POSIX_LOCALE_PREFIX); +#endif } /** @param start Start position for the crop within the image. diff --git a/src/lib/util.h b/src/lib/util.h index 60498be5a..3d251cf06 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -30,6 +30,7 @@ #include #include #include +#include #include extern "C" { #include @@ -60,6 +61,9 @@ extern std::string md5_digest (std::string); extern std::string md5_digest (void const *, int); extern void ensure_ui_thread (); extern std::string audio_channel_name (int); +#ifdef DVDOMATIC_WINDOWS +extern boost::filesystem::path mo_path (); +#endif typedef int SourceFrame; diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index aa936523d..4a778100c 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -416,10 +416,11 @@ private: info.SetDevelopers (authors); wxArrayString translators; - translators.Add (wxT ("Olivier Perriere (freedcp.net)")); + translators.Add (wxT ("Olivier Perriere")); translators.Add (wxT ("Lilian Lefranc")); translators.Add (wxT ("Thierry Journet")); translators.Add (wxT ("Massimiliano Broggi")); + translators.Add (wxT ("Manuel Acevedo")); info.SetTranslators (translators); info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic")); @@ -456,9 +457,9 @@ setup_i18n () if (wxLocale::IsAvailable (language)) { locale = new wxLocale (language, wxLOCALE_LOAD_DEFAULT); -#ifdef __WXGTK__ - locale->AddCatalogLookupPathPrefix (wxT (LOCALE_PREFIX "/locale")); -#endif +#ifdef DVDOMATIC_WINDOWS + locale->AddCatalogLookupPathPrefix (std_to_wx (mo_path().string())); +#endif locale->AddCatalog (wxT ("libdvdomatic-wx")); locale->AddCatalog (wxT ("dvdomatic")); @@ -485,15 +486,26 @@ class App : public wxApp unsetenv ("UBUNTU_MENUPROXY"); #endif - /* This needs to be before setup_i18n, as setup_i18n() will - create a Config object, which needs Scalers to have - been created. + wxInitAllImageHandlers (); + + /* Enable i18n; this will create a Config object + to look for a force-configured language. This Config + object will be wrong, however, because dvdomatic_setup + hasn't yet been called and there aren't any scalers, filters etc. + set up yet. + */ + setup_i18n (); + + /* Set things up, including scalers / filters etc. + which will now be internationalised correctly. */ dvdomatic_setup (); - wxInitAllImageHandlers (); - setup_i18n (); - + /* Force the configuration to be re-loaded correctly next + time it is needed. + */ + Config::drop (); + if (!film_to_load.empty() && boost::filesystem::is_directory (film_to_load)) { try { film.reset (new Film (film_to_load)); diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po new file mode 100644 index 000000000..78eecb306 --- /dev/null +++ b/src/tools/po/es_ES.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: DVDOMATIC\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-03-15 08:39+0000\n" +"PO-Revision-Date: 2013-03-20 17:05-0500\n" +"Last-Translator: Manuel AC \n" +"Language-Team: Manuel AC \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.5\n" +"Language: ES-ES\n" + +#: src/tools/dvdomatic.cc:177 +msgid "&Analyse audio" +msgstr "&Analizar sonido" + +#: src/tools/dvdomatic.cc:183 +msgid "&Edit" +msgstr "&Editar" + +#: src/tools/dvdomatic.cc:182 +msgid "&File" +msgstr "&Archivo" + +#: src/tools/dvdomatic.cc:185 +msgid "&Help" +msgstr "&Ayuda" + +#: src/tools/dvdomatic.cc:184 +msgid "&Jobs" +msgstr "&Tareas" + +#: src/tools/dvdomatic.cc:173 +msgid "&Make DCP" +msgstr "&Hacer DCP" + +#: src/tools/dvdomatic.cc:161 +msgid "&Open..." +msgstr "&Abrir..." + +#: src/tools/dvdomatic.cc:170 +msgid "&Preferences..." +msgstr "&Preferencias..." + +#: src/tools/dvdomatic.cc:165 +msgid "&Properties..." +msgstr "&Propiedades..." + +#: src/tools/dvdomatic.cc:167 +msgid "&Quit" +msgstr "&Salir" + +#: src/tools/dvdomatic.cc:163 +msgid "&Save" +msgstr "&Guardar" + +#: src/tools/dvdomatic.cc:174 +msgid "&Send DCP to TMS" +msgstr "&Enviar DCP al TMS" + +#: src/tools/dvdomatic.cc:409 +msgid "" +"(C) 2012-2013 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen" +msgstr "" +"(C) 2012-2013 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen" + +#: src/tools/dvdomatic.cc:180 +msgid "About" +msgstr "Acerca de" + +#: src/tools/dvdomatic.cc:497 +msgid "Could not load film %1 (%2)" +msgstr "No se pudo cargar la película %1 (%2)" + +#: src/tools/dvdomatic.cc:331 +#, c-format +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:501 +msgid "DVD-o-matic" +msgstr "DVD-o-matic" + +#: src/tools/dvdomatic.cc:75 +msgid "Film changed" +msgstr "Película cambiada" + +#: src/tools/dvdomatic.cc:408 +msgid "Free, open-source DCP generation from almost anything." +msgstr "" +"Generación de DCP a partir de casi cualquier fuente, libre y de código " +"abierto." + +#: src/tools/dvdomatic.cc:160 +msgid "New..." +msgstr "Nuevo..." + +#: src/tools/dvdomatic.cc:175 +msgid "S&how DCP" +msgstr "&Mostrar DCP" + +#: src/tools/dvdomatic.cc:319 +msgid "Select film to open" +msgstr "Selecciona la película a abrir" + +#: src/tools/dvdomatic.cc:303 +#, c-format +msgid "The directory %s already exists." +msgstr "La carpeta %s ya existe." diff --git a/windows/installer.nsi.32.in b/windows/installer.nsi.32.in index b79703ff1..b2bb2f3a9 100644 --- a/windows/installer.nsi.32.in +++ b/windows/installer.nsi.32.in @@ -93,14 +93,16 @@ File "%deps%/etc/ImageMagick/delegates.xml" SetOutPath "$PROFILE\.magick" File "%deps%/etc/ImageMagick/delegates.xml" -SetOutPath "$INSTDIR\locale\fr_FR" +SetOutPath "$INSTDIR\locale\fr\LC_MESSAGES" 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\locale\it_IT" +SetOutPath "$INSTDIR\locale\it\LC_MESSAGES" 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" +SetOutPath "$INSTDIR\locale\es\LC_MESSAGES" +File "%binaries%/src/tools/mo/es_ES/dvdomatic.mo" CreateShortCut "$DESKTOP\DVD-o-matic.lnk" "$INSTDIR\bin\dvdomatic.exe" "" CreateShortCut "$DESKTOP\DVD-o-matic encode server.lnk" "$INSTDIR\bin\servomatic_gui.exe" "" diff --git a/windows/installer.nsi.64.in b/windows/installer.nsi.64.in index 21980e61a..921178591 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\locale\fr_FR" +SetOutPath "$INSTDIR\locale\fr\LC_MESSAGES" 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\locale\it_IT" +SetOutPath "$INSTDIR\locale\it\LC_MESSAGES" 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/wscript b/wscript index 24ebfe548..612abdf22 100644 --- a/wscript +++ b/wscript @@ -26,7 +26,6 @@ def configure(conf): if conf.options.target_windows: conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN', '-DBOOST_USE_WINDOWS_H', '-DUNICODE']) - conf.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,7 +36,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']) + conf.env.append_value('CXXFLAGS', '-DPOSIX_LOCALE_PREFIX="%s/share/locale"' % conf.env['PREFIX']) boost_lib_suffix = '' boost_thread = 'boost_thread' conf.env.append_value('LINKFLAGS', '-pthread') -- cgit v1.2.3 From fed8744100ee8e58c09b0394d05ac908f2c4e15f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 25 Mar 2013 22:58:15 +0000 Subject: Improve language setup. --- src/lib/config.h | 4 ++++ src/lib/util.cc | 5 ++++- src/wx/config_dialog.cc | 27 +++++++++++++++++++++++++-- src/wx/config_dialog.h | 3 +++ 4 files changed, 36 insertions(+), 3 deletions(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/config.h b/src/lib/config.h index ee46166e6..011ca716f 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -165,6 +165,10 @@ public: void set_language (std::string l) { _language = l; } + + void unset_language () { + _language = boost::none; + } void write () const; diff --git a/src/lib/util.cc b/src/lib/util.cc index 593d0e760..2e4671251 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -271,7 +271,10 @@ dvdomatic_setup_i18n (string lang) putenv (e.c_str()); bindtextdomain ("libdvdomatic", mo_path().string().c_str()); -#endif +#else + /* Hack to silence warning */ + lang.clear (); +#endif #ifdef DVDOMATIC_POSIX bindtextdomain ("libdvdomatic", POSIX_LOCALE_PREFIX); diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index ea1a7319e..364336114 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -46,7 +46,8 @@ ConfigDialog::ConfigDialog (wxWindow* parent) wxFlexGridSizer* table = new wxFlexGridSizer (3, 6, 6); table->AddGrowableCol (1, 1); - add_label_to_sizer (table, this, _("User interface language")); + _set_language = new wxCheckBox (this, wxID_ANY, _("Set language")); + table->Add (_set_language, 1, wxEXPAND); _language = new wxChoice (this, wxID_ANY); _language->Append (wxT ("English")); _language->Append (wxT ("Français")); @@ -149,6 +150,8 @@ ConfigDialog::ConfigDialog (wxWindow* parent) Config* config = Config::instance (); + _set_language->SetValue (config->language ()); + if (config->language().get_value_or ("") == "fr") { _language->SetSelection (1); } else if (config->language().get_value_or ("") == "it") { @@ -158,7 +161,10 @@ ConfigDialog::ConfigDialog (wxWindow* parent) } else { _language->SetSelection (0); } - + + setup_language_sensitivity (); + + _set_language->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (ConfigDialog::set_language_changed), 0, this); _language->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::language_changed), 0, this); _tms_ip->SetValue (std_to_wx (config->tms_ip ())); _tms_ip->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::tms_ip_changed), 0, this); @@ -371,3 +377,20 @@ ConfigDialog::edit_default_dci_metadata_clicked (wxCommandEvent &) Config::instance()->set_default_dci_metadata (d->dci_metadata ()); d->Destroy (); } + +void +ConfigDialog::set_language_changed (wxCommandEvent& ev) +{ + setup_language_sensitivity (); + if (_set_language->GetValue ()) { + language_changed (ev); + } else { + Config::instance()->unset_language (); + } +} + +void +ConfigDialog::setup_language_sensitivity () +{ + _language->Enable (_set_language->GetValue ()); +} diff --git a/src/wx/config_dialog.h b/src/wx/config_dialog.h index 8a3c81ec9..f6f3b3707 100644 --- a/src/wx/config_dialog.h +++ b/src/wx/config_dialog.h @@ -39,6 +39,7 @@ public: ConfigDialog (wxWindow *); private: + void set_language_changed (wxCommandEvent &); void language_changed (wxCommandEvent &); void tms_ip_changed (wxCommandEvent &); void tms_path_changed (wxCommandEvent &); @@ -56,7 +57,9 @@ private: void server_selection_changed (wxListEvent &); void add_server_to_control (ServerDescription *); + void setup_language_sensitivity (); + wxCheckBox* _set_language; wxChoice* _language; wxTextCtrl* _tms_ip; wxTextCtrl* _tms_path; -- cgit v1.2.3 From 692c40f6b5a189b2014ed0b8aa3094f2fa93d26a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Mar 2013 14:54:51 +0000 Subject: Fix untranslated sound channel names. --- src/lib/po/es_ES.po | 26 +++++++++++++++++++++++++- src/lib/po/fr_FR.po | 26 +++++++++++++++++++++++++- src/lib/po/it_IT.po | 26 +++++++++++++++++++++++++- src/lib/util.cc | 12 ++++++------ src/tools/po/es_ES.po | 2 +- src/tools/po/fr_FR.po | 2 +- src/tools/po/it_IT.po | 2 +- src/wx/po/es_ES.po | 2 +- src/wx/po/fr_FR.po | 2 +- src/wx/po/it_IT.po | 2 +- 10 files changed, 87 insertions(+), 15 deletions(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/po/es_ES.po b/src/lib/po/es_ES.po index 18e53d3b7..a25c1fe2b 100644 --- a/src/lib/po/es_ES.po +++ b/src/lib/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: LIBDVDOMATIC\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-23 22:42-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" @@ -102,6 +102,10 @@ msgid "Cannot resample audio as libswresample is not present" msgstr "" "No se puede redimensionar el sonido porque no se encuentra libswresample" +#: src/lib/util.cc:922 +msgid "Centre" +msgstr "" + #: src/lib/scp_dcp_job.cc:109 msgid "Copy DCP to TMS" msgstr "Copiar DCP al TMS" @@ -253,6 +257,18 @@ msgstr "" msgid "Lanczos" msgstr "Lanczos" +#: src/lib/util.cc:920 +msgid "Left" +msgstr "" + +#: src/lib/util.cc:924 +msgid "Left surround" +msgstr "" + +#: src/lib/util.cc:923 +msgid "Lfe (sub)" +msgstr "" + #: src/lib/filter.cc:75 msgid "Linear blend deinterlacer" msgstr "" @@ -303,6 +319,14 @@ msgstr "Clasificación" msgid "Rec 709" msgstr "Rec 709" +#: src/lib/util.cc:921 +msgid "Right" +msgstr "" + +#: src/lib/util.cc:925 +msgid "Right surround" +msgstr "" + #: src/lib/scp_dcp_job.cc:133 msgid "SSH error (%1)" msgstr "error SSH (%1)" diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index 98080b61d..1731b4c49 100644 --- a/src/lib/po/fr_FR.po +++ b/src/lib/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DVD-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-20 00:39+0100\n" "Last-Translator: FreeDCP.net \n" "Language-Team: \n" @@ -100,6 +100,10 @@ msgstr "" msgid "Cannot resample audio as libswresample is not present" msgstr "Ré-échantillonnage du son impossible : libswresample est absent" +#: src/lib/util.cc:922 +msgid "Centre" +msgstr "" + #: src/lib/scp_dcp_job.cc:109 msgid "Copy DCP to TMS" msgstr "Copier le DCP dans le TMS" @@ -251,6 +255,18 @@ msgstr "Désentrelaceur noyau" msgid "Lanczos" msgstr "Lanczos" +#: src/lib/util.cc:920 +msgid "Left" +msgstr "" + +#: src/lib/util.cc:924 +msgid "Left surround" +msgstr "" + +#: src/lib/util.cc:923 +msgid "Lfe (sub)" +msgstr "" + #: src/lib/filter.cc:75 msgid "Linear blend deinterlacer" msgstr "Désentrelaceur par mélange interpolé" @@ -301,6 +317,14 @@ msgstr "Rating" msgid "Rec 709" msgstr "Rec 709" +#: src/lib/util.cc:921 +msgid "Right" +msgstr "" + +#: src/lib/util.cc:925 +msgid "Right surround" +msgstr "" + #: src/lib/scp_dcp_job.cc:133 msgid "SSH error (%1)" msgstr "Erreur SSH (%1)" diff --git a/src/lib/po/it_IT.po b/src/lib/po/it_IT.po index 24cd1c187..67f8f4c45 100644 --- a/src/lib/po/it_IT.po +++ b/src/lib/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-20 11:45+0100\n" "Last-Translator: Maci \n" "Language-Team: \n" @@ -101,6 +101,10 @@ msgstr "" msgid "Cannot resample audio as libswresample is not present" msgstr "Non posso ricampionare l'audio perchè libswresample non è presente" +#: src/lib/util.cc:922 +msgid "Centre" +msgstr "" + #: src/lib/scp_dcp_job.cc:109 msgid "Copy DCP to TMS" msgstr "Copia del DCP al TMS" @@ -252,6 +256,18 @@ msgstr "Deinterlacciatore Kernel" msgid "Lanczos" msgstr "Lanczos" +#: src/lib/util.cc:920 +msgid "Left" +msgstr "" + +#: src/lib/util.cc:924 +msgid "Left surround" +msgstr "" + +#: src/lib/util.cc:923 +msgid "Lfe (sub)" +msgstr "" + #: src/lib/filter.cc:75 msgid "Linear blend deinterlacer" msgstr "Deinterlacciatore lineare miscelato" @@ -302,6 +318,14 @@ msgstr "Punteggio" msgid "Rec 709" msgstr "Rec 709" +#: src/lib/util.cc:921 +msgid "Right" +msgstr "" + +#: src/lib/util.cc:925 +msgid "Right surround" +msgstr "" + #: src/lib/scp_dcp_job.cc:133 msgid "SSH error (%1)" msgstr "Errore SSH (%1)" diff --git a/src/lib/util.cc b/src/lib/util.cc index 2e4671251..9a7794ce8 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -917,12 +917,12 @@ audio_channel_name (int c) enhancement channel (sub-woofer)./ */ string const channels[] = { - "Left", - "Right", - "Centre", - "Lfe (sub)", - "Left surround", - "Right surround", + _("Left"), + _("Right"), + _("Centre"), + _("Lfe (sub)"), + _("Left surround"), + _("Right surround"), }; return channels[c]; diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po index c114c7ae9..c330b69cf 100644 --- a/src/tools/po/es_ES.po +++ b/src/tools/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DVDOMATIC\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-23 21:08-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po index 39001297b..54fb2d070 100644 --- a/src/tools/po/fr_FR.po +++ b/src/tools/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DVD-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-13 22:33+0100\n" "Last-Translator: \n" "Language-Team: \n" diff --git a/src/tools/po/it_IT.po b/src/tools/po/it_IT.po index 33f412b78..dce686281 100644 --- a/src/tools/po/it_IT.po +++ b/src/tools/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-22 18:03+0100\n" "Last-Translator: Maci \n" "Language-Team: \n" diff --git a/src/wx/po/es_ES.po b/src/wx/po/es_ES.po index 3aeda7d73..23d9e1a32 100644 --- a/src/wx/po/es_ES.po +++ b/src/wx/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libdvdomatic-wx\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-23 21:20-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po index 8ab03d1cb..1adef7c2b 100644 --- a/src/wx/po/fr_FR.po +++ b/src/wx/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DVD-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-20 00:34+0100\n" "Last-Translator: FreeDCP.net \n" "Language-Team: \n" diff --git a/src/wx/po/it_IT.po b/src/wx/po/it_IT.po index c6316e9b9..e4e32e9e7 100644 --- a/src/wx/po/it_IT.po +++ b/src/wx/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-26 14:11+0000\n" +"POT-Creation-Date: 2013-03-26 14:54+0000\n" "PO-Revision-Date: 2013-03-22 18:10+0100\n" "Last-Translator: Maci \n" "Language-Team: \n" -- cgit v1.2.3 From 419bcdc816802e50fdebb89bc9dd4a73ede103f5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 27 Mar 2013 12:19:57 +0000 Subject: More fighting with i18n woes. --- src/lib/po/fr_FR.po | 10 +++------- src/lib/util.cc | 25 +++++++++++++++++-------- src/tools/dvdomatic.cc | 4 ++-- src/tools/po/es_ES.po | 12 ++++++------ src/tools/po/fr_FR.po | 12 ++++++------ src/tools/po/it_IT.po | 12 ++++++------ src/wx/po/es_ES.po | 24 ++++++++++++------------ src/wx/po/fr_FR.po | 24 ++++++++++++------------ src/wx/po/it_IT.po | 24 ++++++++++++------------ 9 files changed, 76 insertions(+), 71 deletions(-) (limited to 'src/lib/util.cc') 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" -- cgit v1.2.3 From 9c1f9a4bc879c17f01d32265fe1b810e4cecfb65 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 1 Apr 2013 22:18:59 +0100 Subject: Try bind_textdomain_codeset on Windows. --- src/lib/util.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index 48cb17c26..5b2038cde 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -283,6 +283,7 @@ dvdomatic_setup_i18n (string lang) #ifdef DVDOMATIC_WINDOWS bindtextdomain ("libdvdomatic", mo_path().string().c_str()); + bind_textdomain_codeset ("libdvdomatic", "UTF8"); #endif #ifdef DVDOMATIC_POSIX -- cgit v1.2.3 From 588ddc8856b5188c5c666280da1b2c962e64dedb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 7 Apr 2013 17:12:37 +0100 Subject: Add note about audio resampling (#96). --- src/lib/util.cc | 2 +- src/wx/film_editor.cc | 52 ++++++++++++++++++++++++++++++++++++++++++++------- src/wx/film_editor.h | 2 ++ 3 files changed, 48 insertions(+), 8 deletions(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index 5b2038cde..557e9a34b 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -1014,7 +1014,7 @@ FrameRateConversion::FrameRateConversion (float source, int dcp) if (change_speed) { float const pc = dcp * 100 / (source * factor()); - description += String::compose (_("DCP will run at %1%% of the source speed."), pc); + description += String::compose (_("DCP will run at %1%% of the source speed.\n"), pc); } } } diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 916d86cc0..69f09c880 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -622,6 +622,7 @@ FilmEditor::film_changed (Film::Property p) setup_subtitle_control_sensitivity (); setup_streams (); setup_show_audio_sensitivity (); + setup_frame_rate_description (); break; case Film::TRUST_CONTENT_HEADER: checked_set (_trust_content_header, _film->trust_content_header ()); @@ -633,6 +634,7 @@ FilmEditor::film_changed (Film::Property p) case Film::CONTENT_AUDIO_STREAMS: setup_streams (); setup_show_audio_sensitivity (); + setup_frame_rate_description (); break; case Film::FORMAT: { @@ -677,6 +679,7 @@ FilmEditor::film_changed (Film::Property p) case Film::SOURCE_FRAME_RATE: s << fixed << setprecision(2) << _film->source_frame_rate(); _source_frame_rate->SetLabel (std_to_wx (s.str ())); + setup_frame_rate_description (); break; case Film::SIZE: if (_film->size().width == 0 && _film->size().height == 0) { @@ -758,6 +761,7 @@ FilmEditor::film_changed (Film::Property p) setup_audio_details (); setup_audio_control_sensitivity (); setup_show_audio_sensitivity (); + setup_frame_rate_description (); break; case Film::USE_CONTENT_AUDIO: checked_set (_use_content_audio, _film->use_content_audio()); @@ -766,6 +770,7 @@ FilmEditor::film_changed (Film::Property p) setup_audio_details (); setup_audio_control_sensitivity (); setup_show_audio_sensitivity (); + setup_frame_rate_description (); break; case Film::SUBTITLE_STREAM: if (_film->subtitle_stream()) { @@ -780,6 +785,7 @@ FilmEditor::film_changed (Film::Property p) } setup_audio_details (); setup_show_audio_sensitivity (); + setup_frame_rate_description (); break; } case Film::DCP_FRAME_RATE: @@ -793,15 +799,39 @@ FilmEditor::film_changed (Film::Property p) } if (_film->source_frame_rate()) { - _frame_rate_description->SetLabel (std_to_wx (FrameRateConversion (_film->source_frame_rate(), _film->dcp_frame_rate()).description)); _best_dcp_frame_rate->Enable (best_dcp_frame_rate (_film->source_frame_rate ()) != _film->dcp_frame_rate ()); } else { - _frame_rate_description->SetLabel (wxT ("")); _best_dcp_frame_rate->Disable (); } + + setup_frame_rate_description (); } } +void +FilmEditor::setup_frame_rate_description () +{ + wxString d; + if (_film->source_frame_rate()) { + d << std_to_wx (FrameRateConversion (_film->source_frame_rate(), _film->dcp_frame_rate()).description); +#ifdef HAVE_SWRESAMPLE + if (_film->audio_stream() && _film->audio_stream()->sample_rate() != _film->target_audio_sample_rate ()) { + d << wxString::Format ( + _("Audio will be resampled from %dHz to %dHz\n"), + _film->audio_stream()->sample_rate(), + _film->target_audio_sample_rate() + ); + } else { + d << "\n"; + } +#else + d << "\n"; +#endif + } + + _frame_rate_description->SetLabel (d); +} + /** Called when the format widget has been changed */ void FilmEditor::format_changed (wxCommandEvent &) @@ -999,6 +1029,12 @@ FilmEditor::setup_visibility () (*i)->Show (c == STILL); } + setup_notebook_size (); +} + +void +FilmEditor::setup_notebook_size () +{ _notebook->InvalidateBestSize (); _film_sizer->Layout (); @@ -1228,15 +1264,17 @@ FilmEditor::setup_audio_details () if (!_film->content_audio_stream()) { _audio->SetLabel (wxT ("")); } else { - stringstream s; + wxString s; if (_film->audio_stream()->channels() == 1) { - s << wx_to_std (_("1 channel")); + s << _("1 channel"); } else { - s << _film->audio_stream()->channels () << " " << wx_to_std (_("channels")); + s << _film->audio_stream()->channels () << " " << _("channels"); } - s << ", " << _film->audio_stream()->sample_rate() << wx_to_std (_("Hz")); - _audio->SetLabel (std_to_wx (s.str ())); + s << ", " << _film->audio_stream()->sample_rate() << _("Hz"); + _audio->SetLabel (s); } + + setup_notebook_size (); } void diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index 7de63014e..7123620d3 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -100,6 +100,8 @@ private: void setup_dcp_name (); void setup_show_audio_sensitivity (); void setup_scaling_description (); + void setup_notebook_size (); + void setup_frame_rate_description (); wxControl* video_control (wxControl *); wxControl* still_control (wxControl *); -- cgit v1.2.3