diff --git a/gui/launcher.cpp b/gui/launcher.cpp index e5580c49183..00cc9aaec1f 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -574,6 +574,7 @@ bool LauncherDialog::doGameDetection(const Common::String &path) { if (candidates[idx].hasUnknownFiles) { description += Common::U32String(" - "); + // I18N: Unknown game variant description += _("Unknown variant"); } @@ -834,14 +835,14 @@ void LauncherChooser::selectLauncher() { switch (requestedType) { case kLauncherDisplayGrid: - _impl = new LauncherGrid(Common::U32String("LauncherGrid")); + _impl = new LauncherGrid("LauncherGrid"); break; default: // fallthrough intended case kLauncherDisplayList: #endif // !DISABLE_LAUNCHERDISPLAY_GRID - _impl = new LauncherSimple(Common::U32String("Launcher")); + _impl = new LauncherSimple("Launcher"); #ifndef DISABLE_LAUNCHERDISPLAY_GRID break; } @@ -865,7 +866,7 @@ int LauncherChooser::runModal() { #pragma mark - -LauncherSimple::LauncherSimple(const Common::U32String &title) +LauncherSimple::LauncherSimple(const Common::String &title) : LauncherDialog(title), _list(nullptr) { build(); @@ -1025,7 +1026,8 @@ void LauncherSimple::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Unknown Engine"; + // I18N: List grouping when no engine is specified + metadataNames[""] = _("Unknown Engine"); Common::HashMap::iterator i = _metadataParser._engineInfo.begin(); for (; i != _metadataParser._engineInfo.end(); ++i) { if (i->_value.alt_name.empty()) { @@ -1042,7 +1044,8 @@ void LauncherSimple::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Unknown Publisher"; + // I18N: List grouping when no pubisher is specified + metadataNames[""] = _("Unknown Publisher"); Common::HashMap::iterator i = _metadataParser._companyInfo.begin(); for (; i != _metadataParser._companyInfo.end(); ++i) { if (i->_value.alt_name.empty()) { @@ -1059,7 +1062,8 @@ void LauncherSimple::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "No Series"; + // I18N: List group when no game series is specified + metadataNames[""] = _("No Series"); Common::HashMap::iterator i = _metadataParser._seriesInfo.begin(); for (; i != _metadataParser._seriesInfo.end(); ++i) { metadataNames[i->_key] = i->_value.name; @@ -1073,7 +1077,8 @@ void LauncherSimple::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Language not detected"; + // I18N: List group when no languageis specified + metadataNames[""] = _("Language not detected"); const Common::LanguageDescription *l = Common::g_languages; for (; l->code; ++l) { metadataNames[l->code] = l->description; @@ -1087,7 +1092,8 @@ void LauncherSimple::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Platform not detected"; + // I18N: List group when no platform is specified + metadataNames[""] = _("Platform not detected"); const Common::PlatformDescription *p = Common::g_platforms; for (; p->code; ++p) { metadataNames[p->code] = p->description; @@ -1183,7 +1189,7 @@ void LauncherSimple::updateButtons() { #pragma mark - #ifndef DISABLE_LAUNCHERDISPLAY_GRID -LauncherGrid::LauncherGrid(const Common::U32String &title) +LauncherGrid::LauncherGrid(const Common::String &title) : LauncherDialog(title), _grid(nullptr) { build(); @@ -1207,7 +1213,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Unknown Engine"; + // I18N: List grouping when no enginr is specified + metadataNames[""] = _("Unknown Engine"); Common::HashMap::iterator i = _metadataParser._engineInfo.begin(); for (; i != _metadataParser._engineInfo.end(); ++i) { if (i->_value.alt_name.empty()) { @@ -1224,7 +1231,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "No Series"; + // I18N: List grouping when no game series is specified + metadataNames[""] = _("No Series"); Common::HashMap::iterator i = _metadataParser._seriesInfo.begin(); for (; i != _metadataParser._seriesInfo.end(); ++i) { metadataNames[i->_key] = i->_value.name; @@ -1237,7 +1245,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Unknown Publisher"; + // I18N: List group when no publisher is specified + metadataNames[""] = _("Unknown Publisher"); Common::HashMap::iterator i = _metadataParser._companyInfo.begin(); for (; i != _metadataParser._companyInfo.end(); ++i) { if (i->_value.alt_name.empty()) { @@ -1255,7 +1264,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Language not detected"; + // I18N: List group when no language is specified + metadataNames[""] = _("Language not detected"); const Common::LanguageDescription *l = Common::g_languages; for (; l->code; ++l) { metadataNames[l->code] = l->description; @@ -1269,7 +1279,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); - metadataNames[""] = "Platform not detected"; + // I18N: List group when no platform is specified + metadataNames[""] = _("Platform not detected"); const Common::PlatformDescription *p = Common::g_platforms; for (; p->code; ++p) { metadataNames[p->code] = p->description; @@ -1279,7 +1290,8 @@ void LauncherGrid::groupEntries(const Common::ArraysetGroupHeaderFormat(Common::U32String(""), Common::U32String("")); break; diff --git a/gui/launcher.h b/gui/launcher.h index 3e521ccf03d..d54c263f099 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -192,7 +192,7 @@ public: class LauncherSimple : public LauncherDialog { public: - LauncherSimple(const Common::U32String &title); + LauncherSimple(const Common::String &title); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override; void handleKeyDown(Common::KeyState state) override; @@ -213,7 +213,7 @@ private: #ifndef DISABLE_LAUNCHERDISPLAY_GRID class LauncherGrid : public LauncherDialog { public: - LauncherGrid(const Common::U32String &title); + LauncherGrid(const Common::String &title); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override; void handleKeyDown(Common::KeyState state) override; diff --git a/gui/widgets/grid.cpp b/gui/widgets/grid.cpp index 32c97e6bbdc..64aa485ac9a 100644 --- a/gui/widgets/grid.cpp +++ b/gui/widgets/grid.cpp @@ -25,6 +25,7 @@ #include "common/language.h" #include "common/platform.h" #include "common/tokenizer.h" +#include "common/translation.h" #include "gui/gui-manager.h" #include "gui/widgets/grid.h" @@ -215,13 +216,13 @@ GridItemTray::GridItemTray(GuiObject *boss, int x, int y, int w, int h, int entr _playButton = new PicButtonWidget(this, trayPaddingX, trayPaddingY, 2 * buttonWidth + buttonSpacingX, buttonHeight, - Common::U32String("Play"), kPlayButtonCmd); + _("Play"), kPlayButtonCmd); _loadButton = new PicButtonWidget(this, trayPaddingX, trayPaddingY + buttonHeight + buttonSpacingY, buttonWidth, buttonHeight, - Common::U32String("Saves"), kLoadButtonCmd); + _("Saves"), kLoadButtonCmd); _editButton = new PicButtonWidget(this, trayPaddingX + buttonWidth + buttonSpacingX, trayPaddingY + buttonHeight + buttonSpacingY, buttonWidth, buttonHeight, - Common::U32String("Edit"), kEditButtonCmd); + _("Edit"), kEditButtonCmd); _playButton->useThemeTransparency(true); _loadButton->useThemeTransparency(true); diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp index 249a6e8cc9e..66418d94cdb 100644 --- a/gui/widgets/groupedlist.cpp +++ b/gui/widgets/groupedlist.cpp @@ -23,6 +23,7 @@ #include "common/system.h" #include "common/frac.h" #include "common/tokenizer.h" +#include "common/translation.h" #include "gui/widgets/groupedlist.h" #include "gui/widgets/scrollbar.h" @@ -118,7 +119,8 @@ void GroupedListWidget::groupByAttribute() { if (_attributeValues.empty()) { _groupExpanded.push_back(true); - _groupHeaders.push_back(Common::String("All")); + // I18N: Group for All items + _groupHeaders.push_back(_("All")); _groupValueIndex.setVal(Common::String("All"), 0); for (uint i = 0; i < _dataList.size(); ++i) { _itemsInGroup[0].push_back(i); diff --git a/po/POTFILES b/po/POTFILES index fdce606e2ff..56c7fbd8bcb 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -23,6 +23,8 @@ gui/ThemeEngine.cpp gui/unknown-game-dialog.cpp gui/updates-dialog.cpp gui/widget.cpp +gui/widget/grid.cpp +gui/widget/groupedlist.cpp base/main.cpp