From d7c5f389e267beadecc00a5b0d2b4d7332aabc16 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 9 Jun 2018 20:34:54 +0200 Subject: [PATCH] explicit handling of English/en locale in setLocale and supportedLocales --- src/Gui/ApplicationPy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index b66a3f8750..884bc5fa85 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -639,6 +639,7 @@ PyObject* Application::sSetLocale(PyObject * /*self*/, PyObject *args,PyObject * std::string cname(name); TStringMap map = Translator::instance()->supportedLocales(); + map["English"] = "en"; for (const auto& it : map) { if (it.first == cname || it.second == cname) { Translator::instance()->activateLanguage(it.first.c_str()); @@ -657,6 +658,7 @@ PyObject* Application::sSupportedLocales(PyObject * /*self*/, PyObject *args,PyO TStringMap map = Translator::instance()->supportedLocales(); Py::Dict dict; + dict.setItem(Py::String("English"), Py::String("en")); for (const auto& it : map) { Py::String key(it.first); Py::String val(it.second);