Browse Source

Enable translation for all menus

pull/1689/head
Anders Jenbo 5 years ago
parent
commit
dbfa9c27a5
  1. 2
      CMakeLists.txt
  2. 3
      Source/DiabloUI/credits.cpp
  3. 155
      Source/DiabloUI/credits_lines.cpp
  4. 5
      Source/DiabloUI/dialogs.cpp
  5. 3
      Source/DiabloUI/progress.cpp
  6. 27
      Source/DiabloUI/selconn.cpp
  7. 107
      Source/DiabloUI/selgame.cpp
  8. 87
      Source/DiabloUI/selhero.cpp
  9. 3
      Source/DiabloUI/selok.cpp
  10. 5
      Source/DiabloUI/selyesno.cpp
  11. 3
      Source/DiabloUI/title.cpp
  12. 17
      Source/appfat.cpp
  13. 47
      Source/gamemenu.cpp
  14. 3
      Source/gmenu.cpp
  15. 221
      Source/stores.cpp
  16. 27
      Source/towners.cpp
  17. 1480
      Translations/da.po
  18. 1453
      Translations/hr.po
  19. 6678
      Translations/it.po
  20. 1454
      Translations/pt-BR.po

2
CMakeLists.txt

@ -467,7 +467,7 @@ endif()
if(USE_GETTEXT)
find_package(Gettext)
foreach(lang sv)
foreach(lang da hr it pt-BR sv)
GETTEXT_PROCESS_PO_FILES(${lang} ALL PO_FILES ${CMAKE_CURRENT_LIST_DIR}/Translations/${lang}.po)
endforeach(lang)
endif()

3
Source/DiabloUI/credits.cpp

@ -14,6 +14,7 @@
#include "utils/sdl_compat.h"
#include "utils/sdl_ptrs.h"
#include "utils/log.hpp"
#include "utils/language.h"
namespace devilution {
@ -64,7 +65,7 @@ SDL_Surface *RenderText(const char *text, SDL_Color color)
CachedLine PrepareLine(std::size_t index)
{
const char *contents = text[index];
const char *contents = _(text[index]);
while (contents[0] == '\t')
++contents;

155
Source/DiabloUI/credits_lines.cpp

@ -1,173 +1,174 @@
#include "DiabloUI/credits_lines.h"
#include "utils/language.h"
namespace devilution {
const char *const CREDITS_LINES[] = {
"Game Design",
N_("Game Design"),
" Blizzard North",
"",
"Senior Designers",
N_("Senior Designers"),
" Erich Schaefer, David Brevik",
"",
"Additional Design",
N_("Additional Design"),
" Max Schaefer, Eric Sexton, Kenneth Williams",
"",
"Lead Programmer",
N_("Lead Programmer"),
" David Brevik",
"",
"Senior Programmers",
N_("Senior Programmers"),
" Richard Seis, Doron Gartner,",
" Patrick Wyatt, Mike O'Brien",
"",
"Programming",
N_("Programming"),
" Peter Brevik, Robin van der Wel, Jon Morin",
"",
"Special Guest Programmers",
N_("Special Guest Programmers"),
" Collin Murray, Frank Pearce",
"",
"Battle.net Programming",
N_("Battle.net Programming"),
" Mike O'Brien, Mike Morhaime, Dan Liebgold",
"",
"Serial Communications Programming",
N_("Serial Communications Programming"),
" Jeff Strain, Mike O'Brien",
"",
"Installer Programming",
N_("Installer Programming"),
" Bob Fitch, Patrick Wyatt",
"",
"Art Directors",
N_("Art Directors"),
" Erich Schaefer, Samwise Didier",
"",
"Artwork",
N_("Artwork"),
" Michio Okamura, Eric Sexton, Ben Haas, Patrick Tougas,",
" Kelly Johnson, Erich Schaefer, Max Schaefer, Hugh Tom",
" Byrne, Roman Kenney, Samwise Didier, Dave Berggren,",
" Micky Neilson, Eric Flannum, Justin Thavirat, Brian",
" Sousa, Stu Rose, Nick Carpenter, Joeyray Hall",
"",
"Technical Artwork",
N_("Technical Artwork"),
" Christopher Root, Mark Sutherland,",
" Robert Djordjevich, Jeffrey Vaughn",
"",
"Cinematic Art Directors",
N_("Cinematic Art Directors"),
" Duane Stinnett, Matt Samia",
"",
"3D Cinematic Artwork",
N_("3D Cinematic Artwork"),
" Duane Stinnett, Matt Samia, Rob McNaughton,",
" Eric Flannum, Dave Pursley, Micky Neilson,",
" Maxx Marshall, Trevor Jacobs, Brian Sousa,",
" Samwise Didier, Ron Smorynski, Ben Haas, Patrick Tougas",
"",
"Cinematic Technical Artwork",
N_("Cinematic Technical Artwork"),
" Joeyray Hall ",
"",
"Executive Producer",
N_("Executive Producer"),
" Allen Adham",
"",
"Producer",
N_("Producer"),
" Bill Roper",
"",
"Associate Producer",
N_("Associate Producer"),
" James Phinney",
"",
"Diablo Strike Team",
N_("Diablo Strike Team"),
" Allen Adham, Ron Millar, Mike O'Brien,",
" James Phinney, Bill Roper, Patrick Wyatt",
"",
"Music",
N_("Music"),
" Matt Uelmen",
"",
"Sound Design",
N_("Sound Design"),
" Matt Uelmen, Glenn Stafford",
"",
"Cinematic Music & Sound",
N_("Cinematic Music & Sound"),
" Glenn Stafford, Matt Uelmen",
"",
"Voice Production, Direction & Casting",
N_("Voice Production, Direction & Casting"),
" Mark Schwarz, Glenn Stafford, Bill Roper",
"",
"Script & Story",
N_("Script & Story"),
" Erich Schaefer, Eric Sexton,",
" Chris Metzen, Bill Roper",
"",
"Voice Editing",
N_("Voice Editing"),
" Glenn Stafford",
"",
"Voices",
N_("Voices"),
" Michael Haley, Glynnis Talken, Michael Gough,",
" Paul Eiding, Lani Minella, Steve Brodie, Bill Roper,",
" Mark Schwarz, Glenn Stafford, Chris Metzen, Max Schaefer",
"",
"Recording Engineer",
N_("Recording Engineer"),
" Robert Koenigsberg",
"",
"Manual Design & Layout",
N_("Manual Design & Layout"),
" Peter Underwood, Jeffrey Vaughn,",
" Chris Metzen, Bill Roper",
"",
"Manual Artwork",
N_("Manual Artwork"),
" Samwise Didier, Chris Metzen,",
" Roman Kenney, Maxx Marshall",
"",
"Provisional Director of QA (Lead Tester)",
N_("Provisional Director of QA (Lead Tester)"),
" Shane Dabiri",
"",
"QA Assault Team (Testers)",
N_("QA Assault Team (Testers)"),
" Christopher Cross, Mike Givens, Dave Hale,",
" Brian \"Doc\" Love, Hung Nguyen, Dean Shipley,",
" Chris Sigaty, Ian Welke, Jamie Wiggs",
"",
"QA Special Ops Team (Compatibility Testers)",
N_("QA Special Ops Team (Compatibility Testers)"),
" Adam Maxwell, Russell \"Rug\" Miller",
"",
"QA Artillery Support (Additional Testers) ",
N_("QA Artillery Support (Additional Testers) "),
" Rich Alcazar, Mike Jones, Rev. Dan Moore, Matt Morris,",
" Mark Pfeiffer, Harish \"Pepe the Enforcer\" Rao, Chris Millar",
"",
"QA Counterintelligence",
N_("QA Counterintelligence"),
" Alan Dabiri, Jesse McReynolds, Walter Takata",
"",
"Order of Network Information Services",
N_("Order of Network Information Services"),
" Robert Bridenbecker, Jason \"Brother Shaggy\" Schmit,",
" Jamie \"Brother Gug\" Steigerwald, Richard Seis ",
"",
"Customer Support",
N_("Customer Support"),
" John Schwartz, Vic Larson, Chad Chaudry, Mick Yanko,",
" Brandon Riseling, Kirk Mahony, Tony Hardy, Richard",
" Amtower, Collin Smith, Andrew Edwards, Roger Eberhart",
"",
"Sales",
N_("Sales"),
" Jorge Rivero, Rob Beatie",
"",
"Dunsel",
N_("Dunsel"),
" Alan Dabiri",
"",
"Mr. Dabiri's Background Vocalists",
N_("Mr. Dabiri's Background Vocalists"),
" Karin Colenzo, Christina Cade,",
" Kim Farrington, Melissa Edwards",
"",
"Public Relations",
N_("Public Relations"),
" Linda Duttenhaver, Susan Wooley",
"",
"Marketing",
N_("Marketing"),
" John Patrick, Steve Huot, Neal Hubbard, Kathy Carter",
"",
"International Sales",
N_("International Sales"),
" Ralph Becker, Chris Yoshimura",
"",
"U.S. Sales",
N_("U.S. Sales"),
" Todd Coyle, Danny Kearns",
"",
"Manufacturing",
N_("Manufacturing"),
" John Goodman, Tom Bryan",
"",
"Legal & Business",
N_("Legal & Business"),
" Paula Duffy, Eric Roeder, Paul Sams, Kenneth Williams",
"",
"Special Thanks To",
N_("Special Thanks To"),
" Primenet, Earthlink, AOL, Compuserve, ATI, Matrox, STB, ",
" Creative Labs, Logitech, U.S. Robotics, Gravis, Cyrix",
"",
"Thanks To",
N_("Thanks To"),
" Ian Colquhoun, Rod Shean, Brian Fitzgerald, Sharon Schafer, Todd ",
" Schafer, Richard and Sandra Schaefer, Rick Bowles, Greg Bogden, ",
" Cindy Sievert, Brad Mason, Chuck Goldman, Karin Colenzo, Wendy ",
@ -196,108 +197,108 @@ const char *const CREDITS_LINES[] = {
" Bongo, Scarlett, Apollo, The House of Mediocrity, Amelias, The King, ",
" Saag and all the folks at Davidson",
"",
"In memory of",
N_("In memory of"),
" Lawrence and Barbara Williams",
" David A. Hargrave",
" Tony \"Xatre\" Collin",
" Thomas H Sexton",
"",
"Very Special Thanks to",
N_("Very Special Thanks to"),
" Bob and Jan Davidson",
" Walter Forbes",
"",
" Synergistic Software",
"",
"General Manager",
N_("General Manager"),
" Bob Clardy",
"",
"Lead Programmer",
N_("Lead Programmer"),
" Donald Tsang",
"",
"Software Engineering",
N_("Software Engineering"),
" Jim Edwards, Gary Powell, D'Andre Pritchett",
"",
"Art Director",
N_("Art Director"),
" Kirt Lemons",
"",
"Artists",
N_("Artists"),
" Darren Lamb, Mike McMillen,",
" Jason Robertson, Peter Watje",
"",
"Design",
N_("Design"),
" Kirt Lemons, Donald Tsang, Peter Watje",
" Jim Edwards, Mike McMillen",
"",
"Additional Design",
N_("Additional Design"),
" Michael Ormsby",
"",
"Sound Design, SFX & Audio Engineering",
N_("Sound Design, SFX & Audio Engineering"),
" Craig Utterback",
"",
"Quality Assurance Lead",
N_("Quality Assurance Lead"),
" Mona Branham",
"",
"Testers",
N_("Testers"),
" Chris Barker, Steve Chin, Derek Clardy, Conor Durdy,",
" Amy Edwards, Greg Hightower, Tim Jensen, Jeremy Jones,",
" John Lang, Daudi Pritchett, Doug Van Horne, Gordon Wilcox",
"",
"Manual",
N_("Manual"),
" Suzanne David, Linda Westerfield,",
" Ann Dickens Clardy, Kirt Lemons",
"",
"Voices",
N_("Voices"),
" Jim Edwards, Paul Eiding, Eve Forward,",
" Mackenzie Powell, Rodney Sherwood, Craig Utterback",
"",
"",
" Additional Work",
N_(" Additional Work"),
"",
"Quest Text Writing",
N_("Quest Text Writing"),
" Eve Forward",
"",
"Thanks to",
N_("Thanks to"),
" Trisha Durdy, Dustin Freeman, D'Andre Pritchett",
"",
"",
"",
" Special Thanks to Blizzard Entertainment",
N_(" Special Thanks to Blizzard Entertainment"),
"",
"",
"",
"",
" Sierra On-Line Inc. Northwest",
N_(" Sierra On-Line Inc. Northwest"),
"",
"Quality Assurance Manager",
N_("Quality Assurance Manager"),
" Gary Stevens",
"",
"Quality Assurance Lead Tester",
N_("Quality Assurance Lead Tester"),
" Bernadette Pryor",
"",
"Main Testers",
N_("Main Testers"),
" Erik Johnson, David Lee, Kristofer Hall",
"",
"Additional Testers",
N_("Additional Testers"),
" Cade Myers, Jeff Ingham, Phil Kuhlmey,",
" Eric Gelfand, Mark Wyman, Torsten Reinl,",
" Erinn Hamilton",
"",
"Product Marketing Manager",
N_("Product Marketing Manager"),
" Eddie Ranchigoda",
"",
"Public Relations Manager",
N_("Public Relations Manager"),
" Eric Twelker",
"",
"Associate Product Manager",
N_("Associate Product Manager"),
" Joe Roth",
"",
"Thanks to",
N_("Thanks to"),
" Cindy Vanous, Joshua Bentley, Robert Zimmerman, Robert Jerauld,",
" Dennis Ham, Andrea Stone, Beth Quintana, Jennifer Keenan, Gary Brown,",
" Ken Eaton, Matt Eslick, Kate Powell, Bryon Mcpherson, David Beetlestone",
"",
"",
"The Ring of One Thousand",
N_("The Ring of One Thousand"),
" Andrew Abernathy, Christopher Abramo, David Adams, David ",
" Adcox, Marko Agterberg, Cory Aiken, Judah Altaras, John ",
" Alvarez, Jose Alvarez, Richard Amable, Alexander Amaral, ",
@ -543,7 +544,7 @@ const char *const CREDITS_LINES[] = {
"",
"",
"",
" No souls were sold in the making of this game.",
N_(" No souls were sold in the making of this game."),
"",
"",
" ",

5
Source/DiabloUI/dialogs.cpp

@ -12,6 +12,7 @@
#include "palette.h"
#include "utils/display.h"
#include "utils/log.hpp"
#include "utils/language.h"
namespace devilution {
@ -167,7 +168,7 @@ void Init(const char *text, const char *caption, bool error, bool renderBehind)
vecOkDialog.push_back(new UiText(text, rect2, UIS_CENTER));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 265), (Sint16)(UI_OFFSET_Y + 265), SML_BUTTON_WIDTH, SML_BUTTON_HEIGHT };
vecOkDialog.push_back(new UiButton(&SmlButton, "OK", &DialogActionOK, rect3, 0));
vecOkDialog.push_back(new UiButton(&SmlButton, _("OK"), &DialogActionOK, rect3, 0));
} else {
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 127), (Sint16)(UI_OFFSET_Y + 100), 385, 280 };
vecOkDialog.push_back(new UiImage(&dialogArt, rect1));
@ -180,7 +181,7 @@ void Init(const char *text, const char *caption, bool error, bool renderBehind)
vecOkDialog.push_back(new UiText(caption, rect3, UIS_CENTER));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 264), (Sint16)(UI_OFFSET_Y + 335), SML_BUTTON_WIDTH, SML_BUTTON_HEIGHT };
vecOkDialog.push_back(new UiButton(&SmlButton, "OK", &DialogActionOK, rect4, 0));
vecOkDialog.push_back(new UiButton(&SmlButton, _("OK"), &DialogActionOK, rect4, 0));
}
if (!renderBehind) {

3
Source/DiabloUI/progress.cpp

@ -7,6 +7,7 @@
#include "dx.h"
#include "palette.h"
#include "utils/display.h"
#include "utils/language.h"
namespace devilution {
namespace {
@ -42,7 +43,7 @@ void ProgressLoad(const char *msg)
msgShadow = TTF_RenderUTF8_Solid(font, msg, black);
}
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 265), (Sint16)(UI_OFFSET_Y + 267), SML_BUTTON_WIDTH, SML_BUTTON_HEIGHT };
vecProgress.push_back(new UiButton(&SmlButton, "Cancel", &DialogActionCancel, rect3, 0));
vecProgress.push_back(new UiButton(&SmlButton, _("Cancel"), &DialogActionCancel, rect3, 0));
}
void ProgressFree()

27
Source/DiabloUI/selconn.cpp

@ -2,6 +2,7 @@
#include "DiabloUI/text.h"
#include "stores.h"
#include "storm/storm.h"
#include "utils/language.h"
namespace devilution {
@ -30,44 +31,44 @@ void SelconnLoad()
#ifndef NONET
vecConnItems.push_back(new UiListItem("Zerotier", SELCONN_ZT));
vecConnItems.push_back(new UiListItem("Client-Server (TCP)", SELCONN_TCP));
vecConnItems.push_back(new UiListItem(_("Client-Server (TCP)"), SELCONN_TCP));
#endif
vecConnItems.push_back(new UiListItem("Loopback", SELCONN_LOOPBACK));
vecConnItems.push_back(new UiListItem(_("Loopback"), SELCONN_LOOPBACK));
UiAddBackground(&vecSelConnDlg);
UiAddLogo(&vecSelConnDlg);
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 24), (Sint16)(Sint16)(UI_OFFSET_Y + 161), 590, 35 };
vecSelConnDlg.push_back(new UiArtText("Multi Player Game", rect1, UIS_CENTER | UIS_BIG));
vecSelConnDlg.push_back(new UiArtText(_("Multi Player Game"), rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 218), DESCRIPTION_WIDTH, 21 };
vecSelConnDlg.push_back(new UiArtText(selconn_MaxPlayers, rect2));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 256), DESCRIPTION_WIDTH, 21 };
vecSelConnDlg.push_back(new UiArtText("Requirements:", rect3));
vecSelConnDlg.push_back(new UiArtText(_("Requirements:"), rect3));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 275), DESCRIPTION_WIDTH, 66 };
vecSelConnDlg.push_back(new UiArtText(selconn_Description, rect4));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 30), (Sint16)(UI_OFFSET_Y + 356), 220, 31 };
vecSelConnDlg.push_back(new UiArtText("no gateway needed", rect5, UIS_CENTER | UIS_MED));
vecSelConnDlg.push_back(new UiArtText(_("no gateway needed"), rect5, UIS_CENTER | UIS_MED));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 393), DESCRIPTION_WIDTH, 21 };
vecSelConnDlg.push_back(new UiArtText(selconn_Gateway, rect6, UIS_CENTER));
SDL_Rect rect7 = { (Sint16)(PANEL_LEFT + 300), (Sint16)(UI_OFFSET_Y + 211), 295, 33 };
vecSelConnDlg.push_back(new UiArtText("Select Connection", rect7, UIS_CENTER | UIS_BIG));
vecSelConnDlg.push_back(new UiArtText(_("Select Connection"), rect7, UIS_CENTER | UIS_BIG));
SDL_Rect rect8 = { (Sint16)(PANEL_LEFT + 16), (Sint16)(UI_OFFSET_Y + 427), 250, 35 };
vecSelConnDlg.push_back(new UiArtTextButton("Change Gateway", nullptr, rect8, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD | UIS_HIDDEN));
vecSelConnDlg.push_back(new UiArtTextButton(_("Change Gateway"), nullptr, rect8, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD | UIS_HIDDEN));
vecSelConnDlg.push_back(new UiList(vecConnItems, PANEL_LEFT + 305, (UI_OFFSET_Y + 256), 285, 26, UIS_CENTER | UIS_VCENTER | UIS_GOLD));
SDL_Rect rect9 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelConnDlg.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect9, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelConnDlg.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect9, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect10 = { (Sint16)(PANEL_LEFT + 454), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelConnDlg.push_back(new UiArtTextButton("Cancel", &UiFocusNavigationEsc, rect10, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelConnDlg.push_back(new UiArtTextButton(_("Cancel"), &UiFocusNavigationEsc, rect10, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecConnItems.size(), SelconnFocus, SelconnSelect, SelconnEsc, vecSelConnDlg);
}
@ -98,20 +99,20 @@ void SelconnFocus(int value)
int players = MAX_PLRS;
switch (vecConnItems[value]->m_value) {
case SELCONN_TCP:
strncpy(selconn_Description, "All computers must be connected to a TCP-compatible network.", sizeof(selconn_Description) - 1);
strncpy(selconn_Description, _("All computers must be connected to a TCP-compatible network."), sizeof(selconn_Description) - 1);
players = MAX_PLRS;
break;
case SELCONN_ZT:
strncpy(selconn_Description, "All computers must be connected to the internet.", sizeof(selconn_Description) - 1);
strncpy(selconn_Description, _("All computers must be connected to the internet."), sizeof(selconn_Description) - 1);
players = MAX_PLRS;
break;
case SELCONN_LOOPBACK:
strncpy(selconn_Description, "Play by yourself with no network exposure.", sizeof(selconn_Description) - 1);
strncpy(selconn_Description, _("Play by yourself with no network exposure."), sizeof(selconn_Description) - 1);
players = 1;
break;
}
snprintf(selconn_MaxPlayers, sizeof(selconn_MaxPlayers), "Players Supported: %d", players);
snprintf(selconn_MaxPlayers, sizeof(selconn_MaxPlayers), _("Players Supported: %d"), players);
WordWrapArtStr(selconn_Description, DESCRIPTION_WIDTH);
}

107
Source/DiabloUI/selgame.cpp

@ -10,6 +10,7 @@
#include "mainmenu.h"
#include "options.h"
#include "storm/storm.h"
#include "utils/language.h"
namespace devilution {
@ -78,27 +79,27 @@ void selgame_GameSelection_Init()
UiAddLogo(&vecSelGameDialog);
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 24), (Sint16)(UI_OFFSET_Y + 161), 590, 35 };
vecSelGameDialog.push_back(new UiArtText("Client-Server (TCP)", rect1, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Client-Server (TCP)"), rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 211), 205, 192 };
vecSelGameDialog.push_back(new UiArtText("Description:", rect2, UIS_MED));
vecSelGameDialog.push_back(new UiArtText(_("Description:"), rect2, UIS_MED));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 256), DESCRIPTION_WIDTH, 192 };
vecSelGameDialog.push_back(new UiArtText(selgame_Description, rect3));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 300), (Sint16)(UI_OFFSET_Y + 211), 295, 33 };
vecSelGameDialog.push_back(new UiArtText("Select Action", rect4, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Select Action"), rect4, UIS_CENTER | UIS_BIG));
vecSelGameDlgItems.push_back(new UiListItem("Create Game", 0));
vecSelGameDlgItems.push_back(new UiListItem("Join Game", 1));
vecSelGameDlgItems.push_back(new UiListItem(_("Create Game"), 0));
vecSelGameDlgItems.push_back(new UiListItem(_("Join Game"), 1));
vecSelGameDialog.push_back(new UiList(vecSelGameDlgItems, PANEL_LEFT + 305, (UI_OFFSET_Y + 255), 285, 26, UIS_CENTER | UIS_MED | UIS_GOLD));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 449), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("CANCEL", &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("CANCEL"), &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecSelGameDlgItems.size(), selgame_GameSelection_Focus, selgame_GameSelection_Select, selgame_GameSelection_Esc, vecSelGameDialog);
}
@ -107,10 +108,10 @@ void selgame_GameSelection_Focus(int value)
{
switch (vecSelGameDlgItems[value]->m_value) {
case 0:
strncpy(selgame_Description, "Create a new game with a difficulty setting of your choice.", sizeof(selgame_Description) - 1);
strncpy(selgame_Description, _("Create a new game with a difficulty setting of your choice."), sizeof(selgame_Description) - 1);
break;
case 1:
strncpy(selgame_Description, "Enter an IP or a hostname and join a game already in progress at that address.", sizeof(selgame_Description) - 1);
strncpy(selgame_Description, _("Enter an IP or a hostname and join a game already in progress at that address."), sizeof(selgame_Description) - 1);
break;
}
WordWrapArtStr(selgame_Description, DESCRIPTION_WIDTH);
@ -152,40 +153,40 @@ void selgame_GameSelection_Select(int value)
switch (value) {
case 0: {
strncpy(title, "Create Game", sizeof(title) - 1);
strncpy(title, _("Create Game"), sizeof(title) - 1);
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 211), 295, 35 };
vecSelGameDialog.push_back(new UiArtText("Select Difficulty", rect4, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Select Difficulty"), rect4, UIS_CENTER | UIS_BIG));
vecSelGameDlgItems.push_back(new UiListItem("Normal", DIFF_NORMAL));
vecSelGameDlgItems.push_back(new UiListItem("Nightmare", DIFF_NIGHTMARE));
vecSelGameDlgItems.push_back(new UiListItem("Hell", DIFF_HELL));
vecSelGameDlgItems.push_back(new UiListItem(_("Normal"), DIFF_NORMAL));
vecSelGameDlgItems.push_back(new UiListItem(_("Nightmare"), DIFF_NIGHTMARE));
vecSelGameDlgItems.push_back(new UiListItem(_("Hell"), DIFF_HELL));
vecSelGameDialog.push_back(new UiList(vecSelGameDlgItems, PANEL_LEFT + 300, (UI_OFFSET_Y + 282), 295, 26, UIS_CENTER | UIS_MED | UIS_GOLD));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 449), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("CANCEL", &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("CANCEL"), &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecSelGameDlgItems.size(), selgame_Diff_Focus, selgame_Diff_Select, selgame_Diff_Esc, vecSelGameDialog, true);
break;
}
case 1: {
strncpy(title, "Join TCP Games", sizeof(title) - 1);
strncpy(title, _("Join TCP Games"), sizeof(title) - 1);
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 305), (Sint16)(UI_OFFSET_Y + 211), 285, 33 };
vecSelGameDialog.push_back(new UiArtText("Enter address", rect4, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Enter address"), rect4, UIS_CENTER | UIS_BIG));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 305), (Sint16)(UI_OFFSET_Y + 314), 285, 33 };
vecSelGameDialog.push_back(new UiEdit(selgame_Ip, 128, rect5, UIS_MED | UIS_GOLD));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect7 = { (Sint16)(PANEL_LEFT + 449), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("CANCEL", &UiFocusNavigationEsc, rect7, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("CANCEL"), &UiFocusNavigationEsc, rect7, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(0, nullptr, selgame_Password_Init, selgame_GameSelection_Init, vecSelGameDialog);
break;
@ -204,16 +205,16 @@ void selgame_Diff_Focus(int value)
{
switch (vecSelGameDlgItems[value]->m_value) {
case DIFF_NORMAL:
strncpy(selgame_Label, "Normal", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Normal Difficulty\nThis is where a starting character should begin the quest to defeat Diablo.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Normal"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Normal Difficulty\nThis is where a starting character should begin the quest to defeat Diablo."), sizeof(selgame_Description) - 1);
break;
case DIFF_NIGHTMARE:
strncpy(selgame_Label, "Nightmare", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Nightmare Difficulty\nThe denizens of the Labyrinth have been bolstered and will prove to be a greater challenge. This is recommended for experienced characters only.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Nightmare"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Nightmare Difficulty\nThe denizens of the Labyrinth have been bolstered and will prove to be a greater challenge. This is recommended for experienced characters only."), sizeof(selgame_Description) - 1);
break;
case DIFF_HELL:
strncpy(selgame_Label, "Hell", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Hell Difficulty\nThe most powerful of the underworld's creatures lurk at the gateway into Hell. Only the most experienced characters should venture in this realm.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Hell"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Hell Difficulty\nThe most powerful of the underworld's creatures lurk at the gateway into Hell. Only the most experienced characters should venture in this realm."), sizeof(selgame_Description) - 1);
break;
}
WordWrapArtStr(selgame_Description, DESCRIPTION_WIDTH);
@ -228,9 +229,9 @@ bool IsDifficultyAllowed(int value)
selgame_Free();
if (value == 1)
UiSelOkDialog(title, "Your character must reach level 20 before you can enter a multiplayer game of Nightmare difficulty.", false);
UiSelOkDialog(title, _("Your character must reach level 20 before you can enter a multiplayer game of Nightmare difficulty."), false);
if (value == 2)
UiSelOkDialog(title, "Your character must reach level 30 before you can enter a multiplayer game of Hell difficulty.", false);
UiSelOkDialog(title, _("Your character must reach level 30 before you can enter a multiplayer game of Hell difficulty."), false);
LoadBackgroundArt("ui_art\\selgame.pcx");
@ -296,7 +297,7 @@ void selgame_GameSpeedSelection()
UiAddLogo(&vecSelGameDialog);
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 24), (Sint16)(UI_OFFSET_Y + 161), 590, 35 };
vecSelGameDialog.push_back(new UiArtText("Create Game", rect1, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Create Game"), rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 34), (Sint16)(UI_OFFSET_Y + 211), 205, 33 };
vecSelGameDialog.push_back(new UiArtText(selgame_Label, rect2, UIS_CENTER | UIS_BIG));
@ -305,20 +306,20 @@ void selgame_GameSpeedSelection()
vecSelGameDialog.push_back(new UiArtText(selgame_Description, rect3));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 211), 295, 35 };
vecSelGameDialog.push_back(new UiArtText("Select Game Speed", rect4, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Select Game Speed"), rect4, UIS_CENTER | UIS_BIG));
vecSelGameDlgItems.push_back(new UiListItem("Normal", 20));
vecSelGameDlgItems.push_back(new UiListItem("Fast", 30));
vecSelGameDlgItems.push_back(new UiListItem("Faster", 40));
vecSelGameDlgItems.push_back(new UiListItem("Fastest", 50));
vecSelGameDlgItems.push_back(new UiListItem(_("Normal"), 20));
vecSelGameDlgItems.push_back(new UiListItem(_("Fast"), 30));
vecSelGameDlgItems.push_back(new UiListItem(_("Faster"), 40));
vecSelGameDlgItems.push_back(new UiListItem(_("Fastest"), 50));
vecSelGameDialog.push_back(new UiList(vecSelGameDlgItems, PANEL_LEFT + 300, (UI_OFFSET_Y + 279), 295, 26, UIS_CENTER | UIS_MED | UIS_GOLD));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect5, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 449), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("CANCEL", &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("CANCEL"), &UiFocusNavigationEsc, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecSelGameDlgItems.size(), selgame_Speed_Focus, selgame_Speed_Select, selgame_Speed_Esc, vecSelGameDialog, true);
}
@ -327,20 +328,20 @@ void selgame_Speed_Focus(int value)
{
switch (vecSelGameDlgItems[value]->m_value) {
case 20:
strncpy(selgame_Label, "Normal", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Normal Speed\nThis is where a starting character should begin the quest to defeat Diablo.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Normal"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Normal Speed\nThis is where a starting character should begin the quest to defeat Diablo."), sizeof(selgame_Description) - 1);
break;
case 30:
strncpy(selgame_Label, "Fast", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Fast Speed\nThe denizens of the Labyrinth have been hastened and will prove to be a greater challenge. This is recommended for experienced characters only.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Fast"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Fast Speed\nThe denizens of the Labyrinth have been hastened and will prove to be a greater challenge. This is recommended for experienced characters only."), sizeof(selgame_Description) - 1);
break;
case 40:
strncpy(selgame_Label, "Faster", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Faster Speed\nMost monsters of the dungeon will seek you out quicker than ever before. Only an experienced champion should try their luck at this speed.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Faster"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Faster Speed\nMost monsters of the dungeon will seek you out quicker than ever before. Only an experienced champion should try their luck at this speed."), sizeof(selgame_Description) - 1);
break;
case 50:
strncpy(selgame_Label, "Fastest", sizeof(selgame_Label) - 1);
strncpy(selgame_Description, "Fastest Speed\nThe minions of the underworld will rush to attack without hesitation. Only a true speed demon should enter at this pace.", sizeof(selgame_Description) - 1);
strncpy(selgame_Label, _("Fastest"), sizeof(selgame_Label) - 1);
strncpy(selgame_Description, _("Fastest Speed\nThe minions of the underworld will rush to attack without hesitation. Only a true speed demon should enter at this pace."), sizeof(selgame_Description) - 1);
break;
}
WordWrapArtStr(selgame_Description, DESCRIPTION_WIDTH);
@ -373,25 +374,25 @@ void selgame_Password_Init(int value)
UiAddLogo(&vecSelGameDialog);
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 24), (Sint16)(UI_OFFSET_Y + 161), 590, 35 };
vecSelGameDialog.push_back(new UiArtText("Client-Server (TCP)", rect1, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Client-Server (TCP)"), rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 211), 205, 192 };
vecSelGameDialog.push_back(new UiArtText("Description:", rect2, UIS_MED));
vecSelGameDialog.push_back(new UiArtText(_("Description:"), rect2, UIS_MED));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 35), (Sint16)(UI_OFFSET_Y + 256), DESCRIPTION_WIDTH, 192 };
vecSelGameDialog.push_back(new UiArtText(selgame_Description, rect3));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 305), (Sint16)(UI_OFFSET_Y + 211), 285, 33 };
vecSelGameDialog.push_back(new UiArtText("Enter Password", rect4, UIS_CENTER | UIS_BIG));
vecSelGameDialog.push_back(new UiArtText(_("Enter Password"), rect4, UIS_CENTER | UIS_BIG));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 305), (Sint16)(UI_OFFSET_Y + 314), 285, 33 };
vecSelGameDialog.push_back(new UiEdit(selgame_Password, 15, rect5, UIS_MED | UIS_GOLD));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 299), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect6, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect7 = { (Sint16)(PANEL_LEFT + 449), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelGameDialog.push_back(new UiArtTextButton("CANCEL", &UiFocusNavigationEsc, rect7, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelGameDialog.push_back(new UiArtTextButton(_("CANCEL"), &UiFocusNavigationEsc, rect7, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(0, nullptr, selgame_Password_Select, selgame_Password_Esc, vecSelGameDialog);
}
@ -408,10 +409,10 @@ static bool IsGameCompatible(GameData *data)
selgame_Free();
if (data->programid != GAME_ID) {
UiSelOkDialog(title, "The host is running a different game than you.", false);
UiSelOkDialog(title, _("The host is running a different game than you."), false);
} else {
char msg[64];
sprintf(msg, "Your version %s does not match the host %d.%d.%d.", PROJECT_VERSION, PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH);
sprintf(msg, _("Your version %s does not match the host %d.%d.%d."), PROJECT_VERSION, PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH);
UiSelOkDialog(title, msg, false);
}
@ -435,7 +436,7 @@ void selgame_Password_Select(int value)
selgame_endMenu = true;
} else {
selgame_Free();
UiSelOkDialog("Multi Player Game", SDL_GetError(), false);
UiSelOkDialog(_("Multi Player Game"), SDL_GetError(), false);
LoadBackgroundArt("ui_art\\selgame.pcx");
selgame_Password_Init(selgame_selectedGame);
}
@ -453,7 +454,7 @@ void selgame_Password_Select(int value)
selgame_endMenu = true;
} else {
selgame_Free();
UiSelOkDialog("Multi Player Game", SDL_GetError(), false);
UiSelOkDialog(_("Multi Player Game"), SDL_GetError(), false);
LoadBackgroundArt("ui_art\\selgame.pcx");
selgame_Password_Init(0);
}

87
Source/DiabloUI/selhero.cpp

@ -13,6 +13,7 @@
#include "control.h"
#include "options.h"
#include "pfile.h"
#include "utils/language.h"
#ifdef __3DS__
#include "platform/ctr/keyboard.h"
@ -119,7 +120,7 @@ void SelheroUpdateViewportItems()
vecSelHeroDlgItems[i]->m_value = static_cast<int>(index);
}
if (numViewportHeroes < MaxViewportItems) {
vecSelHeroDlgItems[numViewportHeroes]->m_text = "New Hero";
vecSelHeroDlgItems[numViewportHeroes]->m_text = _("New Hero");
vecSelHeroDlgItems[numViewportHeroes]->m_value = static_cast<int>(selhero_SaveCount);
}
}
@ -181,21 +182,21 @@ void SelheroListSelect(int value)
SelheroFreeDlgItems();
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 264), (Sint16)(UI_OFFSET_Y + 211), 320, 33 };
vecSelDlgItems.push_back(new UiArtText("Choose Class", rect1, UIS_CENTER | UIS_BIG));
vecSelDlgItems.push_back(new UiArtText(_("Choose Class"), rect1, UIS_CENTER | UIS_BIG));
SelheroFreeListItems();
int itemH = 33;
vecSelHeroDlgItems.push_back(new UiListItem("Warrior", static_cast<int>(HeroClass::Warrior)));
vecSelHeroDlgItems.push_back(new UiListItem("Rogue", static_cast<int>(HeroClass::Rogue)));
vecSelHeroDlgItems.push_back(new UiListItem("Sorcerer", static_cast<int>(HeroClass::Sorcerer)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Warrior"), static_cast<int>(HeroClass::Warrior)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Rogue"), static_cast<int>(HeroClass::Rogue)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Sorcerer"), static_cast<int>(HeroClass::Sorcerer)));
if (gbIsHellfire) {
vecSelHeroDlgItems.push_back(new UiListItem("Monk", static_cast<int>(HeroClass::Monk)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Monk"), static_cast<int>(HeroClass::Monk)));
}
if (gbBard || sgOptions.Gameplay.bTestBard) {
vecSelHeroDlgItems.push_back(new UiListItem("Bard", static_cast<int>(HeroClass::Bard)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Bard"), static_cast<int>(HeroClass::Bard)));
}
if (gbBarbarian || sgOptions.Gameplay.bTestBarbarian) {
vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", static_cast<int>(HeroClass::Barbarian)));
vecSelHeroDlgItems.push_back(new UiListItem(_("Barbarian"), static_cast<int>(HeroClass::Barbarian)));
}
if (vecSelHeroDlgItems.size() > 4)
itemH = 26;
@ -203,16 +204,16 @@ void SelheroListSelect(int value)
vecSelDlgItems.push_back(new UiList(vecSelHeroDlgItems, PANEL_LEFT + 264, (UI_OFFSET_Y + itemY), 320, itemH, UIS_CENTER | UIS_MED | UIS_GOLD));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 279), (Sint16)(UI_OFFSET_Y + 429), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect2, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect2, UIS_CENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 429), (Sint16)(UI_OFFSET_Y + 429), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("Cancel", &UiFocusNavigationEsc, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("Cancel"), &UiFocusNavigationEsc, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecSelHeroDlgItems.size(), SelheroClassSelectorFocus, SelheroClassSelectorSelect, SelheroClassSelectorEsc, vecSelDlgItems);
memset(&selhero_heroInfo.name, 0, sizeof(selhero_heroInfo.name));
strncpy(title, "New Single Player Hero", sizeof(title) - 1);
strncpy(title, _("New Single Player Hero"), sizeof(title) - 1);
if (selhero_isMultiPlayer) {
strncpy(title, "New Multi Player Hero", sizeof(title) - 1);
strncpy(title, _("New Multi Player Hero"), sizeof(title) - 1);
}
return;
}
@ -221,21 +222,21 @@ void SelheroListSelect(int value)
SelheroFreeDlgItems();
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 264), (Sint16)(UI_OFFSET_Y + 211), 320, 33 };
vecSelDlgItems.push_back(new UiArtText("Save File Exists", rect1, UIS_CENTER | UIS_BIG));
vecSelDlgItems.push_back(new UiArtText(_("Save File Exists"), rect1, UIS_CENTER | UIS_BIG));
SelheroFreeListItems();
vecSelHeroDlgItems.push_back(new UiListItem("Load Game", 0));
vecSelHeroDlgItems.push_back(new UiListItem("New Game", 1));
vecSelHeroDlgItems.push_back(new UiListItem(_("Load Game"), 0));
vecSelHeroDlgItems.push_back(new UiListItem(_("New Game"), 1));
vecSelDlgItems.push_back(new UiList(vecSelHeroDlgItems, PANEL_LEFT + 265, (UI_OFFSET_Y + 285), 320, 33, UIS_CENTER | UIS_MED | UIS_GOLD));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 279), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect2, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect2, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 429), (Sint16)(UI_OFFSET_Y + 427), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("Cancel", &UiFocusNavigationEsc, rect3, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("Cancel"), &UiFocusNavigationEsc, rect3, UIS_CENTER | UIS_VCENTER | UIS_BIG | UIS_GOLD));
UiInitList(vecSelHeroDlgItems.size(), SelheroLoadFocus, SelheroLoadSelect, selhero_List_Init, vecSelDlgItems, true);
strncpy(title, "Single Player Characters", sizeof(title) - 1);
strncpy(title, _("Single Player Characters"), sizeof(title) - 1);
return;
}
@ -283,34 +284,34 @@ void SelheroClassSelectorSelect(int value)
auto hClass = static_cast<HeroClass>(vecSelHeroDlgItems[value]->m_value);
if (gbSpawned && (hClass == HeroClass::Rogue || hClass == HeroClass::Sorcerer || (hClass == HeroClass::Bard && hfbard_mpq == nullptr))) {
ArtBackground.Unload();
UiSelOkDialog(nullptr, "The Rogue and Sorcerer are only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase.", false);
UiSelOkDialog(nullptr, _("The Rogue and Sorcerer are only available in the full retail version of Diablo. Visit https://www.gog.com/game/diablo to purchase."), false);
LoadBackgroundArt("ui_art\\selhero.pcx");
SelheroListSelect(selhero_SaveCount);
return;
}
strncpy(title, "New Single Player Hero", sizeof(title) - 1);
strncpy(title, _("New Single Player Hero"), sizeof(title) - 1);
if (selhero_isMultiPlayer) {
strncpy(title, "New Multi Player Hero", sizeof(title) - 1);
strncpy(title, _("New Multi Player Hero"), sizeof(title) - 1);
}
memset(selhero_heroInfo.name, '\0', sizeof(selhero_heroInfo.name));
#if defined __3DS__
ctr_vkbdInput("Enter Hero name..", SelheroGenerateName(selhero_heroInfo.heroclass), selhero_heroInfo.name);
ctr_vkbdInput(_("Enter Hero name.."), SelheroGenerateName(selhero_heroInfo.heroclass), selhero_heroInfo.name);
#endif
if (ShouldPrefillHeroName())
strncpy(selhero_heroInfo.name, SelheroGenerateName(selhero_heroInfo.heroclass), sizeof(selhero_heroInfo.name) - 1);
SelheroFreeDlgItems();
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 264), (Sint16)(UI_OFFSET_Y + 211), 320, 33 };
vecSelDlgItems.push_back(new UiArtText("Enter Name", rect1, UIS_CENTER | UIS_BIG));
vecSelDlgItems.push_back(new UiArtText(_("Enter Name"), rect1, UIS_CENTER | UIS_BIG));
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 265), (Sint16)(UI_OFFSET_Y + 317), 320, 33 };
vecSelDlgItems.push_back(new UiEdit(selhero_heroInfo.name, 15, rect2, UIS_MED | UIS_GOLD));
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 279), (Sint16)(UI_OFFSET_Y + 429), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 429), (Sint16)(UI_OFFSET_Y + 429), 140, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("Cancel", &UiFocusNavigationEsc, rect4, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("Cancel"), &UiFocusNavigationEsc, rect4, UIS_CENTER | UIS_BIG | UIS_GOLD));
UiInitList(0, nullptr, SelheroNameSelect, SelheroNameEsc, vecSelDlgItems);
}
@ -333,7 +334,7 @@ void SelheroNameSelect(int value)
if (!UiValidPlayerName(selhero_heroInfo.name)) {
ArtBackground.Unload();
UiSelOkDialog(title, "Invalid name. A name cannot contain spaces, reserved characters, or reserved words.\n", false);
UiSelOkDialog(title, _("Invalid name. A name cannot contain spaces, reserved characters, or reserved words.\n"), false);
LoadBackgroundArt("ui_art\\selhero.pcx");
} else {
bool overwrite = true;
@ -341,7 +342,7 @@ void SelheroNameSelect(int value)
if (strcasecmp(selhero_heros[i].name, selhero_heroInfo.name) == 0) {
ArtBackground.Unload();
char dialogText[256];
snprintf(dialogText, sizeof(dialogText), "Character already exists. Do you want to overwrite \"%s\"?", selhero_heroInfo.name);
snprintf(dialogText, sizeof(dialogText), _("Character already exists. Do you want to overwrite \"%s\"?"), selhero_heroInfo.name);
overwrite = UiSelHeroYesNoDialog(title, dialogText);
LoadBackgroundArt("ui_art\\selhero.pcx");
break;
@ -353,7 +354,7 @@ void SelheroNameSelect(int value)
SelheroLoadSelect(1);
return;
}
UiErrorOkDialog("Unable to create character.", vecSelDlgItems);
UiErrorOkDialog(_("Unable to create character."), vecSelDlgItems);
}
}
@ -507,30 +508,30 @@ void selhero_Init()
vecSelHeroDialog.push_back(SELHERO_DIALOG_HERO_IMG);
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 323), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Level:", rect3, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Level:"), rect3, UIS_RIGHT));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 323), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Level:", rect4, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Level:"), rect4, UIS_RIGHT));
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 159), (Sint16)(UI_OFFSET_Y + 323), 40, 21 };
vecSelHeroDialog.push_back(new UiArtText(textStats[0], rect5, UIS_CENTER));
SDL_Rect rect6 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 358), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Strength:", rect6, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Strength:"), rect6, UIS_RIGHT));
SDL_Rect rect7 = { (Sint16)(PANEL_LEFT + 159), (Sint16)(UI_OFFSET_Y + 358), 40, 21 };
vecSelHeroDialog.push_back(new UiArtText(textStats[1], rect7, UIS_CENTER));
SDL_Rect rect8 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 380), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Magic:", rect8, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Magic:"), rect8, UIS_RIGHT));
SDL_Rect rect9 = { (Sint16)(PANEL_LEFT + 159), (Sint16)(UI_OFFSET_Y + 380), 40, 21 };
vecSelHeroDialog.push_back(new UiArtText(textStats[2], rect9, UIS_CENTER));
SDL_Rect rect10 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 401), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Dexterity:", rect10, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Dexterity:"), rect10, UIS_RIGHT));
SDL_Rect rect11 = { (Sint16)(PANEL_LEFT + 159), (Sint16)(UI_OFFSET_Y + 401), 40, 21 };
vecSelHeroDialog.push_back(new UiArtText(textStats[3], rect11, UIS_CENTER));
SDL_Rect rect12 = { (Sint16)(PANEL_LEFT + 39), (Sint16)(UI_OFFSET_Y + 422), 110, 21 };
vecSelHeroDialog.push_back(new UiArtText("Vitality:", rect12, UIS_RIGHT));
vecSelHeroDialog.push_back(new UiArtText(_("Vitality:"), rect12, UIS_RIGHT));
SDL_Rect rect13 = { (Sint16)(PANEL_LEFT + 159), (Sint16)(UI_OFFSET_Y + 422), 40, 21 };
vecSelHeroDialog.push_back(new UiArtText(textStats[4], rect13, UIS_CENTER));
}
@ -541,7 +542,7 @@ void selhero_List_Init()
SelheroFreeDlgItems();
SDL_Rect rect1 = { (Sint16)(PANEL_LEFT + 264), (Sint16)(UI_OFFSET_Y + 211), 320, 33 };
vecSelDlgItems.push_back(new UiArtText("Select Hero", rect1, UIS_CENTER | UIS_BIG));
vecSelDlgItems.push_back(new UiArtText(_("Select Hero"), rect1, UIS_CENTER | UIS_BIG));
SelheroFreeListItems();
const size_t numViewportHeroes = std::min(selhero_SaveCount + 1, MaxViewportItems);
@ -557,21 +558,21 @@ void selhero_List_Init()
vecSelDlgItems.push_back(scrollBar);
SDL_Rect rect3 = { (Sint16)(PANEL_LEFT + 239), (Sint16)(UI_OFFSET_Y + 429), 120, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("OK", &UiFocusNavigationSelect, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("OK"), &UiFocusNavigationSelect, rect3, UIS_CENTER | UIS_BIG | UIS_GOLD));
SDL_Rect rect4 = { (Sint16)(PANEL_LEFT + 364), (Sint16)(UI_OFFSET_Y + 429), 120, 35 };
SELLIST_DIALOG_DELETE_BUTTON = new UiArtTextButton("Delete", &SelheroUiFocusNavigationYesNo, rect4, UIS_CENTER | UIS_BIG | UIS_DISABLED);
SELLIST_DIALOG_DELETE_BUTTON = new UiArtTextButton(_("Delete"), &SelheroUiFocusNavigationYesNo, rect4, UIS_CENTER | UIS_BIG | UIS_DISABLED);
vecSelDlgItems.push_back(SELLIST_DIALOG_DELETE_BUTTON);
SDL_Rect rect5 = { (Sint16)(PANEL_LEFT + 489), (Sint16)(UI_OFFSET_Y + 429), 120, 35 };
vecSelDlgItems.push_back(new UiArtTextButton("Cancel", &UiFocusNavigationEsc, rect5, UIS_CENTER | UIS_BIG | UIS_GOLD));
vecSelDlgItems.push_back(new UiArtTextButton(_("Cancel"), &UiFocusNavigationEsc, rect5, UIS_CENTER | UIS_BIG | UIS_GOLD));
UiInitList(selhero_SaveCount + 1, SelheroListFocus, SelheroListSelect, SelheroListEsc, vecSelDlgItems, false, SelheroListDeleteYesNo);
UiInitScrollBar(scrollBar, MaxViewportItems, &listOffset);
if (selhero_isMultiPlayer) {
strcpy(title, "Multi Player Characters");
strcpy(title, _("Multi Player Characters"));
} else {
strcpy(title, "Single Player Characters");
strcpy(title, _("Single Player Characters"));
}
}
@ -613,11 +614,11 @@ static void UiSelHeroDialog(
char dialogTitle[32];
char dialogText[256];
if (selhero_isMultiPlayer) {
strncpy(dialogTitle, "Delete Multi Player Hero", sizeof(dialogTitle) - 1);
strncpy(dialogTitle, _("Delete Multi Player Hero"), sizeof(dialogTitle) - 1);
} else {
strncpy(dialogTitle, "Delete Single Player Hero", sizeof(dialogTitle) - 1);
strncpy(dialogTitle, _("Delete Single Player Hero"), sizeof(dialogTitle) - 1);
}
snprintf(dialogText, sizeof(dialogText), "Are you sure you want to delete the character \"%s\"?", selhero_heroInfo.name);
snprintf(dialogText, sizeof(dialogText), _("Are you sure you want to delete the character \"%s\"?"), selhero_heroInfo.name);
if (UiSelHeroYesNoDialog(dialogTitle, dialogText))
fnremove(&selhero_heroInfo);

3
Source/DiabloUI/selok.cpp

@ -3,6 +3,7 @@
#include "DiabloUI/diabloui.h"
#include "DiabloUI/text.h"
#include "control.h"
#include "utils/language.h"
namespace devilution {
@ -70,7 +71,7 @@ void UiSelOkDialog(const char *title, const char *body, bool background)
vecSelOkDialog.push_back(new UiArtText(dialogText, rect1, UIS_MED));
}
vecSelOkDialogItems.push_back(new UiListItem("OK", 0));
vecSelOkDialogItems.push_back(new UiListItem(_("OK"), 0));
vecSelOkDialog.push_back(new UiList(vecSelOkDialogItems, PANEL_LEFT + 230, (UI_OFFSET_Y + 390), 180, 35, UIS_CENTER | UIS_BIG | UIS_GOLD));
strncpy(dialogText, body, sizeof(dialogText) - 1);

5
Source/DiabloUI/selyesno.cpp

@ -3,6 +3,7 @@
#include "DiabloUI/diabloui.h"
#include "DiabloUI/text.h"
#include "control.h"
#include "utils/language.h"
namespace devilution {
namespace {
@ -57,8 +58,8 @@ bool UiSelHeroYesNoDialog(const char *title, const char *body)
SDL_Rect rect2 = { (Sint16)(PANEL_LEFT + 120), (Sint16)(UI_OFFSET_Y + 236), MESSAGE_WIDTH, 168 };
vecSelYesNoDialog.push_back(new UiArtText(selyesno_confirmationMessage, rect2, UIS_MED));
vecSelYesNoDialogItems.push_back(new UiListItem("Yes", 0));
vecSelYesNoDialogItems.push_back(new UiListItem("No", 1));
vecSelYesNoDialogItems.push_back(new UiListItem(_("Yes"), 0));
vecSelYesNoDialogItems.push_back(new UiListItem(_("No"), 1));
vecSelYesNoDialog.push_back(new UiList(vecSelYesNoDialogItems, PANEL_LEFT + 230, (UI_OFFSET_Y + 390), 180, 35, UIS_CENTER | UIS_BIG | UIS_GOLD));
strncpy(selyesno_confirmationMessage, body, sizeof(selyesno_confirmationMessage) - 1);

3
Source/DiabloUI/title.cpp

@ -1,6 +1,7 @@
#include "DiabloUI/diabloui.h"
#include "control.h"
#include "controls/menu_controls.h"
#include "utils/language.h"
namespace devilution {
namespace {
@ -43,7 +44,7 @@ void UiTitleDialog()
UiAddLogo(&vecTitleScreen, LOGO_BIG, 182);
SDL_Rect rect = { (Sint16)(PANEL_LEFT + 49), (Sint16)(UI_OFFSET_Y + 410), 550, 26 };
vecTitleScreen.push_back(new UiArtText("Copyright \xA9 1996-2001 Blizzard Entertainment", rect, UIS_MED | UIS_CENTER));
vecTitleScreen.push_back(new UiArtText(_("Copyright \xA9 1996-2001 Blizzard Entertainment"), rect, UIS_MED | UIS_CENTER));
}
TitleLoad();

17
Source/appfat.cpp

@ -9,6 +9,7 @@
#include "diablo.h"
#include "storm/storm.h"
#include "utils/ui_fwd.h"
#include "utils/language.h"
namespace devilution {
@ -30,7 +31,7 @@ void MsgBox(const char *pszFmt, va_list va)
vsnprintf(text, 256, pszFmt, va);
UiErrorOkDialog("Error", text);
UiErrorOkDialog(_("Error"), text);
}
/**
@ -113,7 +114,7 @@ void ErrDlg(const char *title, const char *error, const char *logFilePath, int l
FreeDlg();
snprintf(text, 1024, "%s\n\nThe error occurred at: %s line %d", error, logFilePath, logLineNr);
snprintf(text, 1024, _("%s\n\nThe error occurred at: %s line %d"), error, logFilePath, logLineNr);
UiErrorOkDialog(title, text);
app_fatal(nullptr);
@ -133,13 +134,13 @@ void FileErrDlg(const char *error)
snprintf(
text,
1024,
"Unable to open a required file.\n"
_("Unable to open a required file.\n"
"\n"
"Verify that the MD5 of diabdat.mpq matches one of the following values\n"
"011bc6518e6166206231080a4440b373\n"
"68f049866b44688a7af65ba766bef75a\n"
"\n"
"The problem occurred when loading:\n%s",
"The problem occurred when loading:\n%s"),
error);
UiErrorOkDialog("Data File Error", text);
@ -155,9 +156,9 @@ void InsertCDDlg()
snprintf(
text,
1024,
"Unable to open main data archive (diabdat.mpq or spawn.mpq).\n"
_("Unable to open main data archive (diabdat.mpq or spawn.mpq).\n"
"\n"
"Make sure that it is in the game folder and that the file name is in all lowercase.");
"Make sure that it is in the game folder and that the file name is in all lowercase."));
UiErrorOkDialog("Data File Error", text);
app_fatal(nullptr);
@ -170,9 +171,9 @@ void DirErrorDlg(const char *error)
{
char text[1024];
snprintf(text, 1024, "Unable to write to location:\n%s", error);
snprintf(text, 1024, _("Unable to write to location:\n%s"), error);
UiErrorOkDialog("Read-Only Directory Error", text);
UiErrorOkDialog(_("Read-Only Directory Error"), text);
app_fatal(nullptr);
}

47
Source/gamemenu.cpp

@ -13,6 +13,7 @@
#include "options.h"
#include "pfile.h"
#include "sound.h"
#include "utils/language.h"
namespace devilution {
namespace {
@ -34,11 +35,11 @@ void gamemenu_speed(bool bActivate);
TMenuItem sgSingleMenu[] = {
// clang-format off
// dwFlags, pszStr, fnMenu
{ GMENU_ENABLED, "Save Game", &gamemenu_save_game },
{ GMENU_ENABLED, "Options", &gamemenu_options },
{ GMENU_ENABLED, "New Game", &gamemenu_new_game },
{ GMENU_ENABLED, "Load Game", &gamemenu_load_game },
{ GMENU_ENABLED, "Quit Game", &gamemenu_quit_game },
{ GMENU_ENABLED, N_("Save Game"), &gamemenu_save_game },
{ GMENU_ENABLED, N_("Options"), &gamemenu_options },
{ GMENU_ENABLED, N_("New Game"), &gamemenu_new_game },
{ GMENU_ENABLED, N_("Load Game"), &gamemenu_load_game },
{ GMENU_ENABLED, N_("Quit Game"), &gamemenu_quit_game },
{ GMENU_ENABLED, nullptr, nullptr }
// clang-format on
};
@ -46,10 +47,10 @@ TMenuItem sgSingleMenu[] = {
TMenuItem sgMultiMenu[] = {
// clang-format off
// dwFlags, pszStr, fnMenu
{ GMENU_ENABLED, "Options", &gamemenu_options },
{ GMENU_ENABLED, "New Game", &gamemenu_new_game },
{ GMENU_ENABLED, "Restart In Town", &gamemenu_restart_town },
{ GMENU_ENABLED, "Quit Game", &gamemenu_quit_game },
{ GMENU_ENABLED, N_("Options"), &gamemenu_options },
{ GMENU_ENABLED, N_("New Game"), &gamemenu_new_game },
{ GMENU_ENABLED, N_("Restart In Town"), &gamemenu_restart_town },
{ GMENU_ENABLED, N_("Quit Game"), &gamemenu_quit_game },
{ GMENU_ENABLED, nullptr, nullptr },
// clang-format on
};
@ -58,21 +59,21 @@ TMenuItem sgOptionsMenu[] = {
// dwFlags, pszStr, fnMenu
{ GMENU_ENABLED | GMENU_SLIDER, nullptr, &gamemenu_music_volume },
{ GMENU_ENABLED | GMENU_SLIDER, nullptr, &gamemenu_sound_volume },
{ GMENU_ENABLED | GMENU_SLIDER, "Gamma", &gamemenu_gamma },
{ GMENU_ENABLED | GMENU_SLIDER, "Speed", &gamemenu_speed },
{ GMENU_ENABLED , "Previous Menu", &gamemenu_previous },
{ GMENU_ENABLED | GMENU_SLIDER, N_("Gamma"), &gamemenu_gamma },
{ GMENU_ENABLED | GMENU_SLIDER, N_("Speed"), &gamemenu_speed },
{ GMENU_ENABLED , N_("Previous Menu"), &gamemenu_previous },
{ GMENU_ENABLED , nullptr, nullptr },
// clang-format on
};
/** Specifies the menu names for music enabled and disabled. */
const char *const music_toggle_names[] = {
"Music",
"Music Disabled",
N_("Music"),
N_("Music Disabled"),
};
/** Specifies the menu names for sound enabled and disabled. */
const char *const sound_toggle_names[] = {
"Sound",
"Sound Disabled",
N_("Sound"),
N_("Sound Disabled"),
};
void gamemenu_update_single()
@ -180,14 +181,14 @@ void gamemenu_sound_music_toggle(const char *const *names, TMenuItem *menu_item,
{
if (gbSndInited) {
menu_item->dwFlags |= GMENU_ENABLED | GMENU_SLIDER;
menu_item->pszStr = *names;
menu_item->pszStr = _(names[0]);
gmenu_slider_steps(menu_item, 17);
gmenu_slider_set(menu_item, VOLUME_MIN, VOLUME_MAX, volume);
return;
}
menu_item->dwFlags &= ~(GMENU_ENABLED | GMENU_SLIDER);
menu_item->pszStr = names[1];
menu_item->pszStr = _(names[1]);
}
static int gamemenu_slider_music_sound(TMenuItem *menu_item)
@ -216,19 +217,19 @@ void gamemenu_get_speed()
if (gbIsMultiplayer) {
sgOptionsMenu[3].dwFlags &= ~(GMENU_ENABLED | GMENU_SLIDER);
if (sgGameInitInfo.nTickRate >= 50)
sgOptionsMenu[3].pszStr = "Speed: Fastest";
sgOptionsMenu[3].pszStr = _("Speed: Fastest");
else if (sgGameInitInfo.nTickRate >= 40)
sgOptionsMenu[3].pszStr = "Speed: Faster";
sgOptionsMenu[3].pszStr = _("Speed: Faster");
else if (sgGameInitInfo.nTickRate >= 30)
sgOptionsMenu[3].pszStr = "Speed: Fast";
sgOptionsMenu[3].pszStr = _("Speed: Fast");
else if (sgGameInitInfo.nTickRate == 20)
sgOptionsMenu[3].pszStr = "Speed: Normal";
sgOptionsMenu[3].pszStr = _("Speed: Normal");
return;
}
sgOptionsMenu[3].dwFlags |= GMENU_ENABLED | GMENU_SLIDER;
sgOptionsMenu[3].pszStr = "Speed";
sgOptionsMenu[3].pszStr = _("Speed");
gmenu_slider_steps(&sgOptionsMenu[3], 46);
gmenu_slider_set(&sgOptionsMenu[3], 20, 50, sgGameInitInfo.nTickRate);
}

3
Source/gmenu.cpp

@ -10,6 +10,7 @@
#include "controls/controller_motion.h"
#include "stores.h"
#include "utils/ui_fwd.h"
#include "utils/language.h"
namespace devilution {
@ -73,7 +74,7 @@ void gmenu_draw_pause(const CelOutputBuffer &out)
RedBack(out);
if (sgpCurrentMenu == nullptr) {
light_table_index = 0;
gmenu_print_text(out, 252 + PANEL_LEFT, 176, "Pause");
gmenu_print_text(out, 252 + PANEL_LEFT, 176, _("Pause"));
}
}

221
Source/stores.cpp

@ -12,6 +12,7 @@
#include "minitext.h"
#include "options.h"
#include "towners.h"
#include "utils/language.h"
namespace devilution {
@ -160,14 +161,14 @@ void PrintStoreItem(ItemStruct *x, int l, text_color iclr)
if (x->_iSufPower != -1) {
PrintItemPower(x->_iSufPower, x);
if (sstr[0])
strcat(sstr, ", ");
strcat(sstr, _(", "));
strcat(sstr, tempstr);
}
}
if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) {
sprintf(tempstr, "Charges: %i/%i", x->_iCharges, x->_iMaxCharges);
sprintf(tempstr, _("Charges: %i/%i"), x->_iCharges, x->_iMaxCharges);
if (sstr[0])
strcat(sstr, ", ");
strcat(sstr, _(", "));
strcat(sstr, tempstr);
}
if (sstr[0]) {
@ -176,14 +177,14 @@ void PrintStoreItem(ItemStruct *x, int l, text_color iclr)
}
sstr[0] = '\0';
if (x->_iClass == ICLASS_WEAPON)
sprintf(sstr, "Damage: %i-%i ", x->_iMinDam, x->_iMaxDam);
sprintf(sstr, _("Damage: %i-%i "), x->_iMinDam, x->_iMaxDam);
if (x->_iClass == ICLASS_ARMOR)
sprintf(sstr, "Armor: %i ", x->_iAC);
sprintf(sstr, _("Armor: %i "), x->_iAC);
if (x->_iMaxDur != DUR_INDESTRUCTIBLE && x->_iMaxDur) {
sprintf(tempstr, "Dur: %i/%i, ", x->_iDurability, x->_iMaxDur);
sprintf(tempstr, _("Dur: %i/%i, "), x->_iDurability, x->_iMaxDur);
strcat(sstr, tempstr);
} else {
strcat(sstr, "Indestructible, ");
strcat(sstr, _("Indestructible, "));
}
if (x->_itype == ITYPE_MISC)
sstr[0] = '\0';
@ -191,15 +192,15 @@ void PrintStoreItem(ItemStruct *x, int l, text_color iclr)
mag = x->_iMinMag;
dex = x->_iMinDex;
if (str == 0 && mag == 0 && dex == 0) {
strcat(sstr, "No required attributes");
strcat(sstr, _("No required attributes"));
} else {
strcpy(tempstr, "Required:");
strcpy(tempstr, _("Required:"));
if (str)
sprintf(tempstr + strlen(tempstr), " %i Str", str);
sprintf(tempstr + strlen(tempstr), _(" %i Str"), str);
if (mag)
sprintf(tempstr + strlen(tempstr), " %i Mag", mag);
sprintf(tempstr + strlen(tempstr), _(" %i Mag"), mag);
if (dex)
sprintf(tempstr + strlen(tempstr), " %i Dex", dex);
sprintf(tempstr + strlen(tempstr), _(" %i Dex"), dex);
strcat(sstr, tempstr);
}
AddSText(40, l++, false, sstr, iclr, false);
@ -221,15 +222,15 @@ void S_StartSmith()
{
stextsize = false;
stextscrl = false;
AddSText(0, 1, true, "Welcome to the", COL_GOLD, false);
AddSText(0, 3, true, "Blacksmith's shop", COL_GOLD, false);
AddSText(0, 7, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 10, true, "Talk to Griswold", COL_BLUE, true);
AddSText(0, 12, true, "Buy basic items", COL_WHITE, true);
AddSText(0, 14, true, "Buy premium items", COL_WHITE, true);
AddSText(0, 16, true, "Sell items", COL_WHITE, true);
AddSText(0, 18, true, "Repair items", COL_WHITE, true);
AddSText(0, 20, true, "Leave the shop", COL_WHITE, true);
AddSText(0, 1, true, _("Welcome to the"), COL_GOLD, false);
AddSText(0, 3, true, _("Blacksmith's shop"), COL_GOLD, false);
AddSText(0, 7, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 10, true, _("Talk to Griswold"), COL_BLUE, true);
AddSText(0, 12, true, _("Buy basic items"), COL_WHITE, true);
AddSText(0, 14, true, _("Buy premium items"), COL_WHITE, true);
AddSText(0, 16, true, _("Sell items"), COL_WHITE, true);
AddSText(0, 18, true, _("Repair items"), COL_WHITE, true);
AddSText(0, 20, true, _("Leave the shop"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}
@ -270,12 +271,12 @@ void S_StartSBuy()
stextsize = true;
stextscrl = true;
stextsval = 0;
sprintf(tempstr, "I have these items for sale: Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("I have these items for sale: Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSBuy(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, false);
AddSText(0, 22, true, _("Back"), COL_WHITE, false);
OffsetSTextY(22, 6);
storenumh = 0;
for (i = 0; !smithitem[i].isEmpty(); i++) {
@ -335,11 +336,11 @@ bool S_StartSPBuy()
stextscrl = true;
stextsval = 0;
sprintf(tempstr, "I have these premium items for sale: Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("I have these premium items for sale: Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, false);
AddSText(0, 22, true, _("Back"), COL_WHITE, false);
OffsetSTextY(22, 6);
stextsmax = storenumh - 4;
@ -463,22 +464,22 @@ void S_StartSSell()
if (!sellok) {
stextscrl = false;
sprintf(tempstr, "You have nothing I want. Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("You have nothing I want. Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
} else {
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, "Which item is for sale? Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("Which item is for sale? Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSSell(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
}
@ -533,11 +534,11 @@ void S_StartSRepair()
}
if (!repairok) {
stextscrl = false;
sprintf(tempstr, "You have nothing to repair. Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("You have nothing to repair. Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
return;
}
@ -545,12 +546,12 @@ void S_StartSRepair()
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, "Repair which item? Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("Repair which item? Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSSell(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
@ -571,13 +572,13 @@ void S_StartWitch()
FillManaPlayer();
stextsize = false;
stextscrl = false;
AddSText(0, 2, true, "Witch's shack", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Adria", COL_BLUE, true);
AddSText(0, 14, true, "Buy items", COL_WHITE, true);
AddSText(0, 16, true, "Sell items", COL_WHITE, true);
AddSText(0, 18, true, "Recharge staves", COL_WHITE, true);
AddSText(0, 20, true, "Leave the shack", COL_WHITE, true);
AddSText(0, 2, true, _("Witch's shack"), COL_GOLD, false);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Adria"), COL_BLUE, true);
AddSText(0, 14, true, _("Buy items"), COL_WHITE, true);
AddSText(0, 16, true, _("Sell items"), COL_WHITE, true);
AddSText(0, 18, true, _("Recharge staves"), COL_WHITE, true);
AddSText(0, 20, true, _("Leave the shack"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}
@ -619,12 +620,12 @@ void S_StartWBuy()
stextscrl = true;
stextsval = 0;
stextsmax = 20;
sprintf(tempstr, "I have these items for sale: Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("I have these items for sale: Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollWBuy(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, false);
AddSText(0, 22, true, _("Back"), COL_WHITE, false);
OffsetSTextY(22, 6);
storenumh = 0;
@ -713,22 +714,22 @@ void S_StartWSell()
if (!sellok) {
stextscrl = false;
sprintf(tempstr, "You have nothing I want. Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("You have nothing I want. Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
} else {
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, "Which item is for sale? Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("Which item is for sale? Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSSell(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
}
@ -789,22 +790,22 @@ void S_StartWRecharge()
if (!rechargeok) {
stextscrl = false;
sprintf(tempstr, "You have nothing to recharge. Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("You have nothing to recharge. Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
} else {
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, "Recharge which item? Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("Recharge which item? Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSSell(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
}
@ -815,7 +816,7 @@ void S_StartNoMoney()
stextscrl = false;
stextsize = true;
ClearSText(5, 23);
AddSText(0, 14, true, "You do not have enough gold", COL_WHITE, true);
AddSText(0, 14, true, _("You do not have enough gold"), COL_WHITE, true);
}
void S_StartNoRoom()
@ -823,7 +824,7 @@ void S_StartNoRoom()
StartStore(stextshold);
stextscrl = false;
ClearSText(5, 23);
AddSText(0, 14, true, "You do not have enough room in inventory", COL_WHITE, true);
AddSText(0, 14, true, _("You do not have enough room in inventory"), COL_WHITE, true);
}
void S_StartConfirm()
@ -859,51 +860,51 @@ void S_StartConfirm()
switch (stextshold) {
case STORE_BBOY:
strcpy(tempstr, "Do we have a deal?");
strcpy(tempstr, _("Do we have a deal?"));
break;
case STORE_SIDENTIFY:
strcpy(tempstr, "Are you sure you want to identify this item?");
strcpy(tempstr, _("Are you sure you want to identify this item?"));
break;
case STORE_HBUY:
case STORE_SPBUY:
case STORE_WBUY:
case STORE_SBUY:
strcpy(tempstr, "Are you sure you want to buy this item?");
strcpy(tempstr, _("Are you sure you want to buy this item?"));
break;
case STORE_WRECHARGE:
strcpy(tempstr, "Are you sure you want to recharge this item?");
strcpy(tempstr, _("Are you sure you want to recharge this item?"));
break;
case STORE_SSELL:
case STORE_WSELL:
strcpy(tempstr, "Are you sure you want to sell this item?");
strcpy(tempstr, _("Are you sure you want to sell this item?"));
break;
case STORE_SREPAIR:
strcpy(tempstr, "Are you sure you want to repair this item?");
strcpy(tempstr, _("Are you sure you want to repair this item?"));
break;
default:
app_fatal("Unknown store dialog %d", stextshold);
}
AddSText(0, 15, true, tempstr, COL_WHITE, false);
AddSText(0, 18, true, "Yes", COL_WHITE, true);
AddSText(0, 20, true, "No", COL_WHITE, true);
AddSText(0, 18, true, _("Yes"), COL_WHITE, true);
AddSText(0, 20, true, _("No"), COL_WHITE, true);
}
void S_StartBoy()
{
stextsize = false;
stextscrl = false;
AddSText(0, 2, true, "Wirt the Peg-legged boy", COL_GOLD, false);
AddSText(0, 2, true, _("Wirt the Peg-legged boy"), COL_GOLD, false);
AddSLine(5);
if (!boyitem.isEmpty()) {
AddSText(0, 8, true, "Talk to Wirt", COL_BLUE, true);
AddSText(0, 12, true, "I have something for sale,", COL_GOLD, false);
AddSText(0, 14, true, "but it will cost 50 gold", COL_GOLD, false);
AddSText(0, 16, true, "just to take a look. ", COL_GOLD, false);
AddSText(0, 18, true, "What have you got?", COL_WHITE, true);
AddSText(0, 20, true, "Say goodbye", COL_WHITE, true);
AddSText(0, 8, true, _("Talk to Wirt"), COL_BLUE, true);
AddSText(0, 12, true, _("I have something for sale,"), COL_GOLD, false);
AddSText(0, 14, true, _("but it will cost 50 gold"), COL_GOLD, false);
AddSText(0, 16, true, _("just to take a look. "), COL_GOLD, false);
AddSText(0, 18, true, _("What have you got?"), COL_WHITE, true);
AddSText(0, 20, true, _("Say goodbye"), COL_WHITE, true);
} else {
AddSText(0, 12, true, "Talk to Wirt", COL_BLUE, true);
AddSText(0, 18, true, "Say goodbye", COL_WHITE, true);
AddSText(0, 12, true, _("Talk to Wirt"), COL_BLUE, true);
AddSText(0, 18, true, _("Say goodbye"), COL_WHITE, true);
}
}
@ -911,7 +912,7 @@ void S_StartBBoy()
{
stextsize = true;
stextscrl = false;
sprintf(tempstr, "I have this item for sale: Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("I have this item for sale: Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
@ -927,7 +928,7 @@ void S_StartBBoy()
else
AddSTextVal(10, boyitem._iIvalue + (boyitem._iIvalue / 2));
PrintStoreItem(&boyitem, 11, iclr);
AddSText(0, 22, true, "Leave", COL_WHITE, true);
AddSText(0, 22, true, _("Leave"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
@ -946,12 +947,12 @@ void S_StartHealer()
HealPlayer();
stextsize = false;
stextscrl = false;
AddSText(0, 1, true, "Welcome to the", COL_GOLD, false);
AddSText(0, 3, true, "Healer's home", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Pepin", COL_BLUE, true);
AddSText(0, 14, true, "Buy items", COL_WHITE, true);
AddSText(0, 16, true, "Leave Healer's home", COL_WHITE, true);
AddSText(0, 1, true, _("Welcome to the"), COL_GOLD, false);
AddSText(0, 3, true, _("Healer's home"), COL_GOLD, false);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Pepin"), COL_BLUE, true);
AddSText(0, 14, true, _("Buy items"), COL_WHITE, true);
AddSText(0, 16, true, _("Leave Healer's home"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}
@ -985,12 +986,12 @@ void S_StartHBuy()
stextsize = true;
stextscrl = true;
stextsval = 0;
sprintf(tempstr, "I have these items for sale: Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("I have these items for sale: Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollHBuy(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, false);
AddSText(0, 22, true, _("Back"), COL_WHITE, false);
OffsetSTextY(22, 6);
storenumh = 0;
@ -1006,11 +1007,11 @@ void S_StartStory()
{
stextsize = false;
stextscrl = false;
AddSText(0, 2, true, "The Town Elder", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Cain", COL_BLUE, true);
AddSText(0, 14, true, "Identify an item", COL_WHITE, true);
AddSText(0, 18, true, "Say goodbye", COL_WHITE, true);
AddSText(0, 2, true, _("The Town Elder"), COL_GOLD, false);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Cain"), COL_BLUE, true);
AddSText(0, 14, true, _("Identify an item"), COL_WHITE, true);
AddSText(0, 18, true, _("Say goodbye"), COL_WHITE, true);
AddSLine(5);
}
@ -1086,22 +1087,22 @@ void S_StartSIdentify()
if (!idok) {
stextscrl = false;
sprintf(tempstr, "You have nothing to identify. Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("You have nothing to identify. Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
} else {
stextscrl = true;
stextsval = 0;
stextsmax = plr[myplr]._pNumInv;
sprintf(tempstr, "Identify which item? Your gold: %i", plr[myplr]._pGold);
sprintf(tempstr, _("Identify which item? Your gold: %i"), plr[myplr]._pGold);
AddSText(0, 1, true, tempstr, COL_GOLD, false);
AddSLine(3);
AddSLine(21);
S_ScrollSSell(stextsval);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
OffsetSTextY(22, 6);
}
}
@ -1113,10 +1114,10 @@ void S_StartIdShow()
ClearSText(5, 23);
text_color iclr = GetItemTextColor(plr[myplr].HoldItem);
AddSText(0, 7, true, "This item is:", COL_WHITE, false);
AddSText(0, 7, true, _("This item is:"), COL_WHITE, false);
AddSText(20, 11, false, plr[myplr].HoldItem._iIName, iclr, false);
PrintStoreItem(&plr[myplr].HoldItem, 12, iclr);
AddSText(0, 18, true, "Done", COL_WHITE, true);
AddSText(0, 18, true, _("Done"), COL_WHITE, true);
}
void S_StartTalk()
@ -1125,16 +1126,16 @@ void S_StartTalk()
stextsize = false;
stextscrl = false;
sprintf(tempstr, "Talk to %s", talkname[talker]);
sprintf(tempstr, _("Talk to %s"), talkname[talker]);
AddSText(0, 2, true, tempstr, COL_GOLD, false);
AddSLine(5);
if (gbIsSpawn) {
sprintf(tempstr, "Talking to %s", talkname[talker]);
sprintf(tempstr, _("Talking to %s"), talkname[talker]);
AddSText(0, 10, true, tempstr, COL_WHITE, false);
AddSText(0, 12, true, "is not available", COL_WHITE, false);
AddSText(0, 14, true, "in the shareware", COL_WHITE, false);
AddSText(0, 16, true, "version", COL_WHITE, false);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, 12, true, _("is not available"), COL_WHITE, false);
AddSText(0, 14, true, _("in the shareware"), COL_WHITE, false);
AddSText(0, 16, true, _("version"), COL_WHITE, false);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
return;
}
@ -1160,19 +1161,19 @@ void S_StartTalk()
sn += la;
}
}
AddSText(0, sn2, true, "Gossip", COL_BLUE, true);
AddSText(0, 22, true, "Back", COL_WHITE, true);
AddSText(0, sn2, true, _("Gossip"), COL_BLUE, true);
AddSText(0, 22, true, _("Back"), COL_WHITE, true);
}
void S_StartTavern()
{
stextsize = false;
stextscrl = false;
AddSText(0, 1, true, "Welcome to the", COL_GOLD, false);
AddSText(0, 3, true, "Rising Sun", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Ogden", COL_BLUE, true);
AddSText(0, 18, true, "Leave the tavern", COL_WHITE, true);
AddSText(0, 1, true, _("Welcome to the"), COL_GOLD, false);
AddSText(0, 3, true, _("Rising Sun"), COL_GOLD, false);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Ogden"), COL_BLUE, true);
AddSText(0, 18, true, _("Leave the tavern"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}
@ -1182,9 +1183,9 @@ void S_StartBarMaid()
stextsize = false;
stextscrl = false;
AddSText(0, 2, true, "Gillian", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Gillian", COL_BLUE, true);
AddSText(0, 18, true, "Say goodbye", COL_WHITE, true);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Gillian"), COL_BLUE, true);
AddSText(0, 18, true, _("Say goodbye"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}
@ -1193,10 +1194,10 @@ void S_StartDrunk()
{
stextsize = false;
stextscrl = false;
AddSText(0, 2, true, "Farnham the Drunk", COL_GOLD, false);
AddSText(0, 9, true, "Would you like to:", COL_GOLD, false);
AddSText(0, 12, true, "Talk to Farnham", COL_BLUE, true);
AddSText(0, 18, true, "Say Goodbye", COL_WHITE, true);
AddSText(0, 2, true, _("Farnham the Drunk"), COL_GOLD, false);
AddSText(0, 9, true, _("Would you like to:"), COL_GOLD, false);
AddSText(0, 12, true, _("Talk to Farnham"), COL_BLUE, true);
AddSText(0, 18, true, _("Say Goodbye"), COL_WHITE, true);
AddSLine(5);
storenumh = 20;
}

27
Source/towners.cpp

@ -9,6 +9,7 @@
#include "inv.h"
#include "minitext.h"
#include "stores.h"
#include "utils/language.h"
namespace devilution {
@ -237,7 +238,7 @@ void InitSmith()
}
towners[numtowners]._tNFrames = 16;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_SW], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Griswold the Blacksmith");
strcpy(towners[numtowners]._tName, _("Griswold the Blacksmith"));
numtowners++;
}
@ -251,7 +252,7 @@ void InitBarOwner()
}
towners[numtowners]._tNFrames = 16;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_SW], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Ogden the Tavern owner");
strcpy(towners[numtowners]._tName, _("Ogden the Tavern owner"));
numtowners++;
}
@ -267,7 +268,7 @@ void InitTownDead()
}
towners[numtowners]._tNFrames = 8;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_N], towners[numtowners]._tNFrames, 6);
strcpy(towners[numtowners]._tName, "Wounded Townsman");
strcpy(towners[numtowners]._tName, _("Wounded Townsman"));
numtowners++;
}
@ -283,7 +284,7 @@ void InitWitch()
}
towners[numtowners]._tNFrames = 19;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 6);
strcpy(towners[numtowners]._tName, "Adria the Witch");
strcpy(towners[numtowners]._tName, _("Adria the Witch"));
numtowners++;
}
@ -299,7 +300,7 @@ void InitBarmaid()
}
towners[numtowners]._tNFrames = 18;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 6);
strcpy(towners[numtowners]._tName, "Gillian the Barmaid");
strcpy(towners[numtowners]._tName, _("Gillian the Barmaid"));
numtowners++;
}
@ -315,7 +316,7 @@ void InitBoy()
}
towners[numtowners]._tNFrames = 20;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 6);
strcpy(towners[numtowners]._tName, "Wirt the Peg-legged boy");
strcpy(towners[numtowners]._tName, _("Wirt the Peg-legged boy"));
numtowners++;
}
@ -331,7 +332,7 @@ void InitHealer()
}
towners[numtowners]._tNFrames = 20;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_SE], towners[numtowners]._tNFrames, 6);
strcpy(towners[numtowners]._tName, "Pepin the Healer");
strcpy(towners[numtowners]._tName, _("Pepin the Healer"));
numtowners++;
}
@ -347,7 +348,7 @@ void InitTeller()
}
towners[numtowners]._tNFrames = 25;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Cain the Elder");
strcpy(towners[numtowners]._tName, _("Cain the Elder"));
numtowners++;
}
@ -363,7 +364,7 @@ void InitDrunk()
}
towners[numtowners]._tNFrames = 18;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Farnham the Drunk");
strcpy(towners[numtowners]._tName, _("Farnham the Drunk"));
numtowners++;
}
@ -386,7 +387,7 @@ void InitCows()
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[dir], towners[numtowners]._tNFrames, 3);
towners[numtowners]._tAnimFrame = GenerateRnd(11) + 1;
towners[numtowners]._tSelFlag = true;
strcpy(towners[numtowners]._tName, "Cow");
strcpy(towners[numtowners]._tName, _("Cow"));
xo = x + cowoffx[dir];
yo = y + cowoffy[dir];
@ -413,7 +414,7 @@ void InitFarmer()
}
towners[numtowners]._tNFrames = 15;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_S], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Lester the farmer");
strcpy(towners[numtowners]._tName, _("Lester the farmer"));
numtowners++;
}
@ -433,7 +434,7 @@ void InitCowFarmer()
}
towners[numtowners]._tNFrames = 15;
NewTownerAnim(numtowners, towners[numtowners]._tNAnim[DIR_SW], towners[numtowners]._tNFrames, 3);
strcpy(towners[numtowners]._tName, "Complete Nut");
strcpy(towners[numtowners]._tName, _("Complete Nut"));
numtowners++;
}
@ -549,7 +550,7 @@ void TownDead()
if (quests[Q_BUTCHER]._qactive != QUEST_INIT) {
towners[tidx]._tAnimDelay = 1000;
towners[tidx]._tAnimFrame = 1;
strcpy(towners[tidx]._tName, "Slain Townsman");
strcpy(towners[tidx]._tName, _("Slain Townsman"));
}
}
if (quests[Q_BUTCHER]._qactive != QUEST_INIT)

1480
Translations/da.po

File diff suppressed because it is too large Load Diff

1453
Translations/hr.po

File diff suppressed because it is too large Load Diff

6678
Translations/it.po

File diff suppressed because it is too large Load Diff

1454
Translations/pt-BR.po

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save