mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added support for CN and TW languages
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6d65bd0740
commit
cfbfb9b148
@ -1,4 +1,4 @@
|
||||
CONFIG += qt gui uic qrc resources uitools debug
|
||||
CONFIG += qt gui uic qrc resources uitools release
|
||||
QT += network xml script
|
||||
TEMPLATE = app
|
||||
TARGET = RetroShare
|
||||
@ -493,7 +493,9 @@ TRANSLATIONS += \
|
||||
lang/retroshare_dk.ts \
|
||||
lang/retroshare_sl.ts \
|
||||
lang/retroshare_sr.ts \
|
||||
lang/retroshare_se.ts
|
||||
lang/retroshare_se.ts \
|
||||
lang/retroshare_zh_CN.ts \
|
||||
lang/retroshare_zh_TW.ts
|
||||
|
||||
# To compile for turtle hopping. I'm using this flag to avoid conflict while developping.
|
||||
# Just do a
|
||||
|
@ -21,6 +21,8 @@
|
||||
<file alias="bg">retroshare_bg.qm</file>
|
||||
<file alias="sr">retroshare_sr.qm</file>
|
||||
<file alias="se">retroshare_se.qm</file>
|
||||
<file alias="zh_CN">retroshare_zh_CN.qm</file>
|
||||
<file alias="zh_TW">retroshare_zh_TW.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2006-2007, crypton
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2006-2007, crypton
|
||||
* Copyright (c) 2006, Matt Edman, Justin Hipple
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -57,10 +57,10 @@ LanguageSupport::initialize()
|
||||
_languages.insert("se", "Swedish");
|
||||
_languages.insert("tr", "Turkish");
|
||||
_languages.insert("fi", "suomi");
|
||||
/****
|
||||
_languages.insert("zh-cn",
|
||||
QString::fromUtf8("\347\256\200\344\275\223\345\255\227"));
|
||||
***/
|
||||
_languages.insert("zh_CN",
|
||||
QString::fromUtf8("\347\256\200\344\275\223\345\255\227"));
|
||||
_languages.insert("zh_TW",
|
||||
QString::fromUtf8("\347\260\241\351\253\224\345\255\227"));
|
||||
|
||||
}
|
||||
|
||||
@ -68,14 +68,13 @@ LanguageSupport::initialize()
|
||||
QString
|
||||
LanguageSupport::defaultLanguageCode()
|
||||
{
|
||||
QString localeName = QLocale::system().name();
|
||||
QString language = localeName.mid(0, localeName.indexOf("_"));
|
||||
if (language == "zh") {
|
||||
language += "-" + localeName.mid(localeName.indexOf("_")+1).toLower();
|
||||
}
|
||||
if (!isValidLanguageCode(language)) {
|
||||
QString language = QLocale::system().name();
|
||||
|
||||
if (language != "zh_CN" && language != "zh_TW")
|
||||
language = language.mid(0, language.indexOf("_"));
|
||||
if (!isValidLanguageCode(language))
|
||||
language = "en";
|
||||
}
|
||||
|
||||
return language;
|
||||
}
|
||||
|
||||
|
7445
retroshare-gui/src/lang/retroshare_zh_CN.ts
Normal file
7445
retroshare-gui/src/lang/retroshare_zh_CN.ts
Normal file
File diff suppressed because it is too large
Load Diff
7445
retroshare-gui/src/lang/retroshare_zh_TW.ts
Normal file
7445
retroshare-gui/src/lang/retroshare_zh_TW.ts
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user