moved the translator init code earlier; added some translation support for the code of r2517 and r2907; updated some Chinese translation.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#LANG:Chinese
|
||||
#Wagic 0.12.1 简体中文语言文件 by linshier and Phantom
|
||||
#Wagic 0.14.1 简体中文语言文件 by linshier and Phantom
|
||||
|
||||
#Note:
|
||||
# - Limitation: Special characters that are not in the limited GB2312
|
||||
@@ -118,7 +118,7 @@ NO DECK AVAILABLE,=û
|
||||
PRESS CIRCLE TO GO TO THE DECK EDITOR!=按○键返回套牌编辑界面!
|
||||
|
||||
# Opponent deck menu:
|
||||
Choose Your Opponent=选择对手
|
||||
Choose Opponent=选择对手
|
||||
##(easy)=(简单)
|
||||
##(hard)=(困难)
|
||||
Random=随机
|
||||
@@ -126,6 +126,7 @@ Random=
|
||||
LOADING DECKS=加载套牌
|
||||
Can you play against yourself?=你能击败你自己吗?
|
||||
Choose a different player deck=重新选择一个套牌进行游戏
|
||||
Detailed Info=详细信息
|
||||
|
||||
|
||||
##########################
|
||||
@@ -164,8 +165,9 @@ Cleanup=
|
||||
|
||||
# Interrupts:
|
||||
Interrupt?=是否获得优先权?
|
||||
X Interrupt - 0 No - [] No to All=按×键确认-○键让过-□键让过所有
|
||||
X Interrupt - 0 No=按×键确认-○键让过
|
||||
: Interrupt=获得优先权
|
||||
: No=让过
|
||||
: No To All=让过所有
|
||||
|
||||
# Stack:
|
||||
Deals %i damage to=造成%i点伤害->
|
||||
@@ -221,6 +223,7 @@ Doesnotuntap=
|
||||
Double strike=连击
|
||||
Exalted=颂威
|
||||
First strike=先攻
|
||||
Flanking=侧面攻击
|
||||
Flying=飞行
|
||||
Foresthome=树林居者
|
||||
Forestwalk=树林行者
|
||||
@@ -260,6 +263,7 @@ Retrace=
|
||||
Shadow=次元幽影
|
||||
Shroud=帷幕
|
||||
Storm=风暴
|
||||
Sunburst=晖映
|
||||
Swamphome=沼泽居者
|
||||
Swampwalk=沼泽行者
|
||||
Trample=践踏
|
||||
@@ -632,13 +636,34 @@ Victories against AI:=
|
||||
Games played: %i=游戏场数:
|
||||
Victory ratio: %i%%=胜率:%i%%
|
||||
|
||||
# Statistics - menu:
|
||||
------- Deck Summary -----= ----- 套牌数据摘要 -----
|
||||
Cards: =总卡牌:
|
||||
Creatures: =生物:
|
||||
Enchantments: = 结界:
|
||||
Instants: =瞬间:
|
||||
Sorceries: = 法术:
|
||||
Lands: =地:
|
||||
A: =总
|
||||
G: =绿
|
||||
R: =红
|
||||
U: =蓝
|
||||
B: =黑
|
||||
W: =白
|
||||
--- Card color count --- = ----- 卡牌颜色费用 -----
|
||||
--- Average Cost --- = ----- 卡牌平均费用 -----
|
||||
Creature: =生物:
|
||||
Mana: =非地:
|
||||
Spell: =咒语:
|
||||
|
||||
|
||||
##########################
|
||||
# SHOP #
|
||||
##########################
|
||||
|
||||
credits: %i=积分点数:%i
|
||||
[]:other cards=按□键查看其他卡牌
|
||||
##credits: %i=积分点数:%i
|
||||
Credits: =积分点数:
|
||||
: Other cards=查看其他卡牌
|
||||
%s & %s (15 Cards)=补充包%s+%s(共15张)
|
||||
%s Booster (15 Cards)=补充包%s(共15张)
|
||||
%s (%i)=%s(限%i张)
|
||||
@@ -765,6 +790,8 @@ Minimum Card Grade=
|
||||
-3: Unsupported= -3:不支持的
|
||||
-4: Dangerous (risk of crash)= -4:危险的
|
||||
Phase Skip Automation=回合阶段自动跳过
|
||||
First Turn Player=第一回合先手
|
||||
Opponent=对手
|
||||
Off=关
|
||||
On=开
|
||||
|
||||
@@ -983,6 +1010,7 @@ Elemental=Ԫ
|
||||
Elephant=象
|
||||
Elf=妖精
|
||||
Elk=麋鹿
|
||||
Eight-and-a-half-tails=八尾半
|
||||
Eye=眼
|
||||
Faerie=仙灵
|
||||
Ferret=雪貂
|
||||
@@ -999,12 +1027,14 @@ Goblin=
|
||||
Golem=魔像
|
||||
Gorgon=蛇发妖
|
||||
Graveborn=墓生兽
|
||||
Gremlin=怪灵
|
||||
Griffin=狮鹫
|
||||
Hag=巫婆
|
||||
Harpy=哈痞
|
||||
Hellion=地狱兽
|
||||
Hippo=河马
|
||||
Homarid=荷马利
|
||||
Homnuculus=造妖
|
||||
Homunculus=造妖
|
||||
Horror=惊惧兽
|
||||
Horse=马
|
||||
@@ -1053,6 +1083,7 @@ Ninja=
|
||||
Noggle=诺格
|
||||
Nomad=游牧人
|
||||
Octopus=章鱼
|
||||
Oculus=眼球妖
|
||||
Ogre=食人魔
|
||||
Ooze=流浆
|
||||
Orb=法球
|
||||
|
||||
@@ -21,9 +21,10 @@ namespace
|
||||
{
|
||||
float kGamepadIconSize = 0.5f;
|
||||
|
||||
const std::string kInterruptString(": Interrupt");
|
||||
const std::string kNoString(": No");
|
||||
const std::string kNoToAllString(": No To All");
|
||||
std::string kInterruptMessageString("Interrupt?");
|
||||
std::string kInterruptString(": Interrupt");
|
||||
std::string kNoString(": No");
|
||||
std::string kNoToAllString(": No To All");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -636,6 +637,12 @@ ActionStack::ActionStack(GameObserver* game)
|
||||
pspIcons[i] = WResourceManager::Instance()->RetrieveQuad("iconspsp.png", (float) i * 32, 0, 32, 32, stream.str(), RETRIEVE_MANAGE);
|
||||
pspIcons[i]->SetHotSpot(16, 16);
|
||||
}
|
||||
|
||||
// fix for translation.
|
||||
kInterruptMessageString = _(kInterruptMessageString);
|
||||
kInterruptString = _(kInterruptString);
|
||||
kNoString = _(kNoString);
|
||||
kNoToAllString = _(kNoToAllString);
|
||||
}
|
||||
|
||||
int ActionStack::has(MTGAbility * ability)
|
||||
@@ -1101,9 +1108,9 @@ void ActionStack::Render()
|
||||
// Mootpoint 01/12/2011: draw the interrupt text first, at the top. Offset the rest of the
|
||||
// unresolved stack effects down so that they don't collide with the interrupt text.
|
||||
if (options[Options::INTERRUPT_SECONDS].number == 0)
|
||||
stream << "Interrupt?";
|
||||
stream << kInterruptMessageString;
|
||||
else
|
||||
stream << "Interrupt? " << static_cast<int>(timer);
|
||||
stream << kInterruptMessageString << " " << static_cast<int>(timer);
|
||||
|
||||
mFont->DrawString(stream.str(), x0 + 5, currenty);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "JTypes.h"
|
||||
#include "GameApp.h"
|
||||
#include <iomanip>
|
||||
#include "Translate.h"
|
||||
|
||||
DeckEditorMenu::DeckEditorMenu(int id, JGuiListener* listener, int fontId, const char * _title, DeckDataWrapper *_selectedDeck, StatsWrapper *stats) :
|
||||
DeckMenu(id, listener, fontId, _title), selectedDeck(_selectedDeck), stw(stats)
|
||||
@@ -64,31 +65,31 @@ void DeckEditorMenu::drawDeckStatistics()
|
||||
ostringstream deckStatsString;
|
||||
|
||||
deckStatsString
|
||||
<< "------- Deck Summary -----" << endl
|
||||
<< "Cards: "<< stw->cardCount << endl
|
||||
<< "Creatures: "<< setw(2) << stw->countCreatures
|
||||
<< " Enchantments: " << stw->countEnchantments << endl
|
||||
<< "Instants: " << setw(4) << stw->countInstants
|
||||
<< " Sorceries: " << setw(2) << stw->countSorceries << endl
|
||||
<< "Lands: "
|
||||
<< "A: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_ARTIFACT ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_ARTIFACT ] << " "
|
||||
<< "G: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_GREEN ] + stw->countLandsPerColor[ Constants::MTG_COLOR_GREEN ] << " "
|
||||
<< "R: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_RED ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_RED ] << " "
|
||||
<< "U: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_BLUE ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_BLUE ] << " "
|
||||
<< "B: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_BLACK ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_BLACK ] << " "
|
||||
<< "W: " << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_WHITE ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_WHITE ] << endl
|
||||
<< " --- Card color count --- " << endl
|
||||
<< "A: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_ARTIFACT) << " "
|
||||
<< "G: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_GREEN) << " "
|
||||
<< "U: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_BLUE) << " "
|
||||
<< "R: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_RED) << " "
|
||||
<< "B: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_BLACK) << " "
|
||||
<< "W: " << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_WHITE) << endl
|
||||
<< _("------- Deck Summary -----") << endl
|
||||
<< _("Cards: ") << stw->cardCount << endl
|
||||
<< _("Creatures: ") << setw(2) << stw->countCreatures
|
||||
<< _(" Enchantments: ") << stw->countEnchantments << endl
|
||||
<< _("Instants: ") << setw(4) << stw->countInstants
|
||||
<< _(" Sorceries: ") << setw(2) << stw->countSorceries << endl
|
||||
<< _("Lands: ")
|
||||
<< _("A: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_ARTIFACT ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_ARTIFACT ] << " "
|
||||
<< _("G: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_GREEN ] + stw->countLandsPerColor[ Constants::MTG_COLOR_GREEN ] << " "
|
||||
<< _("R: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_RED ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_RED ] << " "
|
||||
<< _("U: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_BLUE ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_BLUE ] << " "
|
||||
<< _("B: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_BLACK ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_BLACK ] << " "
|
||||
<< _("W: ") << setw(2) << left << stw->countLandsPerColor[ Constants::MTG_COLOR_WHITE ] + stw->countBasicLandsPerColor[ Constants::MTG_COLOR_WHITE ] << endl
|
||||
<< _(" --- Card color count --- ") << endl
|
||||
<< _("A: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_ARTIFACT) << " "
|
||||
<< _("G: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_GREEN) << " "
|
||||
<< _("U: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_BLUE) << " "
|
||||
<< _("R: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_RED) << " "
|
||||
<< _("B: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_BLACK) << " "
|
||||
<< _("W: ") << setw(2) << left << selectedDeck->getCount(Constants::MTG_COLOR_WHITE) << endl
|
||||
|
||||
<< " --- Average Cost --- " << endl
|
||||
<< "Creature: "<< setprecision(2) << stw->avgCreatureCost << endl
|
||||
<< "Mana: " << setprecision(2) << stw->avgManaCost << " "
|
||||
<< "Spell: " << setprecision(2) << stw->avgSpellCost << endl;
|
||||
<< _(" --- Average Cost --- ") << endl
|
||||
<< _("Creature: ") << setprecision(2) << stw->avgCreatureCost << endl
|
||||
<< _("Mana: ") << setprecision(2) << stw->avgManaCost << " "
|
||||
<< _("Spell: ") << setprecision(2) << stw->avgSpellCost << endl;
|
||||
|
||||
WFont *mainFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
|
||||
mainFont->DrawString(deckStatsString.str().c_str(), descX, descY + 25);
|
||||
|
||||
@@ -200,7 +200,7 @@ void DeckMenu::Render()
|
||||
if (showDetailsScreen())
|
||||
{
|
||||
float pspIconsSize = 0.5;
|
||||
const string detailedInfoString = "Detailed Info";
|
||||
const string detailedInfoString = _("Detailed Info");
|
||||
float stringWidth = mainFont->GetStringWidth(detailedInfoString.c_str());
|
||||
float boxStartX = detailedInfoBoxX - stringWidth / 2;
|
||||
DWORD currentColor = mainFont->GetColor();
|
||||
|
||||
@@ -181,6 +181,8 @@ void GameApp::Create()
|
||||
string lang = options[Options::LANG].str;
|
||||
std::transform(lang.begin(), lang.end(), lang.begin(), ::tolower);
|
||||
WResourceManager::Instance()->InitFonts(lang);
|
||||
Translator::GetInstance()->init();
|
||||
// The translator is ready now.
|
||||
|
||||
LOG("--Loading various textures");
|
||||
WResourceManager::Instance()->RetrieveTexture("phasebar.png", RETRIEVE_MANAGE);
|
||||
|
||||
@@ -465,7 +465,8 @@ void GameStateMenu::Update(float dt)
|
||||
if (primitivesLoadCounter == -1)
|
||||
{
|
||||
listPrimitives();
|
||||
Translator::GetInstance()->init();
|
||||
// Move translator init to GameApp::Create().
|
||||
// Translator::GetInstance()->init();
|
||||
}
|
||||
if (primitivesLoadCounter < (int) (primitives.size()))
|
||||
{
|
||||
|
||||
@@ -29,7 +29,8 @@ float GameStateShop::_y4[] = { 169, 188, 250, 182, 182, 168, 220, 208, 198, 259,
|
||||
namespace
|
||||
{
|
||||
float kGamepadIconSize = 0.5f;
|
||||
const std::string kOtherCardsString(": Other cards");
|
||||
std::string kOtherCardsString(": Other cards");
|
||||
std::string kCreditsString("Credits: ");
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +75,9 @@ GameStateShop::GameStateShop(GameApp* parent) :
|
||||
mCounts[i] = 0;
|
||||
}
|
||||
mTouched = false;
|
||||
|
||||
kOtherCardsString = _(kOtherCardsString);
|
||||
kCreditsString = _(kCreditsString);
|
||||
}
|
||||
|
||||
GameStateShop::~GameStateShop()
|
||||
@@ -731,7 +735,7 @@ void GameStateShop::Render()
|
||||
//Render the info bar
|
||||
r->FillRect(0, SCREEN_HEIGHT - 17, SCREEN_WIDTH, 17, ARGB(128,0,0,0));
|
||||
std::ostringstream stream;
|
||||
stream << "Credits: " << playerdata->credits;
|
||||
stream << kCreditsString << playerdata->credits;
|
||||
mFont->SetColor(ARGB(255,255,255,255));
|
||||
mFont->DrawString(stream.str(), 5, SCREEN_HEIGHT - 14);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user