From ac376593165266a5dc73ac2304d02e8bf9a3c886 Mon Sep 17 00:00:00 2001 From: CodingJellyfish Date: Mon, 21 Oct 2024 14:04:21 +0800 Subject: [PATCH] Capitalize kart classes --- src/states_screens/kart_selection.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/states_screens/kart_selection.cpp b/src/states_screens/kart_selection.cpp index 7c6ec9433b..3f194b84f8 100644 --- a/src/states_screens/kart_selection.cpp +++ b/src/states_screens/kart_selection.cpp @@ -323,7 +323,7 @@ void KartSelectionScreen::beforeAddingWidget() // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) - //I18N: kart group name + //I18N: kart group/class name FOR_GETTEXT_ONLY( _("All") ) //I18N: kart group name FOR_GETTEXT_ONLY( _("Favorite") ) @@ -332,11 +332,11 @@ void KartSelectionScreen::beforeAddingWidget() //I18N: kart group name FOR_GETTEXT_ONLY( _("Add-Ons") ) //I18N: kart class name - FOR_GETTEXT_ONLY( _("light") ) + FOR_GETTEXT_ONLY( _("Light") ) //I18N: kart class name - FOR_GETTEXT_ONLY( _("medium") ) + FOR_GETTEXT_ONLY( _("Medium") ) //I18N: kart class name - FOR_GETTEXT_ONLY( _("heavy") ) + FOR_GETTEXT_ONLY( _("Heavy") ) // Add other groups after @@ -356,7 +356,14 @@ void KartSelectionScreen::beforeAddingWidget() for (int i = 0; i < classes.size(); i++) { - kart_class->addLabel(_(classes[i].c_str())); + // Make the first letter upper-case + std::string class_str = classes[i]; + + if (class_str.size() && class_str[0] >= 'a' && class_str[0] <= 'z') + { + class_str[0] += 'A' - 'a'; + } + kart_class->addLabel(_(class_str.c_str())); } kart_class->addLabel(_("All"));