118458 【藏文】【备份还原】系统为藏文时备份还原界面显示为英文
This commit is contained in:
parent
da2538bada
commit
513d68c990
|
@ -137,11 +137,15 @@ FORMS += \
|
|||
|
||||
OTHER_FILES +=
|
||||
|
||||
TRANSLATIONS += qt_zh_CN.ts
|
||||
TRANSLATIONS += qt_zh_CN.ts \
|
||||
qt_bo_CN.ts
|
||||
|
||||
system(rm -f qt_zh_CN.qm)
|
||||
!system(lrelease qt_zh_CN.ts): error("Failed to generate qm")
|
||||
!system(lrelease qt_zh_CN.ts): error("Failed to generate cp qt_zh_CN.qm")
|
||||
system(cp qt_zh_CN.qm resource/language/)
|
||||
#system(rm -f qt_bo_CN.qm)
|
||||
#!system(lrelease qt_bo_CN.ts): error("Failed to generate qt_bo_CN.qm")
|
||||
#system(cp qt_bo_CN.qm resource/language/)
|
||||
|
||||
RESOURCES += \
|
||||
app.qrc
|
||||
|
|
|
@ -92,16 +92,28 @@ void initApp(QApplication& a)
|
|||
qDebug() << "load translator file failed!";
|
||||
else
|
||||
a.installTranslator(translator);
|
||||
} else if (locale == "bo_CN") {
|
||||
//藏文需要翻译
|
||||
if (!translator->load(":/language/qt_bo_CN.qm")) //qtcreator启动后看到在资源目录下
|
||||
qDebug() << "load translator file failed!";
|
||||
else
|
||||
a.installTranslator(translator);
|
||||
}
|
||||
|
||||
// 部分sdk控件用到翻译文件
|
||||
QTranslator *transGui = new QTranslator();
|
||||
if(locale == "zh_CN")
|
||||
if (locale == "zh_CN")
|
||||
{
|
||||
if(transGui->load(":/translations/gui_zh_CN.qm"))
|
||||
{
|
||||
a.installTranslator(transGui);
|
||||
}
|
||||
} else if (locale == "bo_CN")
|
||||
{
|
||||
if(transGui->load(":/translations/gui_bo_CN.qm"))
|
||||
{
|
||||
a.installTranslator(transGui);
|
||||
}
|
||||
}
|
||||
|
||||
// 命令行参数
|
||||
|
|
Loading…
Reference in New Issue