summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/util.cc44
-rw-r--r--src/lib/util.h2
-rw-r--r--src/wx/wx_util.cc4
3 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index aca0fa651..1f9f881ef 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -545,29 +545,29 @@ mo_path()
* is configured for the OS.
*/
void
-dcpomatic_setup_c_and_gettext_i18n(string lang)
+dcpomatic_setup_c_and_gettext_i18n()
{
-#ifdef DCPOMATIC_LINUX
- lang += ".UTF8";
-#endif
-
- if (!lang.empty()) {
- /* Override the environment that we want gettext to use. Note that
- * the caller must not free the string passed into putenv().
- */
- string s = String::compose("LANGUAGE=%1", lang);
- putenv(strdup(s.c_str()));
-#if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_LINUX)
- /* On Linux and Windows this must not be "C" otherwise gettext doesn't work.
- * https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
- *
- * On macOS doing this sets the number format to the forced language, which
- * means it disagrees with wxWidgets.
- */
- s = String::compose("LANG=%1", lang);
- putenv(strdup(s.c_str()));
-#endif
- }
+// #ifdef DCPOMATIC_LINUX
+// lang += ".UTF8";
+// #endif
+
+// if (!lang.empty()) {
+// /* Override the environment that we want gettext to use. Note that
+// * the caller must not free the string passed into putenv().
+// */
+// string s = String::compose("LANGUAGE=%1", lang);
+// putenv(strdup(s.c_str()));
+// #if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_LINUX)
+// /* On Linux and Windows this must not be "C" otherwise gettext doesn't work.
+// * https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
+// *
+// * On macOS doing this sets the number format to the forced language, which
+// * means it disagrees with wxWidgets.
+// */
+// s = String::compose("LANG=%1", lang);
+// putenv(strdup(s.c_str()));
+// #endif
+ // }
setlocale(LC_ALL, "");
diff --git a/src/lib/util.h b/src/lib/util.h
index 0d844085a..f0b9f4c79 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -65,7 +65,7 @@ extern std::string seconds_to_approximate_hms(int);
extern double seconds(struct timeval);
extern void dcpomatic_setup();
extern void dcpomatic_setup_path_encoding();
-extern void dcpomatic_setup_c_and_gettext_i18n(std::string);
+extern void dcpomatic_setup_c_and_gettext_i18n();
extern std::string digest_head_tail(std::vector<boost::filesystem::path>, boost::uintmax_t size);
extern std::string simple_digest(std::vector<boost::filesystem::path> paths);
extern void ensure_ui_thread();
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 9b56b3183..3cbcf443b 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -485,7 +485,7 @@ dcpomatic_setup_i18n()
wxTranslations::Set(translations);
- dcpomatic_setup_c_and_gettext_i18n(config_lang.get_value_or(""));
+ dcpomatic_setup_c_and_gettext_i18n();
}
#else
@@ -518,7 +518,7 @@ dcpomatic_setup_i18n()
translations->AddAvailableCatalog(char_to_wx("dcpomatic2"));
/* Set up C library and gettext i18n */
- dcpomatic_setup_c_and_gettext_i18n(wx_to_std(translations->GetBestTranslation(char_to_wx("dcpomatic2"))));
+ dcpomatic_setup_c_and_gettext_i18n();
}
#endif