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

@ -48,13 +48,21 @@ CollectionSystemsManager::CollectionSystemsManager() noexcept
// clang-format off // clang-format off
CollectionSystemDecl systemDecls[] { CollectionSystemDecl systemDecls[] {
// Type Name Long name Theme folder isCustom // Type Name Long name Theme folder isCustom
{AUTO_ALL_GAMES, "all", _("ALL GAMES"), "auto-allgames", false}, {AUTO_ALL_GAMES, "all", "all games", "auto-allgames", false},
{AUTO_LAST_PLAYED, "recent", _("LAST PLAYED"), "auto-lastplayed", false}, {AUTO_LAST_PLAYED, "recent", "last played", "auto-lastplayed", false},
{AUTO_FAVORITES, "favorites", _("FAVORITES"), "auto-favorites", false}, {AUTO_FAVORITES, "favorites", "favorites", "auto-favorites", false},
{CUSTOM_COLLECTION, myCollectionsName, _("COLLECTIONS"), "custom-collections", true } {CUSTOM_COLLECTION, myCollectionsName, "collections", "custom-collections", true }
}; };
// clang-format on // 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. // Create a map of the collections.
std::vector<CollectionSystemDecl> tempSystemDecl {std::vector<CollectionSystemDecl>( std::vector<CollectionSystemDecl> tempSystemDecl {std::vector<CollectionSystemDecl>(
systemDecls, systemDecls + sizeof(systemDecls) / sizeof(systemDecls[0]))}; 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 = for (std::map<std::string, CollectionSystemData, StringComparator>::const_iterator it =
autoSystems.cbegin(); autoSystems.cbegin();
it != autoSystems.cend(); ++it) it != autoSystems.cend(); ++it)
mCollectionSystemsAuto->add(it->second.decl.fullName, it->second.decl.name, mCollectionSystemsAuto->add(Utils::String::toUpper(_(it->second.decl.fullName.c_str())),
it->second.isEnabled); it->second.decl.name, it->second.isEnabled);
addWithLabel(_("AUTOMATIC GAME COLLECTIONS"), mCollectionSystemsAuto); addWithLabel(_("AUTOMATIC GAME COLLECTIONS"), mCollectionSystemsAuto);
addSaveFunc([this, autoSystems] { addSaveFunc([this, autoSystems] {
std::string autoSystemsSelected {Utils::String::vectorToDelimitedString( std::string autoSystemsSelected {Utils::String::vectorToDelimitedString(

View file

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

View file

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

View file

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