mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-22 19:00:07 +08:00
update
This commit is contained in:
parent
247b8db7c4
commit
ff68491baf
@ -46,13 +46,13 @@ endif()
|
|||||||
#国际化
|
#国际化
|
||||||
find_program(QT_LUPDATE NAMES lupdate)
|
find_program(QT_LUPDATE NAMES lupdate)
|
||||||
find_program(QT_LRELEASE NAMES lrelease)
|
find_program(QT_LRELEASE NAMES lrelease)
|
||||||
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/FluentUI_en_US.qm)
|
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/fluentui_en_US.qm)
|
||||||
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts FluentUI_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts fluentui_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||||
execute_process(COMMAND ${QT_LRELEASE} FluentUI_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
execute_process(COMMAND ${QT_LRELEASE} fluentui_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/FluentUI_zh_CN.qm)
|
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/fluentui_zh_CN.qm)
|
||||||
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts FluentUI_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts fluentui_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||||
execute_process(COMMAND ${QT_LRELEASE} FluentUI_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
execute_process(COMMAND ${QT_LRELEASE} fluentui_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm)
|
file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm)
|
||||||
|
@ -24,7 +24,7 @@ void FluApp::init(QObject *target,QLocale locale){
|
|||||||
qApp->installTranslator(_translator);
|
qApp->installTranslator(_translator);
|
||||||
const QStringList uiLanguages = _locale.uiLanguages();
|
const QStringList uiLanguages = _locale.uiLanguages();
|
||||||
for (const QString &name : uiLanguages) {
|
for (const QString &name : uiLanguages) {
|
||||||
const QString baseName = "FluentUI_" + QLocale(name).name();
|
const QString baseName = "fluentui_" + QLocale(name).name();
|
||||||
if (_translator->load(":/qt/qml/FluentUI/i18n/"+ baseName)) {
|
if (_translator->load(":/qt/qml/FluentUI/i18n/"+ baseName)) {
|
||||||
_engine->retranslate();
|
_engine->retranslate();
|
||||||
break;
|
break;
|
||||||
|
@ -98,8 +98,8 @@
|
|||||||
<file>FluentUI/Image/btn_min_pushed.png</file>
|
<file>FluentUI/Image/btn_min_pushed.png</file>
|
||||||
<file>FluentUI/Controls/FluImageButton.qml</file>
|
<file>FluentUI/Controls/FluImageButton.qml</file>
|
||||||
<file>FluentUI/Controls/FluSplitLayout.qml</file>
|
<file>FluentUI/Controls/FluSplitLayout.qml</file>
|
||||||
<file>FluentUI/i18n/fluentuiplugin_en_US.qm</file>
|
|
||||||
<file>FluentUI/i18n/fluentuiplugin_zh_CN.qm</file>
|
|
||||||
<file>FluentUI/Controls/FluWindowDialog.qml</file>
|
<file>FluentUI/Controls/FluWindowDialog.qml</file>
|
||||||
|
<file>FluentUI/i18n/fluentui_en_US.qm</file>
|
||||||
|
<file>FluentUI/i18n/fluentui_zh_CN.qm</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
Reference in New Issue
Block a user