mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
src/frontends/qt4/GuiApplication.cpp: fix a bug that prevents translator of languages with long names to be loaded
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19259 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0454f345a7
commit
e1076527ba
@ -111,7 +111,11 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
||||
|
||||
// install translation file for Qt built-in dialogs
|
||||
QString language_name = QString("qt_") + QLocale::system().name();
|
||||
language_name.truncate(5);
|
||||
|
||||
// language_name can be short (e.g. qt_zh) or long (e.g. qt_zh_CN).
|
||||
// Short-named translator can be loaded from a long name, but not the
|
||||
// opposite. Therefore, long name should be used without truncation.
|
||||
// c.f. http://doc.trolltech.com/4.1/qtranslator.html#load
|
||||
if (qt_trans_.load(language_name,
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user