- enhancement: Simplified chinese translations for encoding names.

This commit is contained in:
Roy Qu 2023-01-25 10:51:59 +08:00
parent 35e3c9af8d
commit 48788a189b
6 changed files with 466 additions and 323 deletions

View File

@ -17,6 +17,7 @@ Red Panda C++ Version 2.10
- fix: Infos in the status bar not correctly updated when editor closed. - fix: Infos in the status bar not correctly updated when editor closed.
- change: Project's encoding shouldn't be set to "auto detect" - change: Project's encoding shouldn't be set to "auto detect"
- fix: Can't correctly set project file's encoding back to 'UTF-8'/'ANSI' in the project options dialog/files setting page. - fix: Can't correctly set project file's encoding back to 'UTF-8'/'ANSI' in the project options dialog/files setting page.
- enhancement: Simplified chinese translations for encoding names.
Red Panda C++ Version 2.9 Red Panda C++ Version 2.9

View File

@ -451,6 +451,9 @@ TRANSLATIONS += \
translations/RedPandaIDE_zh_TW.ts \ translations/RedPandaIDE_zh_TW.ts \
translations/RedPandaIDE_pt_BR.ts translations/RedPandaIDE_pt_BR.ts
EXTRA_TRANSLATIONS += \
../libs/redpanda_qt_utils/qt_utils_zh_CN.ts
#CONFIG += lrelease embed_translations #CONFIG += lrelease embed_translations
win32: { win32: {

View File

@ -289,7 +289,7 @@ int main(int argc, char *argv[])
} }
} }
//Translation must be loaded first //Translation must be loaded first
QTranslator trans,transQt; QTranslator trans,transQt,transUtils;
bool firstRun; bool firstRun;
QString settingFilename = getSettingFilename(QString(), firstRun); QString settingFilename = getSettingFilename(QString(), firstRun);
if (!isGreenEdition()) { if (!isGreenEdition()) {
@ -308,6 +308,9 @@ int main(int argc, char *argv[])
if (trans.load("RedPandaIDE_"+language,":/i18n/")) { if (trans.load("RedPandaIDE_"+language,":/i18n/")) {
app.installTranslator(&trans); app.installTranslator(&trans);
} }
if (transUtils.load("qt_utils_"+language,":/i18n/")) {
app.installTranslator(&transUtils);
}
if (transQt.load("qt_"+language,":/translations")) { if (transQt.load("qt_"+language,":/translations")) {
app.installTranslator(&transQt); app.installTranslator(&transQt);
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>CharsetInfoManager</name>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="116"/>
<location filename="qt_utils/charsetinfo.cpp" line="159"/>
<location filename="qt_utils/charsetinfo.cpp" line="223"/>
<source>Arabic</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="117"/>
<location filename="qt_utils/charsetinfo.cpp" line="131"/>
<location filename="qt_utils/charsetinfo.cpp" line="156"/>
<location filename="qt_utils/charsetinfo.cpp" line="224"/>
<source>Greek</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="118"/>
<location filename="qt_utils/charsetinfo.cpp" line="160"/>
<location filename="qt_utils/charsetinfo.cpp" line="221"/>
<location filename="qt_utils/charsetinfo.cpp" line="227"/>
<source>Baltic</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="119"/>
<location filename="qt_utils/charsetinfo.cpp" line="123"/>
<location filename="qt_utils/charsetinfo.cpp" line="124"/>
<location filename="qt_utils/charsetinfo.cpp" line="127"/>
<location filename="qt_utils/charsetinfo.cpp" line="155"/>
<location filename="qt_utils/charsetinfo.cpp" line="218"/>
<location filename="qt_utils/charsetinfo.cpp" line="229"/>
<source>Western Europe</source>
<translation>西</translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="120"/>
<location filename="qt_utils/charsetinfo.cpp" line="153"/>
<source>Central Europe</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="121"/>
<location filename="qt_utils/charsetinfo.cpp" line="130"/>
<location filename="qt_utils/charsetinfo.cpp" line="154"/>
<location filename="qt_utils/charsetinfo.cpp" line="163"/>
<location filename="qt_utils/charsetinfo.cpp" line="207"/>
<location filename="qt_utils/charsetinfo.cpp" line="217"/>
<location filename="qt_utils/charsetinfo.cpp" line="222"/>
<source>Cyrillic</source>
<translation>西</translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="122"/>
<location filename="qt_utils/charsetinfo.cpp" line="157"/>
<location filename="qt_utils/charsetinfo.cpp" line="220"/>
<location filename="qt_utils/charsetinfo.cpp" line="226"/>
<source>Turkish</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="125"/>
<location filename="qt_utils/charsetinfo.cpp" line="129"/>
<source>Northern Europe</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="126"/>
<location filename="qt_utils/charsetinfo.cpp" line="158"/>
<location filename="qt_utils/charsetinfo.cpp" line="225"/>
<source>Hebrew</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="133"/>
<source>Thai</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="135"/>
<location filename="qt_utils/charsetinfo.cpp" line="245"/>
<source>Japanese</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="136"/>
<location filename="qt_utils/charsetinfo.cpp" line="138"/>
<location filename="qt_utils/charsetinfo.cpp" line="250"/>
<source>Chinese</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="137"/>
<location filename="qt_utils/charsetinfo.cpp" line="247"/>
<source>Korean</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="151"/>
<location filename="qt_utils/charsetinfo.cpp" line="179"/>
<location filename="qt_utils/charsetinfo.cpp" line="262"/>
<source>Unicode</source>
<translation>Unicode</translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="161"/>
<source>Vietnamese</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="219"/>
<source>Eastern Europe</source>
<translation></translation>
</message>
<message>
<location filename="qt_utils/charsetinfo.cpp" line="228"/>
<source>Celtic</source>
<translation></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="qt_utils/utils.cpp" line="56"/>
<source>Index %1 out of range</source>
<translation>%1</translation>
</message>
</context>
</TS>

View File

@ -25,3 +25,6 @@ SOURCES += qt_utils/utils.cpp \
HEADERS += qt_utils/utils.h \ HEADERS += qt_utils/utils.h \
qt_utils/charsetinfo.h qt_utils/charsetinfo.h
TRANSLATIONS += \
qt_utils_zh_CN.ts