summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-10 21:16:33 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-10 21:35:34 +0300
commitdacaf242cd28169a279e08c1d001afb5b7729d33 (patch)
tree7460b20034cf836740280f7e5ad6cd4625e3029e
parent121db99fb8227c2c1a2ba54801fad3c814ce06c2 (diff)
downloadplus-dacaf242cd28169a279e08c1d001afb5b7729d33.tar.gz
plus-dacaf242cd28169a279e08c1d001afb5b7729d33.tar.bz2
plus-dacaf242cd28169a279e08c1d001afb5b7729d33.tar.xz
plus-dacaf242cd28169a279e08c1d001afb5b7729d33.zip
Add some strings to translations.
-rw-r--r--src/actorspritemanager.cpp3
-rw-r--r--src/being.cpp21
-rw-r--r--src/commandhandler.cpp6
-rw-r--r--src/localplayer.cpp12
-rw-r--r--src/map.cpp4
-rw-r--r--src/playerrelations.cpp4
6 files changed, 18 insertions, 32 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 2dfe08ef3..44dc30892 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -35,6 +35,7 @@
#include "gui/viewport.h"
#include "utils/dtor.h"
+#include "utils/gettext.h"
#include "utils/stringutils.h"
#include "net/net.h"
@@ -905,7 +906,7 @@ bool ActorSpriteManager::isBlocked(Uint32 id)
void ActorSpriteManager::printAllToChat() const
{
- printBeingsToChat(getAll(), "Visible on map");
+ printBeingsToChat(getAll(), _("Visible on map"));
}
void ActorSpriteManager::printBeingsToChat(ActorSprites beings,
diff --git a/src/being.cpp b/src/being.cpp
index 659b883bc..5b9e4496d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -550,14 +550,15 @@ void Being::takeDamage(Being *attacker, int amount, AttackType type)
{
if (attacker->getType() == PLAYER || amount)
{
- chatWindow->battleChatLog(attacker->getName() + " : Hit you -"
- + toString(amount), BY_OTHER);
+ chatWindow->battleChatLog(strprintf("%s : Hit you -%d",
+ attacker->getName().c_str(), amount), BY_OTHER);
}
}
else if (attacker == player_node && amount)
{
- chatWindow->battleChatLog(attacker->getName() + " : You hit "
- + getName() + " -" + toString(amount), BY_PLAYER);
+ chatWindow->battleChatLog(strprintf("%s : You hit %s -%d",
+ attacker->getName().c_str(), getName().c_str(), amount),
+ BY_PLAYER);
}
}
if (font && particleEngine)
@@ -1795,18 +1796,6 @@ bool Being::drawSpriteAt(Graphics *graphics, int x, int y) const
graphics->fillRectangle(gcn::Rectangle(
x, y, 32, 32));
-/*
- int num = socialWindow->getPortalIndex(getTileX(), getTileY());
- if (num >= 0)
- {
- std::string str = outfitWindow->keyName(num);
- if (str.length() > 4)
- str = str.substr(0, 4);
- gcn::Font *font = gui->getFont();
- graphics->setColor(userPalette->getColor(UserPalette::BEING));
- font->drawString(graphics, str, x, y);
- }
-*/
if (mDrawHotKeys && !mName.empty())
{
gcn::Font *font = gui->getFont();
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index df45a4f66..888451021 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -992,7 +992,7 @@ void CommandHandler::handleCacheInfo(const std::string &args _UNUSED_,
if (!cache)
return;
- debugChatTab->chatLog("font cache size");
+ debugChatTab->chatLog(_("font cache size"));
std::string str;
for (int f = 0; f < 256; f ++)
{
@@ -1005,7 +1005,7 @@ void CommandHandler::handleCacheInfo(const std::string &args _UNUSED_,
debugChatTab->chatLog(str);
#ifdef DEBUG_FONT_COUNTERS
debugChatTab->chatLog("");
- debugChatTab->chatLog("Created: " + toString(font->getCreateCounter()));
- debugChatTab->chatLog("Deleted: " + toString(font->getDeleteCounter()));
+ debugChatTab->chatLog(_("Created: ") + toString(font->getCreateCounter()));
+ debugChatTab->chatLog(_("Deleted: ") + toString(font->getDeleteCounter()));
#endif
}
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 2497e09f9..f422493ea 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -3378,26 +3378,26 @@ void LocalPlayer::setFollow(std::string player)
{
mPlayerFollowed = player;
if (!mPlayerFollowed.empty())
- debugMsg("Follow: " + player);
+ debugMsg(_("Follow: ") + player);
else
- debugMsg("Follow canceled");
+ debugMsg(_("Follow canceled"));
}
void LocalPlayer::setImitate(std::string player)
{
mPlayerImitated = player;
if (!mPlayerImitated.empty())
- debugMsg("Imitation: " + player);
+ debugMsg(_("Imitation: ") + player);
else
- debugMsg("Imitation canceled");
+ debugMsg(_("Imitation canceled"));
}
void LocalPlayer::cancelFollow()
{
if (!mPlayerFollowed.empty())
- debugMsg("Follow canceled");
+ debugMsg(_("Follow canceled"));
if (!mPlayerImitated.empty())
- debugMsg("Imitation canceled");
+ debugMsg(_("Imitation canceled"));
mPlayerFollowed = "";
mPlayerImitated = "";
}
diff --git a/src/map.cpp b/src/map.cpp
index 4437b55a2..079477146 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1229,7 +1229,7 @@ void Map::addExtraLayer()
return;
}
std::string mapFileName = getUserMapDirectory() + "/extralayer.txt";
- logger->log("try load extra layer: " + mapFileName);
+ logger->log("loading extra layer: " + mapFileName);
struct stat statbuf;
if (!stat(mapFileName.c_str(), &statbuf) && S_ISREG(statbuf.st_mode))
{
@@ -1300,7 +1300,7 @@ void Map::saveExtraLayer()
return;
}
std::string mapFileName = getUserMapDirectory() + "/extralayer.txt";
- logger->log("try save extra layer: " + mapFileName);
+ logger->log("saving extra layer: " + mapFileName);
if (mkdir_r(getUserMapDirectory().c_str()))
{
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 1273d6bbf..ae953cd75 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -289,10 +289,6 @@ bool PlayerRelationsManager::hasPermission(const std::string &name,
return false;
unsigned int rejections = flags & ~checkPermissionSilently(name, flags);
- logger->log1("PlayerRelationsManager::hasPermission");
- logger->log("name: " + name);
- logger->log("flags: " + toString(flags));
- logger->log("rejections: " + toString(rejections));
bool permitted = (rejections == 0);
if (!permitted)