From 92f504f98d4af7a31df7b1bfa80fce114638f4cf Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Fri, 29 Jul 2011 23:33:33 +0200 Subject: fixed displaying "umlauts" (deutsch umlaute) and hopefully other non ASCII chars, too --- src/guiPasswordChange.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/guiPasswordChange.cpp') diff --git a/src/guiPasswordChange.cpp b/src/guiPasswordChange.cpp index fabe75110..89a6ce682 100644 --- a/src/guiPasswordChange.cpp +++ b/src/guiPasswordChange.cpp @@ -96,12 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) Add stuff */ s32 ypos = 50; + setlocale(LC_CTYPE, ""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("Old Password")), rect, false, true, this, -1); } + setlocale(LC_CTYPE, "en_US"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -111,12 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; + setlocale(LC_CTYPE, ""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("New Password")), rect, false, true, this, -1); } + setlocale(LC_CTYPE, "en_US"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -125,12 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; + setlocale(LC_CTYPE, ""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("Confirm Password")), rect, false, true, this, -1); } + setlocale(LC_CTYPE, "en_US"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -140,6 +146,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) } ypos += 50; + setlocale(LC_CTYPE, ""); { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, ypos); @@ -156,6 +163,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) rect, false, true, this, ID_message); e->setVisible(false); } + setlocale(LC_CTYPE, "en_US"); } -- cgit v1.2.3 From 9baae3a701f7bdf50972d8381904d11eee77aa4e Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Sat, 30 Jul 2011 10:14:58 +0200 Subject: set locales to C because en_US not installed on some systems, only UTF-8 version and en_US.UTF-8 does not work. --- src/gettext.h | 10 ++++++++++ src/guiMainMenu.cpp | 12 ++++++------ src/guiMessageMenu.cpp | 4 ++-- src/guiPasswordChange.cpp | 16 ++++++++-------- src/guiPauseMenu.cpp | 4 ++-- src/guiTextInputMenu.cpp | 4 ++-- 6 files changed, 30 insertions(+), 20 deletions(-) (limited to 'src/guiPasswordChange.cpp') diff --git a/src/gettext.h b/src/gettext.h index 493f9b21b..790375165 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -25,3 +25,13 @@ inline wchar_t* chartowchar_t(const char *str) mbstowcs(nstr, str, l); return nstr; } + +inline void changeCtype(const char *l) +{ + char *ret = NULL; + ret = setlocale(LC_CTYPE, l); + if(ret == NULL) + std::cout<<"locale could not be set"< rect(0, 0, 20, 125); rect += topleft_client + v2s32(-15, 60); @@ -181,7 +181,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) Environment->addStaticText(chartowchar_t(gettext("Name/Password")), rect, false, true, this, -1); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, 50); @@ -198,7 +198,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } - setlocale(LC_CTYPE, ""); + changeCtype(""); // Address + port { core::rect rect(0, 0, 110, 20); @@ -206,7 +206,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) Environment->addStaticText(chartowchar_t(gettext("Address/Port")), rect, false, true, this, -1); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, 100); @@ -221,7 +221,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) rect += topleft_client + v2s32(size_client.X-60-100, 100); Environment->addEditBox(text_port.c_str(), rect, true, this, GUI_ID_PORT_INPUT); } - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 400, 20); rect += topleft_client + v2s32(160, 100+35); @@ -294,7 +294,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON, chartowchar_t(gettext("Delete map"))); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); } void GUIMainMenu::drawMenu() diff --git a/src/guiMessageMenu.cpp b/src/guiMessageMenu.cpp index b03f87b31..27ff3dafa 100644 --- a/src/guiMessageMenu.cpp +++ b/src/guiMessageMenu.cpp @@ -85,7 +85,7 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize) Environment->addStaticText(m_message_text.c_str(), rect, false, true, this, 256); } - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25); @@ -94,7 +94,7 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize) chartowchar_t(gettext("Proceed"))); Environment->setFocus(e); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("en_US.UTF-8"); } void GUIMessageMenu::drawMenu() diff --git a/src/guiPasswordChange.cpp b/src/guiPasswordChange.cpp index 89a6ce682..2a7fb009a 100644 --- a/src/guiPasswordChange.cpp +++ b/src/guiPasswordChange.cpp @@ -96,14 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) Add stuff */ s32 ypos = 50; - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("Old Password")), rect, false, true, this, -1); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -113,14 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("New Password")), rect, false, true, this, -1); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -129,14 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(chartowchar_t(gettext("Confirm Password")), rect, false, true, this, -1); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -146,7 +146,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) } ypos += 50; - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, ypos); @@ -163,7 +163,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) rect, false, true, this, ID_message); e->setVisible(false); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); } diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp index 3a5d245bc..6cf364e5f 100644 --- a/src/guiPauseMenu.cpp +++ b/src/guiPauseMenu.cpp @@ -103,7 +103,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize) const s32 btn_gap = 20; const s32 btn_num = 4; s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2; - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 140, btn_height); rect = rect + v2s32(size.X/2-140/2, btn_y); @@ -181,7 +181,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize) Environment->addStaticText(narrow_to_wide(os.str()).c_str(), rect, false, true, this, 259); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); } void GUIPauseMenu::drawMenu() diff --git a/src/guiTextInputMenu.cpp b/src/guiTextInputMenu.cpp index 8c32490be..a59602554 100644 --- a/src/guiTextInputMenu.cpp +++ b/src/guiTextInputMenu.cpp @@ -104,14 +104,14 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize) Environment->addEditBox(text.c_str(), rect, true, this, 256); Environment->setFocus(e); } - setlocale(LC_CTYPE, ""); + changeCtype(""); { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25); Environment->addButton(rect, this, 257, chartowchar_t(gettext("Proceed"))); } - setlocale(LC_CTYPE, "en_US"); + changeCtype("C"); } void GUITextInputMenu::drawMenu() -- cgit v1.2.3 From 1d1aec9631e3ae077db6060f0fe19487b7b23aae Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 31 Jul 2011 09:05:52 +0200 Subject: Use wgettext --- src/guiKeyChangeMenu.cpp | 58 +++++++++++++++++++++++------------------------ src/guiMainMenu.cpp | 20 ++++++++-------- src/guiMessageMenu.cpp | 2 +- src/guiPasswordChange.cpp | 10 ++++---- src/guiPauseMenu.cpp | 8 +++---- src/guiTextInputMenu.cpp | 2 +- 6 files changed, 50 insertions(+), 50 deletions(-) (limited to 'src/guiPasswordChange.cpp') diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index ffc676603..6e41677ce 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -81,7 +81,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 125, 20); rect += topleft + v2s32(25, 3); //gui::IGUIStaticText *t = - Environment->addStaticText(chartowchar_t(gettext("KEYBINDINGS")), + Environment->addStaticText(wgettext("KEYBINDINGS"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -91,7 +91,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Forward")), + Environment->addStaticText(wgettext("Forward"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -108,7 +108,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Backward")), + Environment->addStaticText(wgettext("Backward"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -124,7 +124,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Left")), + Environment->addStaticText(wgettext("Left"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -139,7 +139,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Right")), + Environment->addStaticText(wgettext("Right"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -155,7 +155,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Use")), + Environment->addStaticText(wgettext("Use"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -170,7 +170,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Sneak")), + Environment->addStaticText(wgettext("Sneak"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -186,7 +186,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Jump")), rect, false, true, this, -1); + Environment->addStaticText(wgettext("Jump"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -201,7 +201,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Inventory")), + Environment->addStaticText(wgettext("Inventory"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -217,7 +217,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Chat")), rect, false, true, this, -1); + Environment->addStaticText(wgettext("Chat"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -233,7 +233,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Toggle fly")), + Environment->addStaticText(wgettext("Toggle fly"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -248,7 +248,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Toggle fast")), + Environment->addStaticText(wgettext("Toggle fast"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -263,7 +263,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Range select")), + Environment->addStaticText(wgettext("Range select"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -280,7 +280,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - Environment->addStaticText(chartowchar_t(gettext("Print stacks")), + Environment->addStaticText(wgettext("Print stacks"), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -295,13 +295,13 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(size.X - 100 - 20, size.Y - 40); Environment->addButton(rect, this, GUI_ID_BACK_BUTTON, - chartowchar_t(gettext("Save"))); + wgettext("Save")); } { core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(size.X - 100 - 20 - 100 - 20, size.Y - 40); Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, - chartowchar_t(gettext("Cancel"))); + wgettext("Cancel")); } } @@ -526,67 +526,67 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) case GUI_ID_KEY_FORWARD_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->forward->setText(chartowchar_t(gettext("press Key"))); + this->forward->setText(wgettext("press Key")); break; case GUI_ID_KEY_BACKWARD_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->backward->setText(chartowchar_t(gettext("press Key"))); + this->backward->setText(wgettext("press Key")); break; case GUI_ID_KEY_LEFT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->left->setText(chartowchar_t(gettext("press Key"))); + this->left->setText(wgettext("press Key")); break; case GUI_ID_KEY_RIGHT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->right->setText(chartowchar_t(gettext("press Key"))); + this->right->setText(wgettext("press Key")); break; case GUI_ID_KEY_USE_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->use->setText(chartowchar_t(gettext("press Key"))); + this->use->setText(wgettext("press Key")); break; case GUI_ID_KEY_FLY_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->fly->setText(chartowchar_t(gettext("press Key"))); + this->fly->setText(wgettext("press Key")); break; case GUI_ID_KEY_FAST_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->fast->setText(chartowchar_t(gettext("press Key"))); + this->fast->setText(wgettext("press Key")); break; case GUI_ID_KEY_JUMP_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->jump->setText(chartowchar_t(gettext("press Key"))); + this->jump->setText(wgettext("press Key")); break; case GUI_ID_KEY_CHAT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->chat->setText(chartowchar_t(gettext("press Key"))); + this->chat->setText(wgettext("press Key")); break; case GUI_ID_KEY_SNEAK_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->sneak->setText(chartowchar_t(gettext("press Key"))); + this->sneak->setText(wgettext("press Key")); break; case GUI_ID_KEY_INVENTORY_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->inventory->setText(chartowchar_t(gettext("press Key"))); + this->inventory->setText(wgettext("press Key")); break; case GUI_ID_KEY_DUMP_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->dump->setText(chartowchar_t(gettext("press Key"))); + this->dump->setText(wgettext("press Key")); break; case GUI_ID_KEY_RANGE_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->range->setText(chartowchar_t(gettext("press Key"))); + this->range->setText(wgettext("press Key")); break; } //Buttons diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp index 63bc72d24..2d5bd151a 100644 --- a/src/guiMainMenu.cpp +++ b/src/guiMainMenu.cpp @@ -178,7 +178,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, 50+6); - Environment->addStaticText(chartowchar_t(gettext("Name/Password")), + Environment->addStaticText(wgettext("Name/Password"), rect, false, true, this, -1); } changeCtype("C"); @@ -203,7 +203,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, 100+6); - Environment->addStaticText(chartowchar_t(gettext("Address/Port")), + Environment->addStaticText(wgettext("Address/Port"), rect, false, true, this, -1); } changeCtype("C"); @@ -225,20 +225,20 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 400, 20); rect += topleft_client + v2s32(160, 100+35); - Environment->addStaticText(chartowchar_t(gettext("Leave address blank to start a local server.")), + Environment->addStaticText(wgettext("Leave address blank to start a local server."), rect, false, true, this, -1); } { core::rect rect(0, 0, 250, 30); rect += topleft_client + v2s32(35, 150); Environment->addCheckBox(fancy_trees, rect, this, GUI_ID_FANCYTREE_CB, - chartowchar_t(gettext("Fancy trees"))); + wgettext("Fancy trees")); } { core::rect rect(0, 0, 250, 30); rect += topleft_client + v2s32(35, 150+30); Environment->addCheckBox(smooth_lighting, rect, this, GUI_ID_SMOOTH_LIGHTING_CB, - chartowchar_t(gettext("Smooth Lighting"))); + wgettext("Smooth Lighting")); } // Start game button { @@ -246,7 +246,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) //rect += topleft_client + v2s32(size_client.X/2-180/2, 225-30/2); rect += topleft_client + v2s32(size_client.X-180-40, 150+25); Environment->addButton(rect, this, GUI_ID_JOIN_GAME_BUTTON, - chartowchar_t(gettext("Start Game / Connect"))); + wgettext("Start Game / Connect")); } // Key change button @@ -255,7 +255,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) //rect += topleft_client + v2s32(size_client.X/2-180/2, 225-30/2); rect += topleft_client + v2s32(size_client.X-180-40-100-20, 150+25); Environment->addButton(rect, this, GUI_ID_CHANGE_KEYS_BUTTON, - chartowchar_t(gettext("Change keys"))); + wgettext("Change keys")); } /* Server section @@ -278,13 +278,13 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) core::rect rect(0, 0, 250, 30); rect += topleft_server + v2s32(35, 30); Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB, - chartowchar_t(gettext("Creative Mode"))); + wgettext("Creative Mode")); } { core::rect rect(0, 0, 250, 30); rect += topleft_server + v2s32(35, 60); Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB, - chartowchar_t(gettext("Enable Damage"))); + wgettext("Enable Damage")); } // Map delete button { @@ -292,7 +292,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize) //rect += topleft_server + v2s32(size_server.X-40-130, 100+25); rect += topleft_server + v2s32(40, 100+25); Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON, - chartowchar_t(gettext("Delete map"))); + wgettext("Delete map")); } changeCtype("C"); } diff --git a/src/guiMessageMenu.cpp b/src/guiMessageMenu.cpp index 71c8fd1e8..14b360708 100644 --- a/src/guiMessageMenu.cpp +++ b/src/guiMessageMenu.cpp @@ -91,7 +91,7 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize) rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25); gui::IGUIElement *e = Environment->addButton(rect, this, 257, - chartowchar_t(gettext("Proceed"))); + wgettext("Proceed")); Environment->setFocus(e); } changeCtype("C"); diff --git a/src/guiPasswordChange.cpp b/src/guiPasswordChange.cpp index 2a7fb009a..273326fd5 100644 --- a/src/guiPasswordChange.cpp +++ b/src/guiPasswordChange.cpp @@ -100,7 +100,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - Environment->addStaticText(chartowchar_t(gettext("Old Password")), + Environment->addStaticText(wgettext("Old Password"), rect, false, true, this, -1); } changeCtype("C"); @@ -117,7 +117,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - Environment->addStaticText(chartowchar_t(gettext("New Password")), + Environment->addStaticText(wgettext("New Password"), rect, false, true, this, -1); } changeCtype("C"); @@ -133,7 +133,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - Environment->addStaticText(chartowchar_t(gettext("Confirm Password")), + Environment->addStaticText(wgettext("Confirm Password"), rect, false, true, this, -1); } changeCtype("C"); @@ -150,7 +150,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, ypos); - Environment->addButton(rect, this, ID_change, chartowchar_t(gettext("Change"))); + Environment->addButton(rect, this, ID_change, wgettext("Change")); } ypos += 50; @@ -159,7 +159,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) rect += topleft_client + v2s32(35, ypos); IGUIElement *e = Environment->addStaticText( - chartowchar_t(gettext("Passwords do not match!")), + wgettext("Passwords do not match!"), rect, false, true, this, ID_message); e->setVisible(false); } diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp index 6cf364e5f..8ccf0c468 100644 --- a/src/guiPauseMenu.cpp +++ b/src/guiPauseMenu.cpp @@ -108,28 +108,28 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize) core::rect rect(0, 0, 140, btn_height); rect = rect + v2s32(size.X/2-140/2, btn_y); Environment->addButton(rect, this, 256, - chartowchar_t(gettext("Continue"))); + wgettext("Continue")); } btn_y += btn_height + btn_gap; { core::rect rect(0, 0, 140, btn_height); rect = rect + v2s32(size.X/2-140/2, btn_y); Environment->addButton(rect, this, 261, - chartowchar_t(gettext("Change Password"))); + wgettext("Change Password")); } btn_y += btn_height + btn_gap; { core::rect rect(0, 0, 140, btn_height); rect = rect + v2s32(size.X/2-140/2, btn_y); Environment->addButton(rect, this, 260, - chartowchar_t(gettext("Disconnect"))); + wgettext("Disconnect")); } btn_y += btn_height + btn_gap; { core::rect rect(0, 0, 140, btn_height); rect = rect + v2s32(size.X/2-140/2, btn_y); Environment->addButton(rect, this, 257, - chartowchar_t(gettext("Exit to OS"))); + wgettext("Exit to OS")); } { diff --git a/src/guiTextInputMenu.cpp b/src/guiTextInputMenu.cpp index a59602554..bfe0ea5de 100644 --- a/src/guiTextInputMenu.cpp +++ b/src/guiTextInputMenu.cpp @@ -109,7 +109,7 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize) core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25); Environment->addButton(rect, this, 257, - chartowchar_t(gettext("Proceed"))); + wgettext("Proceed")); } changeCtype("C"); } -- cgit v1.2.3