From 713fc00034bae350e2c4fc23e0788697b706f03d Mon Sep 17 00:00:00 2001 From: Dav999-v Date: Fri, 30 Dec 2022 23:32:38 +0100 Subject: [PATCH] Game.cpp: make menu options (in Game::createmenu) translatable This mainly adds loc::gettext calls for menu option labels. This commit is part of rewritten history of the localization branch. The original (unsquashed) commit history can be found here: https://github.com/Dav999-v/VVVVVV/tree/localization-orig --- desktop_version/src/Game.cpp | 372 +++++++++++++++++------------------ 1 file changed, 176 insertions(+), 196 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 06679fb6..232b3f41 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6005,48 +6005,48 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) break; } #if !defined(MAKEANDPLAY) - option("play"); + option(loc::gettext("play")); #endif #if !defined(NO_CUSTOM_LEVELS) - option("levels"); + option(loc::gettext("levels")); #endif - option("options"); + option(loc::gettext("options")); if (loc::show_translator_menu) { option(loc::gettext("translator")); } #if !defined(MAKEANDPLAY) - option("credits"); + option(loc::gettext("credits")); #endif - option("quit"); + option(loc::gettext("quit")); menuyoff = -10; maxspacing = 15; break; #if !defined(NO_CUSTOM_LEVELS) case Menu::playerworlds: - option("play a level"); + option(loc::gettext("play a level")); #if !defined(NO_EDITOR) - option("level editor"); + option(loc::gettext("level editor")); #endif - option("open level folder", FILESYSTEM_openDirectoryEnabled()); - option("show level folder path"); - option("back to menu"); + option(loc::gettext("open level folder"), FILESYSTEM_openDirectoryEnabled()); + option(loc::gettext("show level folder path")); + option(loc::gettext("return")); menuyoff = -40; maxspacing = 15; break; case Menu::confirmshowlevelspath: - option("no, don't show me"); - option("yes, reveal the path"); + option(loc::gettext("no, don't show me")); + option(loc::gettext("yes, reveal the path")); menuyoff = -10; break; case Menu::showlevelspath: - option("return to levels"); + option(loc::gettext("return to levels")); menuyoff = 60; break; case Menu::levellist: if(cl.ListOfMetaData.size()==0) { - option("ok"); + option(loc::gettext("ok")); menuyoff = -20; } else @@ -6112,22 +6112,22 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) { if((size_t) ((levelpage*8)+8)