Added Chinese translation by bluesky404.

This commit is contained in:
WrinklyNinja
2014-02-04 20:27:24 +00:00
parent f2410b0d04
commit 9bc65c6459
9 changed files with 236 additions and 308 deletions
+2
View File
@@ -438,6 +438,8 @@ both get displayed as
<tr><td>English<td>eng
<tr><td>Spanish<td>spa
<tr><td>Russian<td>rus
<tr><td>French<td>fra
<tr><td>Chinese<td>zho
</table>
<h2 id="license">License</h2>
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -77,7 +77,8 @@ const unsigned int boss_lang_any = boss::g_lang_any;
const unsigned int boss_lang_english = boss::g_lang_english;
const unsigned int boss_lang_spanish = boss::g_lang_spanish;
const unsigned int boss_lang_russian = boss::g_lang_russian;
const unsigned int boss_lang_french = boss::g_lang_french; ///< Tells the API to preferentially select French messages.
const unsigned int boss_lang_french = boss::g_lang_french;
const unsigned int boss_lang_chinese = boss::g_lang_chinese;
// BOSS cleanliness codes.
const unsigned int boss_needs_cleaning_no = 0;
+1
View File
@@ -174,6 +174,7 @@ BOSS_API extern const unsigned int boss_lang_english; ///< Tells the API to pre
BOSS_API extern const unsigned int boss_lang_spanish; ///< Tells the API to preferentially select Spanish messages.
BOSS_API extern const unsigned int boss_lang_russian; ///< Tells the API to preferentially select Russian messages.
BOSS_API extern const unsigned int boss_lang_french; ///< Tells the API to preferentially select French messages.
BOSS_API extern const unsigned int boss_lang_chinese; ///< Tells the API to preferentially select Chinese messages.
///@}
/*********************************//**
+1
View File
@@ -45,6 +45,7 @@ namespace boss {
const unsigned int g_lang_spanish = 2;
const unsigned int g_lang_russian = 3;
const unsigned int g_lang_french = 4;
const unsigned int g_lang_chinese = 5;
//Version numbers.
const unsigned int g_version_major = 3;
+1
View File
@@ -46,6 +46,7 @@ namespace boss {
extern const unsigned int g_lang_spanish;
extern const unsigned int g_lang_russian;
extern const unsigned int g_lang_french;
extern const unsigned int g_lang_chinese;
//Version numbers.
extern const unsigned int g_version_major;
+8 -1
View File
@@ -233,7 +233,7 @@ namespace boss {
}
Language::Language(const unsigned int code) {
Construct(_code);
Construct(code);
}
Language::Language(const std::string& nameOrISOCode) {
@@ -245,6 +245,8 @@ namespace boss {
Construct(g_lang_russian);
else if (nameOrISOCode == "Français" || nameOrISOCode == "fra")
Construct(g_lang_french);
else if (nameOrISOCode == "简体中文" || nameOrISOCode == "zho")
Construct(g_lang_chinese);
else
Construct(g_lang_any);
}
@@ -276,6 +278,11 @@ namespace boss {
_isoCode = "fra";
_locale = "fr.UTF-8";
}
else if (_code == g_lang_chinese) {
_name = "简体中文";
_isoCode = "zho";
_locale = "zh.UTF-8";
}
}
unsigned int Language::Code() const {
+1
View File
@@ -83,6 +83,7 @@ namespace boss {
vec.push_back(Language(g_lang_spanish).Name());
vec.push_back(Language(g_lang_russian).Name());
vec.push_back(Language(g_lang_french).Name());
vec.push_back(Language(g_lang_chinese).Name());
return vec;
}
private:
+2
View File
@@ -247,6 +247,8 @@ bool BossGUI::OnInit() {
wxLang = wxLANGUAGE_RUSSIAN;
else if (lang.Code() == boss::g_lang_french)
wxLang = wxLANGUAGE_FRENCH;
else if (lang.Code() == boss::g_lang_chinese)
wxLang = wxLANGUAGE_CHINESE;
}
//Boost.Locale initialisation: Specify location of language dictionaries.