|
From: Tapio V. <aa...@us...> - 2010-08-21 22:45:54
|
Module: performous
Branch: master
Commit: 0942d99f84af35b839c95aacd4413e35ce9d9cfe
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 01:29:50 2010 +0300
Localize game modes and difficulties, update FI.
---
game/dancegraph.cc | 17 +++++++-
game/dancegraph.hh | 3 +-
game/guitargraph.cc | 23 +++++++++--
game/guitargraph.hh | 3 +-
game/instrumentgraph.hh | 1 +
game/screen_sing.cc | 4 +-
lang/fi.po | 94 ++++++++++++++++++++++++++++++++++++++---------
7 files changed, 115 insertions(+), 30 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 710d976..4155f13 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -14,6 +14,9 @@ namespace {
static const int mapping7[max_panels] = {0, 2, 4, 6, 1, 5, 3,-1,-1,-1};
static const int mapping8[max_panels] = {0, 3, 4, 7, 1, 6, 2, 5,-1,-1};
static const int mapping10[max_panels]= {0, 3, 4, 7, 1, 6, 2, 5,-1,-1};
+ #if 0 // Here is some dummy gettext calls to populate the dictionary
+ _("Beginner") _("Easy") _("Medium") _("Hard") _("Challenge")
+ #endif
const std::string diffv[] = { "Beginner", "Easy", "Medium", "Hard", "Challenge" };
const int death_delay = 25; // Delay in notes after which the player is hidden
const float join_delay = 3.0f; // Time after join menu before playing when joining mid-game
@@ -196,11 +199,19 @@ bool DanceGraph::dead() const {
return m_jointime != m_jointime || m_dead >= death_delay;
}
+/// Get the track string
+std::string DanceGraph::getTrack() const {
+ return _(m_gamingMode.c_str());
+}
+
/// Get the difficulty as displayable string
std::string DanceGraph::getDifficultyString() const {
- std::string ret = diffv[m_level];
- if (m_input.isKeyboard()) ret += " (kbd)";
- return ret;
+ return _(diffv[m_level].c_str());
+}
+
+/// Get a string id for track and difficulty
+std::string DanceGraph::getModeId() const {
+ return m_gamingMode + diffv[m_level] + (m_input.isKeyboard() ? " (kbd)" : "");
}
/// Attempt to change the difficulty by a step
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 6fdbdd7..c526a5e 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -31,8 +31,9 @@ class DanceGraph: public InstrumentGraph {
void draw(double time);
void engine();
bool dead() const;
- std::string getTrack() const { return m_gamingMode; }
+ std::string getTrack() const;
std::string getDifficultyString() const;
+ std::string getModeId() const;
void changeTrack(int dir = 1);
void changeDifficulty(int dir = 1);
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 18053fc..01f414b 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -10,6 +10,10 @@
#include <boost/format.hpp>
namespace {
+ #if 0 // Here is some dummy gettext calls to populate the dictionary
+ _("guitar") _("bass") _("drums")
+ _("Kids") _("Easy") _("Medium") _("Hard") _("Expert")
+ #endif
struct Diff { std::string name; int basepitch; } diffv[] = {
{ "Kids", 0x3C },
{ "Easy", 0x3C },
@@ -167,8 +171,8 @@ void GuitarGraph::setupJoinMenu() {
}
void GuitarGraph::updateJoinMenu() {
- m_trackOpt = getTrack();
- m_difficultyOpt = getDifficultyString();
+ m_trackOpt = _(getTrack().c_str());
+ m_difficultyOpt = _(getDifficultyString().c_str());
std::string s("\n (");
std::string le = m_leftymode.b() ? _("ON") : _("OFF");
m_leftyOpt = _("Toggle lefty-mode") + s + le + ")";
@@ -204,11 +208,20 @@ void GuitarGraph::setTrack(const std::string& track) {
m_menu.select(1); // Restore selection to the track item
}
+/// Get the trackname string
+std::string GuitarGraph::getTrack() const {
+ return _(m_track_index->first.c_str());
+}
+
/// Get the difficulty as displayable string
std::string GuitarGraph::getDifficultyString() const {
- std::string ret = diffv[m_level].name;
- if (m_drums && m_input.isKeyboard()) ret += " (kbd)";
- return ret;
+ return _(diffv[m_level].name.c_str());
+}
+
+/// Get a string id for track and difficulty
+std::string GuitarGraph::getModeId() const {
+ return m_track_index->first + diffv[m_level].name
+ + (m_drums && m_input.isKeyboard() ? " (kbd)" : "");
}
/// Cycle through difficulties
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 4e823ee..eec0dec 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -52,8 +52,9 @@ class GuitarGraph: public InstrumentGraph {
void draw(double time);
void engine();
bool dead() const;
- std::string getTrack() const { return m_track_index->first; }
+ std::string getTrack() const;
std::string getDifficultyString() const;
+ std::string getModeId() const;
void changeTrack(int dir = 1);
void changeDifficulty(int dir = 1);
double getWhammy() const { return m_whammy; }
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index 7cc7444..7dec18f 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -71,6 +71,7 @@ class InstrumentGraph {
virtual bool dead() const = 0;
virtual std::string getTrack() const = 0;
virtual std::string getDifficultyString() const = 0;
+ virtual std::string getModeId() const = 0;
virtual void changeTrack(int dir = 1) = 0;
virtual void changeDifficulty(int dir = 1) = 0;
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index f392722..4a4c4eb 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -560,7 +560,7 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database, Dancers&
item.score = it->getScore();
if (item.score < 100) { it = instruments.erase(it); continue; } // Dead
item.track_simple = it->getTrack();
- item.track = it->getTrack() + " - " + it->getDifficultyString();
+ item.track = it->getModeId();
item.track[0] = toupper(item.track[0]); // Capitalize
if (item.track_simple == TrackName::DRUMS) item.color = glutil::Color(0.1f, 0.1f, 0.1f);
else if (item.track_simple == TrackName::BASS) item.color = glutil::Color(0.5f, 0.3f, 0.1f);
@@ -575,7 +575,7 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database, Dancers&
item.score = it->getScore();
if (item.score < 100) { it = dancers.erase(it); continue; } // Dead
item.track_simple = it->getTrack();
- item.track = it->getTrack() + " - " + it->getDifficultyString();
+ item.track = it->getModeId();
item.track[0] = toupper(item.track[0]); // Capitalize
item.color = glutil::Color(1.0f, 0.4f, 0.1f);
diff --git a/lang/fi.po b/lang/fi.po
index 9730757..475000f 100644
--- a/lang/fi.po
+++ b/lang/fi.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Performous\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-21 23:32-0000\n"
+"POT-Creation-Date: 2010-08-22 01:29-0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Tapio Vierros <tap...@gm...>\n"
"Language-Team: \n"
@@ -41,37 +41,57 @@ msgstr "<kirjoita etsiäksesi>"
msgid "Hiscore for "
msgstr "Ennätykset kappaleelle "
-#: ../game/dancegraph.cc:109
+#: ../game/dancegraph.cc:18
+msgid "Beginner"
+msgstr "Aloittelija"
+
+#: ../game/dancegraph.cc:18
+msgid "Easy"
+msgstr "Helppo"
+
+#: ../game/dancegraph.cc:18
+msgid "Medium"
+msgstr "Keskitaso"
+
+#: ../game/dancegraph.cc:18
+msgid "Hard"
+msgstr "Vaikea"
+
+#: ../game/dancegraph.cc:18
+msgid "Challenge"
+msgstr "Haastavin"
+
+#: ../game/dancegraph.cc:112
msgid "Ready!"
msgstr "Valmis!"
-#: ../game/dancegraph.cc:109
+#: ../game/dancegraph.cc:112
msgid "Start performing!"
msgstr "Aloita esiintyminen!"
-#: ../game/dancegraph.cc:120
+#: ../game/dancegraph.cc:123
msgid "Select track"
msgstr "Valitse pelimuoto"
-#: ../game/dancegraph.cc:136
+#: ../game/dancegraph.cc:139
msgid "Select difficulty"
msgstr "Valitse vaikeusaste"
-#: ../game/dancegraph.cc:139
+#: ../game/dancegraph.cc:142
#: ../game/screen_sing.cc:116
msgid "Quit"
msgstr "Lopeta"
-#: ../game/dancegraph.cc:139
+#: ../game/dancegraph.cc:142
#: ../game/screen_sing.cc:116
msgid "Exit to song browser"
msgstr "Poistu kappale valintaan"
-#: ../game/dancegraph.cc:250
+#: ../game/dancegraph.cc:261
msgid "STOP!"
msgstr "SEIS!"
-#: ../game/dancegraph.cc:325
+#: ../game/dancegraph.cc:336
msgid "Streak!"
msgstr "Sarja!"
@@ -248,23 +268,43 @@ msgstr "Kirjoita etsiäksesi tai luodaksesi uuden pelaajan."
msgid "Search Text:"
msgstr "Etsi:"
-#: ../game/guitargraph.cc:164
+#: ../game/guitargraph.cc:14
+msgid "guitar"
+msgstr "kitara"
+
+#: ../game/guitargraph.cc:14
+msgid "bass"
+msgstr "basso"
+
+#: ../game/guitargraph.cc:14
+msgid "drums"
+msgstr "rummut"
+
+#: ../game/guitargraph.cc:15
+msgid "Kids"
+msgstr "Lapset"
+
+#: ../game/guitargraph.cc:15
+msgid "Expert"
+msgstr "Ekspertti"
+
+#: ../game/guitargraph.cc:168
msgid "Lefty-mode"
msgstr "Vasuritila"
-#: ../game/guitargraph.cc:173
+#: ../game/guitargraph.cc:177
msgid "ON"
msgstr "Päällä"
-#: ../game/guitargraph.cc:173
+#: ../game/guitargraph.cc:177
msgid "OFF"
msgstr "Pois"
-#: ../game/guitargraph.cc:174
+#: ../game/guitargraph.cc:178
msgid "Toggle lefty-mode"
msgstr "Vasenkätisyystila"
-#: ../game/guitargraph.cc:447
+#: ../game/guitargraph.cc:460
msgid ""
"God Mode\n"
"Activated!"
@@ -272,19 +312,19 @@ msgstr ""
"Jumalmoodi\n"
"Aktivoitu!"
-#: ../game/guitargraph.cc:448
+#: ../game/guitargraph.cc:461
msgid "Mistakes ignored!"
msgstr "Virheitä ei huomioida!"
-#: ../game/guitargraph.cc:1081
+#: ../game/guitargraph.cc:1094
msgid "Drum Fill!"
msgstr "Rumpufilli!"
-#: ../game/guitargraph.cc:1082
+#: ../game/guitargraph.cc:1095
msgid "God Mode Ready!"
msgstr "Jumalmoodi valmis!"
-#: ../game/guitargraph.cc:1087
+#: ../game/guitargraph.cc:1100
msgid "Solo!"
msgstr "Soolo!"
@@ -332,6 +372,24 @@ msgstr "Liity uudelleen"
msgid "Change selections"
msgstr "Vaihda valintoja"
+#~ msgid " (kbd)"
+#~ msgstr "(näp.)"
+
+#~ msgid "Kids (kbd)"
+#~ msgstr "Lapset (näp.)"
+
+#~ msgid "Easy (kbd)"
+#~ msgstr "Helppo (näp.)"
+
+#~ msgid "Medium (kbd)"
+#~ msgstr "Keskitaso (näp.)"
+
+#~ msgid "Hard (kbd)"
+#~ msgstr "Vaikea (näp.)"
+
+#~ msgid "Expert (kbd)"
+#~ msgstr "Ekspertti (näp.)"
+
#~ msgid "No microphones found.\n"
#~ msgstr "Mikrofoneja ei löytynyt.\n"
|