summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-14 17:58:12 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-14 17:58:12 +0100
commit0e27aac4f124efcd495469522706df8cc1ca5986 (patch)
tree728028364c231e0aba5110e6e2a0cef3995812aa /src/text.cpp
parent36a95838d17ffaee4020a2aba832af6636591df4 (diff)
Bring back the Polish translation.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp59
1 files changed, 57 insertions, 2 deletions
diff --git a/src/text.cpp b/src/text.cpp
index ad8f007..1a36180 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -2,7 +2,7 @@
namespace text {
-language_t language = LANG_ENGLISH;
+language_t language = LANG_POLISH;
static const char *human_names[] = {
"Kowalski", "Jackson", "Carter", "O'Neill", "Hammond", "Mitchell"
@@ -51,14 +51,69 @@ static std::string get_english(index_t index)
case UNIT_DAMAGE:
return "deals damage to";
+
+ default:
+ abort();
}
}
+static std::string get_polish(index_t index)
+{
+ switch (index) {
+ case SAY_BLOCKED:
+ return "Coś jest na mojej drodze.";
+
+ case SAY_NO_PATH:
+ return "Nie mogę się tam dostać.";
+
+ case SAY_READY:
+ return "Gotowy na rozkaz.";
+
+ case SAY_MOVING:
+ return "Jestem w drodze.";
+
+ case UNIT_ALIEN:
+ return "Obcy";
+
+ case UNIT_HUMAN:
+ return human_names[rand() % count(human_names)];
+
+ case UNIT_DEATH:
+ return "nie żyje";
+
+ case UNIT_ATTACK:
+ return "atakuje";
+
+ case UNIT_MISS:
+ return "chybienie";
+
+ case UNIT_CRITICAL_MISS:
+ return "chybienie krytyczne";
+
+ case UNIT_HIT:
+ return "trafienie";
+
+ case UNIT_CRITICAL_HIT:
+ return "trafienie krytyczne";
+
+ case UNIT_DAMAGE:
+ return "zadaje obrażenia";
+
+ default:
+ abort();
+ }
+}
std::string get(index_t index)
{
switch (language) {
- default:
+ case LANG_ENGLISH:
return get_english(index);
+
+ case LANG_POLISH:
+ return get_polish(index);
+
+ default:
+ abort();
}
}