1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Can now load long locale named qt translation file. (ex. qt_zh_CN.qm)

- patch by Mladen Pejaković, see #128
- also updated Polish and Dutch translations
This commit is contained in:
nowrep 2012-01-06 14:34:12 +01:00
parent d3ea77f8f1
commit 890e8f0cdf
6 changed files with 15 additions and 11 deletions

Binary file not shown.

Binary file not shown.

BIN
bin/locale/qt_zh_CN.qm Normal file

Binary file not shown.

View File

@ -484,6 +484,7 @@ void MainApplication::translateApp()
settings.beginGroup("Language");
QString file = settings.value("language", locale.name() + ".qm").toString();
QString shortLoc = file.left(2);
QString longLoc = file.left(5);
if (file == "" || !QFile::exists(TRANSLATIONSDIR + file)) {
return;
@ -493,7 +494,10 @@ void MainApplication::translateApp()
app->load(TRANSLATIONSDIR + file);
QTranslator* sys = new QTranslator();
if (QFile::exists(TRANSLATIONSDIR + "qt_" + shortLoc + ".qm")) {
if (QFile::exists(TRANSLATIONSDIR + "qt_" + longLoc + ".qm")) {
sys->load(TRANSLATIONSDIR + "qt_" + longLoc + ".qm");
}
else if (QFile::exists(TRANSLATIONSDIR + "qt_" + shortLoc + ".qm")) {
sys->load(TRANSLATIONSDIR + "qt_" + shortLoc + ".qm");
}

View File

@ -3829,7 +3829,7 @@ Na het toevoegen of verwijderen van paden, is het noodzakelijk om de browser te
<location filename="../src/webview/siteinfowidget.cpp" line="51"/>
<location filename="../src/webview/siteinfowidget.cpp" line="70"/>
<source>This is your &lt;b&gt;%1&lt;/b&gt; visit of this site.</source>
<translation type="unfinished"></translation>
<translation>Dit is uw &lt;b&gt;%1&lt;/b&gt; bezoek aan deze site.</translation>
</message>
<message>
<location filename="../src/webview/siteinfowidget.cpp" line="55"/>
@ -4330,42 +4330,42 @@ Na het toevoegen of verwijderen van paden, is het noodzakelijk om de browser te
<message>
<location filename="../src/webview/webview.cpp" line="520"/>
<source>This frame</source>
<translation type="unfinished"></translation>
<translation>Dit frame</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="521"/>
<source>Show &amp;only this frame</source>
<translation type="unfinished"></translation>
<translation>Toon &amp;alleen dit frame</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="522"/>
<source>Show this frame in new &amp;tab</source>
<translation type="unfinished"></translation>
<translation>Toon dit frame in nieuw &amp;tabblad</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="525"/>
<source>Print frame</source>
<translation type="unfinished"></translation>
<translation>Druk frame af</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="527"/>
<source>Zoom &amp;in</source>
<translation type="unfinished"></translation>
<translation>Zoom &amp;in</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="528"/>
<source>&amp;Zoom out</source>
<translation type="unfinished"></translation>
<translation>&amp;Zoom uit</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="529"/>
<source>Reset</source>
<translation type="unfinished">Herstart</translation>
<translation>Zet terug</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="531"/>
<source>Show so&amp;urce of frame</source>
<translation type="unfinished"></translation>
<translation>Toon &amp;bron van frame</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="548"/>

View File

@ -2050,7 +2050,7 @@
<location filename="../src/preferences/preferences.ui" line="111"/>
<source>Tabs</source>
<translation>Karty</translation>
</message&gt;
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="262"/>
<location filename="../src/preferences/preferences.ui" line="410"/>