From b86743db25a14ab20e16f8e0fbf0604b91e89181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Sat, 24 Apr 2021 16:40:54 +0200 Subject: [PATCH] add translation macros to the main menu translate all strings in the main menu --- Source/DiabloUI/mainmenu.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/DiabloUI/mainmenu.cpp b/Source/DiabloUI/mainmenu.cpp index c0704ac99..7f33aad61 100644 --- a/Source/DiabloUI/mainmenu.cpp +++ b/Source/DiabloUI/mainmenu.cpp @@ -33,16 +33,16 @@ void MainmenuLoad(const char *name, void (*fnSound)(const char *file)) { gfnSoundFunction = fnSound; - vecMenuItems.push_back(new UiListItem("Single Player", MAINMENU_SINGLE_PLAYER)); - vecMenuItems.push_back(new UiListItem("Multi Player", MAINMENU_MULTIPLAYER)); - vecMenuItems.push_back(new UiListItem("Replay Intro", MAINMENU_REPLAY_INTRO)); - vecMenuItems.push_back(new UiListItem("Support", MAINMENU_SHOW_SUPPORT)); + vecMenuItems.push_back(new UiListItem(_("Single Player"), MAINMENU_SINGLE_PLAYER)); + vecMenuItems.push_back(new UiListItem(_("Multi Player"), MAINMENU_MULTIPLAYER)); + vecMenuItems.push_back(new UiListItem(_("Replay Intro"), MAINMENU_REPLAY_INTRO)); + vecMenuItems.push_back(new UiListItem(_("Support"), MAINMENU_SHOW_SUPPORT)); if (gbIsHellfire) { - vecMenuItems.push_back(new UiListItem("Credits", MAINMENU_SHOW_CREDITS)); - vecMenuItems.push_back(new UiListItem("Exit Hellfire", MAINMENU_EXIT_DIABLO)); + vecMenuItems.push_back(new UiListItem(_("Credits"), MAINMENU_SHOW_CREDITS)); + vecMenuItems.push_back(new UiListItem(_("Exit Hellfire"), MAINMENU_EXIT_DIABLO)); } else { - vecMenuItems.push_back(new UiListItem("Show Credits", MAINMENU_SHOW_CREDITS)); - vecMenuItems.push_back(new UiListItem("Exit Diablo", MAINMENU_EXIT_DIABLO)); + vecMenuItems.push_back(new UiListItem(_("Show Credits"), MAINMENU_SHOW_CREDITS)); + vecMenuItems.push_back(new UiListItem(_("Exit Diablo"), MAINMENU_EXIT_DIABLO)); } if (!gbSpawned || gbIsHellfire) { @@ -107,7 +107,7 @@ bool UiMainMenuDialog(const char *name, _mainmenu_selections *pdwResult, void (* MainmenuFree(); if (gbSpawned && !gbIsHellfire && MainMenuResult == MAINMENU_REPLAY_INTRO) { - UiSelOkDialog(nullptr, "The Diablo introduction cinematic is only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", true); + UiSelOkDialog(nullptr, _("The Diablo introduction cinematic is only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase."), true); MainMenuResult = MAINMENU_NONE; } }