diff options
author | Eugene Sandulenko | 2010-06-15 10:44:51 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-15 10:44:51 +0000 |
commit | 859212df2523e8b15076d968018dbf98618fd60f (patch) | |
tree | e3f7ff62c58c9ac8a762791c0a1801b75fe1f14a /gui/massadd.cpp | |
parent | db6673c408865b201808e01ab5db796f2e794058 (diff) | |
download | scummvm-rg350-859212df2523e8b15076d968018dbf98618fd60f.tar.gz scummvm-rg350-859212df2523e8b15076d968018dbf98618fd60f.tar.bz2 scummvm-rg350-859212df2523e8b15076d968018dbf98618fd60f.zip |
Implement translation support for ScummVM GUI.
Based on patch #2903830: "Updated Translation Prototype" by alexbevi
which in turn is based on patch #1739965 by jvprat.
Currently it builds all translations right into ScummVM. Once the
feature will be accepted more widely, i.e. more translations will
pop up, it will be trivial to move translation strings to external
file.
Finished translation: Russian
Unfinished translation: Hungarian
Things which are nice to do:
- Language code -> language mapping for more user friendness
- Specifying fonts to be used with language
- Updating of interface language without restart. It will require
moving of much code to reflowLayout() methods for each dialog
The .po files must be in single byte encodings. I.e. no support
for Unicode.
svn-id: r49759
Diffstat (limited to 'gui/massadd.cpp')
-rw-r--r-- | gui/massadd.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 266226161a..36efdfdd59 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -27,6 +27,7 @@ #include "common/events.h" #include "common/func.h" #include "common/config-manager.h" +#include "common/translation.h" #include "gui/launcher.h" // For addGameToConf() #include "gui/massadd.h" @@ -75,10 +76,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir) // new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog"); _dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText", - "... progress ..."); + _("... progress ...")); _gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText", - "... progress ..."); + _("... progress ...")); _dirProgressText->setAlign(Graphics::kTextAlignCenter); _gameProgressText->setAlign(Graphics::kTextAlignCenter); @@ -88,10 +89,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir) _list->setNumberingMode(kListNumberingOff); _list->setList(l); - _okButton = new ButtonWidget(this, "MassAdd.Ok", "OK", kOkCmd, Common::ASCII_RETURN); + _okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), kOkCmd, Common::ASCII_RETURN); _okButton->setEnabled(false); - new ButtonWidget(this, "MassAdd.Cancel", "Cancel", kCancelCmd, Common::ASCII_ESCAPE); + new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), kCancelCmd, Common::ASCII_ESCAPE); // Build a map from all configured game paths to the targets using them const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains(); @@ -240,17 +241,17 @@ void MassAddDialog::handleTickle() { // Enable the OK button _okButton->setEnabled(true); - snprintf(buf, sizeof(buf), "Scan complete!"); + snprintf(buf, sizeof(buf), _("Scan complete!")); _dirProgressText->setLabel(buf); - snprintf(buf, sizeof(buf), "Discovered %d new games.", _games.size()); + snprintf(buf, sizeof(buf), _("Discovered %d new games."), _games.size()); _gameProgressText->setLabel(buf); } else { - snprintf(buf, sizeof(buf), "Scanned %d directories ...", _dirsScanned); + snprintf(buf, sizeof(buf), _("Scanned %d directories ..."), _dirsScanned); _dirProgressText->setLabel(buf); - snprintf(buf, sizeof(buf), "Discovered %d new games ...", _games.size()); + snprintf(buf, sizeof(buf), _("Discovered %d new games ..."), _games.size()); _gameProgressText->setLabel(buf); } |