diff --git a/src/karts/kart_properties_manager.hpp b/src/karts/kart_properties_manager.hpp index ac3e786e4..9466020a6 100644 --- a/src/karts/kart_properties_manager.hpp +++ b/src/karts/kart_properties_manager.hpp @@ -61,7 +61,7 @@ private: * than once. */ std::vector m_selected_karts; - /** Contains a flag for each kart indicating wether it is available on + /** Contains a flag for each kart indicating whether it is available on * all clients or not. */ std::vector m_kart_available; diff --git a/src/states_screens/arenas_screen.cpp b/src/states_screens/arenas_screen.cpp index 6cc394b22..289245252 100644 --- a/src/states_screens/arenas_screen.cpp +++ b/src/states_screens/arenas_screen.cpp @@ -76,17 +76,21 @@ void ArenasScreen::beforeAddingWidget() // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) - //I18N: arena group name - FOR_GETTEXT_ONLY( _("standard") ) - //I18N: arena group name + //I18N: track group name + FOR_GETTEXT_ONLY( _("All") ) + //I18N: track group name + FOR_GETTEXT_ONLY( _("Standard") ) + //I18N: track group name FOR_GETTEXT_ONLY( _("Add-Ons") ) - // add others after + // Add other groups after for (int n=0; naddTextChild( _(groups[n].c_str()), groups[n] ); - } + if (groups[n] == "standard") // Fix capitalization (#4622) + tabs->addTextChild( _("Standard") , groups[n]); + else // Try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); + } // for ngetNumberOfTracks(); n++) //iterate through tracks to find how many are arenas diff --git a/src/states_screens/easter_egg_screen.cpp b/src/states_screens/easter_egg_screen.cpp index 707165680..7439efa82 100644 --- a/src/states_screens/easter_egg_screen.cpp +++ b/src/states_screens/easter_egg_screen.cpp @@ -140,16 +140,20 @@ void EasterEggScreen::beforeAddingWidget() // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) //I18N: track group name - FOR_GETTEXT_ONLY( _("standard") ) + FOR_GETTEXT_ONLY( _("All") ) + //I18N: track group name + FOR_GETTEXT_ONLY( _("Standard") ) //I18N: track group name FOR_GETTEXT_ONLY( _("Add-Ons") ) - // add others after + // Add other groups after for (int n=0; naddTextChild( _(groups[n].c_str()), groups[n] ); - } + if (groups[n] == "standard") // Fix capitalization (#4622) + tabs->addTextChild( _("Standard") , groups[n]); + else // Try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); + } // for ngetNumberOfTracks(); n++) //iterate through tracks to find how many are arenas diff --git a/src/states_screens/gp_info_screen.cpp b/src/states_screens/gp_info_screen.cpp index ac50d8ba4..c5bb06b6b 100644 --- a/src/states_screens/gp_info_screen.cpp +++ b/src/states_screens/gp_info_screen.cpp @@ -224,7 +224,7 @@ void GPInfoScreen::init() m_reverse_spinner->setValue( UserConfigParams::m_gp_reverse ); - if(random) + if (random) { RibbonWidget *rb = getWidget("buttons"); rb->setLabel(1,_(L"Reload") ); @@ -234,19 +234,35 @@ void GPInfoScreen::init() // been added or deleted since the last time this screen was shown. const std::vector& groups = track_manager->getAllTrackGroups(); m_group_names.clear(); - m_group_names.push_back("all"); - for (unsigned int i = 0; i < groups.size(); i++) + m_group_names.push_back("all"); // Add "all" group as first group + for (unsigned int i = 0; i < groups.size(); i++) // Add rest of groups m_group_names.push_back(groups[i]); + m_group_spinner->clearLabels(); - int index_standard=0; + int index_standard = 0; // Index value of "standard" category + for (unsigned int i = 0; i < m_group_names.size(); i++) { - m_group_spinner->addLabel(_(m_group_names[i].c_str())); - if (m_group_names[i] == "standard") + if (m_group_names[i] == "all") + { + // Fix capitalization (#4622) + m_group_spinner->addLabel( _("All") ); + } + else if (m_group_names[i] == "standard") + { + // Set index value of "Standard" category index_standard = i + 1; + // Fix capitalization (#4622) + m_group_spinner->addLabel( _("Standard") ); + } + else + { + m_group_spinner->addLabel(_(m_group_names[i].c_str())); + } } + // Try to keep a previously selected group value - if(m_group_spinner->getValue() >= (int)groups.size()) + if (m_group_spinner->getValue() >= (int)groups.size()) { m_group_spinner->setValue(index_standard); m_group_name = "standard"; @@ -258,7 +274,7 @@ void GPInfoScreen::init() m_max_num_tracks = getMaxNumTracks(m_group_name); m_num_tracks_spinner->setMax(m_max_num_tracks); - if(m_num_tracks_spinner->getValue() > m_max_num_tracks || + if (m_num_tracks_spinner->getValue() > m_max_num_tracks || m_num_tracks_spinner->getValue() < 1) { m_num_tracks_spinner->setValue(m_max_num_tracks); diff --git a/src/states_screens/kart_selection.cpp b/src/states_screens/kart_selection.cpp index 6767b4c16..ca9dd0e40 100644 --- a/src/states_screens/kart_selection.cpp +++ b/src/states_screens/kart_selection.cpp @@ -308,27 +308,31 @@ void KartSelectionScreen::beforeAddingWidget() kart_properties_manager->getAllGroups(); const int group_amount = (int)groups.size(); - // add all group first + // Add "All" group first if (group_amount > 1) { - //I18N: name of the tab that will show tracks from all groups + //I18N: name of the tab that will show karts from all groups tabs->addTextChild( _("All") , ALL_KART_GROUPS_ID); } // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) //I18N: kart group name - FOR_GETTEXT_ONLY( _("standard") ) + FOR_GETTEXT_ONLY( _("All") ) + //I18N: kart group name + FOR_GETTEXT_ONLY( _("Standard") ) //I18N: kart group name FOR_GETTEXT_ONLY( _("Add-Ons") ) - // add others after + // Add other groups after for (int n=0; naddTextChild( _(groups[n].c_str()) , groups[n]); - } // for naddTextChild( _("Standard") , groups[n]); + else // Try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); + } // for n("karts"); diff --git a/src/states_screens/online/tracks_screen.cpp b/src/states_screens/online/tracks_screen.cpp index f8a26db0f..d7920c9c4 100644 --- a/src/states_screens/online/tracks_screen.cpp +++ b/src/states_screens/online/tracks_screen.cpp @@ -354,10 +354,24 @@ void TracksScreen::beforeAddingWidget() //I18N: name of the tab that will show tracks from all groups tabs->addTextChild( _("All"), ALL_TRACK_GROUPS_ID ); } + + // Make group names being picked up by gettext +#define FOR_GETTEXT_ONLY(x) + //I18N: track group name + FOR_GETTEXT_ONLY( _("All") ) + //I18N: track group name + FOR_GETTEXT_ONLY( _("Standard") ) + //I18N: track group name + FOR_GETTEXT_ONLY( _("Add-Ons") ) - // add behind the other categories + // Add other groups after for (int n=0; naddTextChild( _(groups[n].c_str()), groups[n] ); + { + if (groups[n] == "standard") // Fix capitalization (#4622) + tabs->addTextChild( _("Standard") , groups[n]); + else // Try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); + } // for n("tracks"); tracks_widget->setItemCountHint( (int)track_manager->getNumberOfTracks()+1 ); diff --git a/src/states_screens/tracks_and_gp_screen.cpp b/src/states_screens/tracks_and_gp_screen.cpp index b02900e29..e272e924a 100644 --- a/src/states_screens/tracks_and_gp_screen.cpp +++ b/src/states_screens/tracks_and_gp_screen.cpp @@ -154,15 +154,20 @@ void TracksAndGPScreen::beforeAddingWidget() // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) //I18N: track group name - FOR_GETTEXT_ONLY( _("all") ) + FOR_GETTEXT_ONLY( _("All") ) //I18N: track group name - FOR_GETTEXT_ONLY( _("standard") ) + FOR_GETTEXT_ONLY( _("Standard") ) //I18N: track group name FOR_GETTEXT_ONLY( _("Add-Ons") ) - // add behind the other categories + // Add other groups after for (int n=0; naddTextChild( _(groups[n].c_str()), groups[n] ); + { + if (groups[n] == "standard") // Fix capitalization (#4622) + tabs->addTextChild( _("Standard") , groups[n]); + else // Try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); + } // for n("tracks"); tracks_widget->setItemCountHint( (int)track_manager->getNumberOfTracks()+1 );