From ff68491baf5ed0106292ead6e0607239415dd9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sun, 24 Mar 2024 10:27:16 +0800 Subject: [PATCH] update --- src/CMakeLists.txt | 12 ++++++------ src/FluApp.cpp | 2 +- src/Qt5/imports/fluentui.qrc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b237c175..8d789d51 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,13 +46,13 @@ endif() #国际化 find_program(QT_LUPDATE NAMES lupdate) find_program(QT_LRELEASE NAMES lrelease) -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_LRELEASE} FluentUI_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +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_LRELEASE} fluentui_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) endif () -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_LRELEASE} FluentUI_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +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_LRELEASE} fluentui_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) endif () file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm) diff --git a/src/FluApp.cpp b/src/FluApp.cpp index abdc2b76..6390b842 100644 --- a/src/FluApp.cpp +++ b/src/FluApp.cpp @@ -24,7 +24,7 @@ void FluApp::init(QObject *target,QLocale locale){ qApp->installTranslator(_translator); const QStringList uiLanguages = _locale.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)) { _engine->retranslate(); break; diff --git a/src/Qt5/imports/fluentui.qrc b/src/Qt5/imports/fluentui.qrc index 10810130..8f7be040 100644 --- a/src/Qt5/imports/fluentui.qrc +++ b/src/Qt5/imports/fluentui.qrc @@ -98,8 +98,8 @@ FluentUI/Image/btn_min_pushed.png FluentUI/Controls/FluImageButton.qml FluentUI/Controls/FluSplitLayout.qml - FluentUI/i18n/fluentuiplugin_en_US.qm - FluentUI/i18n/fluentuiplugin_zh_CN.qm FluentUI/Controls/FluWindowDialog.qml + FluentUI/i18n/fluentui_en_US.qm + FluentUI/i18n/fluentui_zh_CN.qm