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:
defnax 2009-04-20 13:24:56 +00:00
parent 6d65bd0740
commit cfbfb9b148
5 changed files with 14909 additions and 16 deletions

View File

@ -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

View File

@ -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>

View File

@ -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;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff