mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Move a Qt workaround to the Qt frontend.
This commit is contained in:
parent
20799a5ebf
commit
deb6e16e79
@ -186,7 +186,9 @@ void setLocale()
|
||||
string const code = l ? l->code() : string();
|
||||
theLocale = QLocale(toqstr(code));
|
||||
}
|
||||
Messages::guiLanguage(fromqstr(theLocale.name()));
|
||||
string const code = fromqstr(theLocale.name());
|
||||
// Qt tries to outsmart us and transforms en_US to C.
|
||||
Messages::guiLanguage((code == "C") ? "en_US" : code);
|
||||
QLocale::setDefault(theLocale);
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
|
@ -155,10 +155,8 @@ Messages::Messages(string const & l)
|
||||
namespace {
|
||||
|
||||
// Find the code we have for a given language code. Return empty if not found.
|
||||
string realCode(string const & c)
|
||||
string realCode(string code)
|
||||
{
|
||||
// Qt tries to outsmart us and transforms en_US to C.
|
||||
string code = (c == "C") ? "en" : c;
|
||||
// this loops at most twice
|
||||
while (true) {
|
||||
if (package().messages_file(code).isReadableFile())
|
||||
|
Loading…
Reference in New Issue
Block a user