}
info.SetDescription (_("Free, open-source DCP generation from almost anything."));
info.SetCopyright (_("(C) 2012-2013 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen"));
+
wxArrayString authors;
authors.Add (wxT ("Carl Hetherington"));
authors.Add (wxT ("Terrence Meiczinger"));
authors.Add (wxT ("Paul Davis"));
authors.Add (wxT ("Ole Laursen"));
info.SetDevelopers (authors);
+
+ wxArrayString translators;
+ translators.Add (wxT ("Olivier Perriere"));
+ translators.Add (wxT ("Lilian Lefranc"));
+ translators.Add (wxT ("Thierry Journet"));
+ translators.Add (wxT ("Massimiliano Broggi"));
+ translators.Add (wxT ("Manuel AC"));
+ info.SetTranslators (translators);
+
info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic"));
wxAboutBox (info);
}
setup_i18n ()
{
int language = wxLANGUAGE_DEFAULT;
+
+ if (Config::instance()->language()) {
+ wxLanguageInfo const * li = wxLocale::FindLanguageInfo (std_to_wx (Config::instance()->language().get()));
+ language = li->Language;
+ }
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"));
language = wxLANGUAGE_ENGLISH;
}
}
+
+ if (locale) {
+ dvdomatic_setup_i18n (wx_to_std (locale->GetCanonicalName ()));
+ }
}
class App : public wxApp
#ifdef DVDOMATIC_POSIX
unsetenv ("UBUNTU_MENUPROXY");
#endif
-
+
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 ();
+ /* 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));