diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-03 12:35:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-03 12:51:43 +0300 |
commit | a7c723b681ddefdcaa84cb9b16681c65818d7110 (patch) | |
tree | 3c7100a90db00c3eacc41977cdb5bbae99e6ca40 /src/gui/widgets | |
parent | 04fbf07c41bf78dea11aa9b7098c80f0da3801e3 (diff) | |
download | mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.gz mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.bz2 mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.tar.xz mv-a7c723b681ddefdcaa84cb9b16681c65818d7110.zip |
add comments for translators
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/battletab.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/chattab.cpp | 10 | ||||
-rw-r--r-- | src/gui/widgets/extendednamesmodel.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/gmtab.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/guildchattab.cpp | 12 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/langtab.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/namesmodel.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tradetab.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 15 |
11 files changed, 40 insertions, 10 deletions
diff --git a/src/gui/widgets/battletab.cpp b/src/gui/widgets/battletab.cpp index 96e964b67..005cea05a 100644 --- a/src/gui/widgets/battletab.cpp +++ b/src/gui/widgets/battletab.cpp @@ -38,6 +38,7 @@ #include "debug.h" BattleTab::BattleTab(const Widget2 *const widget) : + // TRANSLATORS: battle chat tab name ChatTab(widget, _("Battle"), "") { if (config.getBoolValue("showChatHistory")) diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 95f46385b..09b3bea6b 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -148,11 +148,13 @@ void ChatTab::chatLog(std::string line, Own own, case BY_GM: if (tmp.nick.empty()) { + // TRANSLATORS: chat message tmp.nick = std::string(_("Global announcement:")).append(" "); lineColor = "##G"; } else { + // TRANSLATORS: chat message tmp.nick = strprintf(_("Global announcement from %s:"), tmp.nick.c_str()).append(" "); lineColor = "##1"; // Equiv. to BrowserBox::RED @@ -168,6 +170,7 @@ void ChatTab::chatLog(std::string line, Own own, lineColor = "##C"; break; case BY_SERVER: + // TRANSLATORS: chat message tmp.nick = std::string(_("Server:")).append(" "); tmp.text = line; lineColor = "##S"; @@ -177,6 +180,7 @@ void ChatTab::chatLog(std::string line, Own own, lineColor = "##2"; // Equiv. to BrowserBox::GREEN break; case ACT_WHISPER: + // TRANSLATORS: chat message tmp.nick = strprintf(_("%s whispers: %s"), tmp.nick.c_str(), ""); lineColor = "##W"; break; @@ -520,7 +524,13 @@ void ChatTab::showOnline(const std::string &nick, return; if (isOnline) + { + // TRANSLATORS: chat message chatLog(strprintf(_("%s is now Online."), nick.c_str())); + } else + { + // TRANSLATORS: chat message chatLog(strprintf(_("%s is now Offline."), nick.c_str())); + } } diff --git a/src/gui/widgets/extendednamesmodel.cpp b/src/gui/widgets/extendednamesmodel.cpp index 4b9eabdae..9eca8ffa6 100644 --- a/src/gui/widgets/extendednamesmodel.cpp +++ b/src/gui/widgets/extendednamesmodel.cpp @@ -45,8 +45,7 @@ int ExtendedNamesModel::getNumberOfElements() std::string ExtendedNamesModel::getElementAt(int i) { if (i >= getNumberOfElements() || i < 0) - return _("???"); - + return "???"; return mNames[i]; } diff --git a/src/gui/widgets/gmtab.cpp b/src/gui/widgets/gmtab.cpp index 9a28622a9..7c356ec43 100644 --- a/src/gui/widgets/gmtab.cpp +++ b/src/gui/widgets/gmtab.cpp @@ -32,6 +32,7 @@ #include "debug.h" GmTab::GmTab(const Widget2 *const widget) : + // TRANSLATORS: gb tab name ChatTab(widget, _("GM"), "") { setTabColor(&getThemeColor(Theme::GM_CHAT_TAB), diff --git a/src/gui/widgets/guildchattab.cpp b/src/gui/widgets/guildchattab.cpp index bb85e1a5b..0ce3cda1c 100644 --- a/src/gui/widgets/guildchattab.cpp +++ b/src/gui/widgets/guildchattab.cpp @@ -37,6 +37,7 @@ #include "debug.h" GuildChatTab::GuildChatTab(const Widget2 *const widget) : + // TRANSLATORS: guild chat tab name ChatTab(widget, _("Guild"), "") { setTabColor(&getThemeColor(Theme::GUILD_CHAT_TAB), @@ -61,18 +62,25 @@ bool GuildChatTab::handleCommand(const std::string &type, { if (args == "invite") { + // TRANSLATORS: guild chat tab help chatLog(_("Command: /invite <nick>")); + // TRANSLATORS: guild chat tab help chatLog(_("This command invites <nick> to the guild you're in.")); + // TRANSLATORS: guild chat tab help chatLog(_("If the <nick> has spaces in it, enclose it in " "double quotes (\").")); } else if (args == "leave") { + // TRANSLATORS: guild chat tab help chatLog(_("Command: /leave")); + // TRANSLATORS: guild chat tab help chatLog(_("This command causes the player to leave the guild.")); } else + { return false; + } } else if (type == "invite" && guildManager) { @@ -111,9 +119,13 @@ void GuildChatTab::handleInput(const std::string &msg) void GuildChatTab::showHelp() { + // TRANSLATORS: guild chat tab help chatLog(_("/help > Display this help.")); + // TRANSLATORS: guild chat tab help chatLog(_("/invite > Invite a player to your guild")); + // TRANSLATORS: guild chat tab help chatLog(_("/leave > Leave the guild you are in")); + // TRANSLATORS: guild chat tab help chatLog(_("/kick > Kick some one from the guild you are in")); } diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 78652b4af..d1fbcb5e9 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -83,6 +83,7 @@ void ItemLinkHandler::handleLink(const std::string &link, if (button == gcn::MouseInput::LEFT) { ConfirmDialog *const confirmDlg = new ConfirmDialog( + // TRANSLATORS: dialog message _("Open url"), url, false, true); confirmDlg->addActionListener(&listener); } diff --git a/src/gui/widgets/langtab.cpp b/src/gui/widgets/langtab.cpp index f9ae12ebd..f61c7e348 100644 --- a/src/gui/widgets/langtab.cpp +++ b/src/gui/widgets/langtab.cpp @@ -27,6 +27,7 @@ #include "debug.h" LangTab::LangTab(const Widget2 *const widget, const std::string &lang) : + // TRANSLATORS: lang chat tab name ChatTab(widget, _("Lang"), lang + " ") { } diff --git a/src/gui/widgets/namesmodel.cpp b/src/gui/widgets/namesmodel.cpp index bac8ee0b7..0dc06b05c 100644 --- a/src/gui/widgets/namesmodel.cpp +++ b/src/gui/widgets/namesmodel.cpp @@ -46,8 +46,7 @@ int NamesModel::getNumberOfElements() std::string NamesModel::getElementAt(int i) { if (i >= getNumberOfElements() || i < 0) - return _("???"); - + return "???"; return mNames[i]; } diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index ed99061fc..7439e564a 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -295,6 +295,7 @@ void SetupItemTextField::createControls() mLabel = new Label(this, mText); mTextField = new TextField(this, mValue, true, mParent, mEventName); + // TRANSLATORS: setup item button mButton = new Button(this, _("Edit"), mEventName + "_EDIT", mParent); mWidget = mTextField; mTextField->setWidth(200); @@ -421,6 +422,7 @@ void SetupItemIntTextField::createControls() mTextField->setActionEventId(mEventName); mTextField->addActionListener(mParent); + // TRANSLATORS: setup item button mButton = new Button(this, _("Edit"), mEventName + "_EDIT", mParent); mWidget = mTextField; mTextField->setWidth(50); diff --git a/src/gui/widgets/tradetab.cpp b/src/gui/widgets/tradetab.cpp index 380b11f06..b3fc2dcbe 100644 --- a/src/gui/widgets/tradetab.cpp +++ b/src/gui/widgets/tradetab.cpp @@ -36,6 +36,7 @@ #include "debug.h" TradeTab::TradeTab(const Widget2 *const widget) : + // TRANSLATORS: trade chat tab name ChatTab(widget, _("Trade"), TRADE_CHANNEL) { } diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 95c2fa505..6f3ddbcdb 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -48,12 +48,6 @@ WhisperTab::~WhisperTab() void WhisperTab::handleInput(const std::string &msg) { -// if (msg.empty()) -// { -// chatLog(_("Cannot send empty chat!"), BY_SERVER, false); -// return; -// } - if (chatWindow) { Net::getChatHandler()->privateMessage(mNick, @@ -100,8 +94,11 @@ void WhisperTab::handleCommand(const std::string &msg) void WhisperTab::showHelp() { + // TRANSLATORS: whisper tab help chatLog(_("/ignore > Ignore the other player")); + // TRANSLATORS: whisper tab help chatLog(_("/unignore > Stop ignoring the other player")); + // TRANSLATORS: whisper tab help chatLog(_("/close > Close the whisper tab")); } @@ -112,18 +109,24 @@ bool WhisperTab::handleCommand(const std::string &type, { if (args == "close") { + // TRANSLATORS: whisper tab help chatLog(_("Command: /close")); + // TRANSLATORS: whisper tab help chatLog(_("This command closes the current whisper tab.")); } else if (args == "ignore") { + // TRANSLATORS: whisper tab help chatLog(_("Command: /ignore")); + // TRANSLATORS: whisper tab help chatLog(_("This command ignores the other player regardless of " "current relations.")); } else if (args == "unignore") { + // TRANSLATORS: whisper tab help chatLog(_("Command: /unignore <player>")); + // TRANSLATORS: whisper tab help chatLog(_("This command stops ignoring the other player if they " "are being ignored.")); } |