From bfd1d1bcc2a6ecd7efe301bfbf22a1e9b9188706 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 6 Jan 2009 13:52:30 +0100 Subject: Added support for internationalization Merged from the mainline client. Originally implemented by Guillaume Melquiond, starting with commit 1828eee6a6d91fd385ad1e69d93044516493aa91. --- src/gui/menuwindow.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/gui/menuwindow.cpp') diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index 3c3e4ab8..0893cb1c 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -28,6 +28,8 @@ #include "button.h" #include "windowcontainer.h" +#include "../utils/gettext.h" + extern Window *setupWindow; extern Window *inventoryWindow; extern Window *equipmentWindow; @@ -54,21 +56,21 @@ MenuWindow::MenuWindow(): setTitleBarHeight(0); // Buttons - const char *buttonNames[] = + static const char *buttonNames[] = { - "Status", - "Equipment", - "Inventory", - "Skills", - "Shortcut", - "Setup", + N_("Status"), + N_("Equipment"), + N_("Inventory"), + N_("Skills"), + N_("Shortcut"), + N_("Setup"), 0 }; int x = 0, h = 0; for (const char **curBtn = buttonNames; *curBtn; curBtn++) { - gcn::Button *btn = new Button(*curBtn, *curBtn, &listener); + gcn::Button *btn = new Button(gettext(*curBtn), *curBtn, &listener); btn->setPosition(x, 0); add(btn); x += btn->getWidth() + 3; -- cgit v1.2.3-70-g09d2