Fixed an issue where some localization changes led to crashes

This commit is contained in:
Leon Styhre 2024-07-16 12:15:29 +02:00
parent 5e1d7c6a87
commit 5e3d07bb56
5 changed files with 52 additions and 17 deletions

View file

@ -47,14 +47,22 @@ CollectionSystemsManager::CollectionSystemsManager() noexcept
{
// clang-format off
CollectionSystemDecl systemDecls[] {
// Type Name Long name Theme folder isCustom
{AUTO_ALL_GAMES, "all", _("ALL GAMES"), "auto-allgames", false},
{AUTO_LAST_PLAYED, "recent", _("LAST PLAYED"), "auto-lastplayed", false},
{AUTO_FAVORITES, "favorites", _("FAVORITES"), "auto-favorites", false},
{CUSTOM_COLLECTION, myCollectionsName, _("COLLECTIONS"), "custom-collections", true }
// Type Name Long name Theme folder isCustom
{AUTO_ALL_GAMES, "all", "all games", "auto-allgames", false},
{AUTO_LAST_PLAYED, "recent", "last played", "auto-lastplayed", false},
{AUTO_FAVORITES, "favorites", "favorites", "auto-favorites", false},
{CUSTOM_COLLECTION, myCollectionsName, "collections", "custom-collections", true }
};
// clang-format on
#if defined(GETTEXT_DUMMY_ENTRIES)
// This is just to get gettext msgid entries added to the PO message catalog files.
_("all games");
_("last played");
_("favorites");
_("collections");
#endif
// Create a map of the collections.
std::vector<CollectionSystemDecl> tempSystemDecl {std::vector<CollectionSystemDecl>(
systemDecls, systemDecls + sizeof(systemDecls) / sizeof(systemDecls[0]))};

View file

@ -54,8 +54,8 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
for (std::map<std::string, CollectionSystemData, StringComparator>::const_iterator it =
autoSystems.cbegin();
it != autoSystems.cend(); ++it)
mCollectionSystemsAuto->add(it->second.decl.fullName, it->second.decl.name,
it->second.isEnabled);
mCollectionSystemsAuto->add(Utils::String::toUpper(_(it->second.decl.fullName.c_str())),
it->second.decl.name, it->second.isEnabled);
addWithLabel(_("AUTOMATIC GAME COLLECTIONS"), mCollectionSystemsAuto);
addSaveFunc([this, autoSystems] {
std::string autoSystemsSelected {Utils::String::vectorToDelimitedString(

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ES-DE Frontend\n"
"Report-Msgid-Bugs-To: info@es-de.org\n"
"POT-Creation-Date: 2024-07-16 11:23+0200\n"
"POT-Creation-Date: 2024-07-16 12:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <info@es-de.org>\n"
@ -1685,7 +1685,16 @@ msgstr ""
msgid "quit application"
msgstr ""
msgid "FAVORITES"
msgid "all games"
msgstr ""
msgid "last played"
msgstr ""
msgid "favorites"
msgstr ""
msgid "collections"
msgstr ""
msgid "name, ascending"

View file

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ES-DE Frontend\n"
"Report-Msgid-Bugs-To: info@es-de.org\n"
"POT-Creation-Date: 2024-07-16 11:23+0200\n"
"PO-Revision-Date: 2024-07-16 11:23+0200\n"
"POT-Creation-Date: 2024-07-16 12:11+0200\n"
"PO-Revision-Date: 2024-07-16 12:10+0200\n"
"Last-Translator: Northwestern Software <info@es-de.org>\n"
"Language-Team: English <info@es-de.org>\n"
"Language: en_US\n"
@ -1739,8 +1739,17 @@ msgstr "Find the detailed changelog at"
msgid "quit application"
msgstr "quit application"
msgid "FAVORITES"
msgstr "FAVORITES"
msgid "all games"
msgstr "all games"
msgid "last played"
msgstr "last played"
msgid "favorites"
msgstr "favorites"
msgid "collections"
msgstr "collections"
msgid "name, ascending"
msgstr "name, ascending"

View file

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ES-DE Frontend\n"
"Report-Msgid-Bugs-To: info@es-de.org\n"
"POT-Creation-Date: 2024-07-16 11:23+0200\n"
"PO-Revision-Date: 2024-07-16 11:23+0200\n"
"POT-Creation-Date: 2024-07-16 12:11+0200\n"
"PO-Revision-Date: 2024-07-16 12:10+0200\n"
"Last-Translator: Northwestern Software <info@es-de.org>\n"
"Language-Team: Swedish <info@es-de.org>\n"
"Language: sv_SE\n"
@ -1742,8 +1742,17 @@ msgstr "Se den detaljerade ändringsloggen på"
msgid "quit application"
msgstr "avsluta applikationen"
msgid "FAVORITES"
msgstr "FAVORITER"
msgid "all games"
msgstr "alla spel"
msgid "last played"
msgstr "senast spelat"
msgid "favorites"
msgstr "favoriter"
msgid "collections"
msgstr "spelsamlingar"
msgid "name, ascending"
msgstr "namn, stigande"