mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
[companion] Add zh_CN Chinese translation (fix #4179)
Fix lupdate working dir
This commit is contained in:
parent
bcdc4fef88
commit
eb4508e12d
4 changed files with 11968 additions and 2 deletions
|
@ -231,7 +231,7 @@ endif()
|
|||
include_directories(${CMAKE_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
||||
set(LANGUAGES he pl pt ru de fr es it sv cs fi nl)
|
||||
set(LANGUAGES he pl pt ru de fr es it sv cs fi nl cn)
|
||||
foreach(language ${LANGUAGES})
|
||||
set(companion_TS ${companion_TS} translations/companion_${language}.ts)
|
||||
endforeach(language)
|
||||
|
@ -415,7 +415,7 @@ endif()
|
|||
|
||||
if(LUPDATE_FOUND)
|
||||
add_custom_target(translations
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${COMPANION_SRC_DIRECTORY}
|
||||
COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS}
|
||||
)
|
||||
else()
|
||||
|
|
|
@ -1105,6 +1105,7 @@ void MainWindow::createActions()
|
|||
swedishLangAct = addAct( langAlignGroup, tr("Swedish"), tr("Use Swedish in menus"), SLOT(setSELanguage()));
|
||||
// russianLangAct = addAct( langAlignGroup, tr("Russian"), tr("Use Russian in menus"), SLOT(setRULanguage()));
|
||||
// dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage()));
|
||||
chineseLangAct = addAct( langAlignGroup, tr("Chinese"), tr("Use Chinese in menus"), SLOT(setCNLanguage()));
|
||||
|
||||
aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about()));
|
||||
printAct = addAct("print.png", tr("Print..."), tr("Print current model"), QKeySequence::Print, SLOT(print()));
|
||||
|
@ -1185,6 +1186,7 @@ void MainWindow::createMenus()
|
|||
languageMenu->addAction(swedishLangAct);
|
||||
// languageMenu->addAction(russianLangAct);
|
||||
// languageMenu->addAction(dutchLangAct);
|
||||
languageMenu->addAction(chineseLangAct);
|
||||
|
||||
settingsMenu->addMenu(themeMenu);
|
||||
themeMenu->addAction(classicThemeAct);
|
||||
|
@ -1439,6 +1441,8 @@ void MainWindow::updateLanguageActions()
|
|||
// russianLangAct->setChecked(true);
|
||||
// else if (langId=="nl_NL")
|
||||
// dutchLangAct->setChecked(true);
|
||||
else if (langId=="zh_CN")
|
||||
chineseLangAct->setChecked(true);
|
||||
}
|
||||
|
||||
void MainWindow::updateIconThemeActions()
|
||||
|
|
|
@ -80,6 +80,7 @@ class MainWindow : public QMainWindow
|
|||
void setRULanguage() { setLanguage("ru_RU"); };
|
||||
void setSELanguage() { setLanguage("sv_SE"); };
|
||||
void setNLLanguage() { setLanguage("nl_NL"); };
|
||||
void setCNLanguage() { setLanguage("zh_CN"); };
|
||||
|
||||
void setTheme(int index);
|
||||
void setClassicTheme() {setTheme(0);};
|
||||
|
@ -256,6 +257,7 @@ class MainWindow : public QMainWindow
|
|||
QAction *swedishLangAct;
|
||||
// QAction *russianLangAct;
|
||||
// QAction *dutchLangAct;
|
||||
QAction *chineseLangAct;
|
||||
|
||||
QAction *openDocURLAct;
|
||||
};
|
||||
|
|
11960
companion/src/translations/companion_cn.ts
Normal file
11960
companion/src/translations/companion_cn.ts
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue