From 37bf9a666aaa37b21d944ac7cca73c2b92f92c68 Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Sat, 30 Jul 2011 11:43:20 +0200 Subject: set some more text to gettext and updated po files --- src/guiKeyChangeMenu.cpp | 84 +++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 41 deletions(-) (limited to 'src/guiKeyChangeMenu.cpp') diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 98d6f8086..7855751ff 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -80,9 +80,9 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 125, 20); rect += topleft + v2s32(25, 3); - const wchar_t *text = L"KEYBINDINGS"; //gui::IGUIStaticText *t = - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("KEYBINDINGS")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } v2s32 offset(25, 40); @@ -91,8 +91,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Forward"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Forward")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -108,8 +108,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Backward"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Backward")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -124,8 +124,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Left"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Left")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -139,8 +139,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Right"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Right")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -155,8 +155,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Use"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Use")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -170,8 +170,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Sneak"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Sneak")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -186,8 +186,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Jump"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Jump")), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -202,8 +201,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Inventory"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Inventory")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -218,8 +217,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Chat"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Chat")), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -235,8 +233,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Toggle fly"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Toggle fly")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -250,8 +248,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Toggle fast"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Toggle fast")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -266,7 +264,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); const wchar_t *text = L"Range select"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Range select")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -283,7 +282,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); const wchar_t *text = L"Print stacks"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(chartowchar_t(gettext("Print stacks")), + rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } @@ -296,12 +296,14 @@ 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, L"Save"); + Environment->addButton(rect, this, GUI_ID_BACK_BUTTON, + chartowchar_t(gettext("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, L"Cancel"); + Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, + chartowchar_t(gettext("Cancel"))); } } @@ -526,67 +528,67 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) case GUI_ID_KEY_FORWARD_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->forward->setText(L"press Key"); + this->forward->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_BACKWARD_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->backward->setText(L"press Key"); + this->backward->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_LEFT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->left->setText(L"press Key"); + this->left->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_RIGHT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->right->setText(L"press Key"); + this->right->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_USE_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->use->setText(L"press Key"); + this->use->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_FLY_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->fly->setText(L"press Key"); + this->fly->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_FAST_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->fast->setText(L"press Key"); + this->fast->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_JUMP_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->jump->setText(L"press Key"); + this->jump->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_CHAT_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->chat->setText(L"press Key"); + this->chat->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_SNEAK_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->sneak->setText(L"press Key"); + this->sneak->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_INVENTORY_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->inventory->setText(L"press Key"); + this->inventory->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_DUMP_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->dump->setText(L"press Key"); + this->dump->setText(chartowchar_t(gettext("press Key"))); break; case GUI_ID_KEY_RANGE_BUTTON: resetMenu(); activeKey = event.GUIEvent.Caller->getID(); - this->range->setText(L"press Key"); + this->range->setText(chartowchar_t(gettext("press Key"))); break; } //Buttons -- cgit v1.2.3 From 60bd878f0a0e0ad0c1d8f01aa9ba425e58cb2c2e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 31 Jul 2011 08:57:52 +0200 Subject: Get rid of unused variables --- src/guiKeyChangeMenu.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/guiKeyChangeMenu.cpp') diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 7855751ff..ffc676603 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -263,7 +263,6 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Range select"; Environment->addStaticText(chartowchar_t(gettext("Range select")), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); @@ -281,7 +280,6 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 20); rect += topleft + v2s32(offset.X, offset.Y); - const wchar_t *text = L"Print stacks"; Environment->addStaticText(chartowchar_t(gettext("Print stacks")), rect, false, true, this, -1); //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); -- 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/guiKeyChangeMenu.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 From 0cfca69b42e1a252584367c06a7bcfd6d2781411 Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Tue, 2 Aug 2011 10:44:25 +0200 Subject: fixed displaying special chars in the keychange menu --- src/guiKeyChangeMenu.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/guiKeyChangeMenu.cpp') diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 6e41677ce..cdf32d176 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -76,7 +76,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) recalculateAbsolutePosition(false); v2s32 topleft(0, 0); - + changeCtype(""); { core::rect < s32 > rect(0, 0, 125, 20); rect += topleft + v2s32(25, 3); @@ -303,6 +303,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, wgettext("Cancel")); } + changeCtype("C"); } void GUIKeyChangeMenu::drawMenu() @@ -417,6 +418,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) if (event.EventType == EET_KEY_INPUT_EVENT && activeKey >= 0 && event.KeyInput.PressedDown) { + changeCtype(""); if (activeKey == GUI_ID_KEY_FORWARD_BUTTON) { this->forward->setText( @@ -495,7 +497,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); this->key_dump = event.KeyInput.Key; } - + changeCtype("C"); activeKey = -1; return true; } @@ -514,6 +516,12 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) } if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED) { + if(event.GUIEvent.Caller->getID() != GUI_ID_BACK_BUTTON && + event.GUIEvent.Caller->getID() != GUI_ID_ABORT_BUTTON) + { + changeCtype(""); + } + switch (event.GUIEvent.Caller->getID()) { case GUI_ID_BACK_BUTTON: //back @@ -590,6 +598,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) break; } //Buttons + changeCtype("C"); } } -- cgit v1.2.3 From 4ab4e3345040f8543f2a54c04dceeb899680ad5d Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Tue, 2 Aug 2011 11:38:35 +0200 Subject: marked strings as translation now translated if set to a button --- src/guiKeyChangeMenu.cpp | 78 ++++++++++++++++++++++++------------------------ src/guiKeyChangeMenu.h | 34 ++++++++++----------- 2 files changed, 56 insertions(+), 56 deletions(-) (limited to 'src/guiKeyChangeMenu.cpp') diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index cdf32d176..20a3d361e 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -101,7 +101,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->forward = Environment->addButton(rect, this, GUI_ID_KEY_FORWARD_BUTTON, - narrow_to_wide(KeyNames[key_forward]).c_str()); + wgettext(KeyNames[key_forward])); } offset += v2s32(0, 25); @@ -118,7 +118,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->backward = Environment->addButton(rect, this, GUI_ID_KEY_BACKWARD_BUTTON, - narrow_to_wide(KeyNames[key_backward]).c_str()); + wgettext(KeyNames[key_backward])); } offset += v2s32(0, 25); { @@ -133,7 +133,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->left = Environment->addButton(rect, this, GUI_ID_KEY_LEFT_BUTTON, - narrow_to_wide(KeyNames[key_left]).c_str()); + wgettext(KeyNames[key_left])); } offset += v2s32(0, 25); { @@ -149,7 +149,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->right = Environment->addButton(rect, this, GUI_ID_KEY_RIGHT_BUTTON, - narrow_to_wide(KeyNames[key_right]).c_str()); + wgettext(KeyNames[key_right])); } offset += v2s32(0, 25); { @@ -164,7 +164,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->use = Environment->addButton(rect, this, GUI_ID_KEY_USE_BUTTON, - narrow_to_wide(KeyNames[key_use]).c_str()); + wgettext(KeyNames[key_use])); } offset += v2s32(0, 25); { @@ -180,7 +180,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->sneak = Environment->addButton(rect, this, GUI_ID_KEY_SNEAK_BUTTON, - narrow_to_wide(KeyNames[key_sneak]).c_str()); + wgettext(KeyNames[key_sneak])); } offset += v2s32(0, 25); { @@ -194,7 +194,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->jump = Environment->addButton(rect, this, GUI_ID_KEY_JUMP_BUTTON, - narrow_to_wide(KeyNames[key_jump]).c_str()); + wgettext(KeyNames[key_jump])); } offset += v2s32(0, 25); @@ -211,7 +211,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->inventory = Environment->addButton(rect, this, GUI_ID_KEY_INVENTORY_BUTTON, - narrow_to_wide(KeyNames[key_inventory]).c_str()); + wgettext(KeyNames[key_inventory])); } offset += v2s32(0, 25); { @@ -225,7 +225,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->chat = Environment->addButton(rect, this, GUI_ID_KEY_CHAT_BUTTON, - narrow_to_wide(KeyNames[key_chat]).c_str()); + wgettext(KeyNames[key_chat])); } //next col @@ -242,7 +242,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->fly = Environment->addButton(rect, this, GUI_ID_KEY_FLY_BUTTON, - narrow_to_wide(KeyNames[key_fly]).c_str()); + wgettext(KeyNames[key_fly])); } offset += v2s32(0, 25); { @@ -257,7 +257,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->fast = Environment->addButton(rect, this, GUI_ID_KEY_FAST_BUTTON, - narrow_to_wide(KeyNames[key_fast]).c_str()); + wgettext(KeyNames[key_fast])); } offset += v2s32(0, 25); { @@ -273,7 +273,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->range = Environment->addButton(rect, this, GUI_ID_KEY_RANGE_BUTTON, - narrow_to_wide(KeyNames[key_range]).c_str()); + wgettext(KeyNames[key_range])); } offset += v2s32(0, 25); @@ -289,7 +289,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect < s32 > rect(0, 0, 100, 30); rect += topleft + v2s32(offset.X + 105, offset.Y - 5); this->dump = Environment->addButton(rect, this, GUI_ID_KEY_DUMP_BUTTON, - narrow_to_wide(KeyNames[key_dump]).c_str()); + wgettext(KeyNames[key_dump])); } { core::rect < s32 > rect(0, 0, 100, 30); @@ -367,45 +367,45 @@ bool GUIKeyChangeMenu::resetMenu() { case GUI_ID_KEY_FORWARD_BUTTON: this->forward->setText( - narrow_to_wide(KeyNames[key_forward]).c_str()); + wgettext(KeyNames[key_forward])); break; case GUI_ID_KEY_BACKWARD_BUTTON: this->backward->setText( - narrow_to_wide(KeyNames[key_backward]).c_str()); + wgettext(KeyNames[key_backward])); break; case GUI_ID_KEY_LEFT_BUTTON: - this->left->setText(narrow_to_wide(KeyNames[key_left]).c_str()); + this->left->setText(wgettext(KeyNames[key_left])); break; case GUI_ID_KEY_RIGHT_BUTTON: - this->right->setText(narrow_to_wide(KeyNames[key_right]).c_str()); + this->right->setText(wgettext(KeyNames[key_right])); break; case GUI_ID_KEY_JUMP_BUTTON: - this->jump->setText(narrow_to_wide(KeyNames[key_jump]).c_str()); + this->jump->setText(wgettext(KeyNames[key_jump])); break; case GUI_ID_KEY_SNEAK_BUTTON: - this->sneak->setText(narrow_to_wide(KeyNames[key_sneak]).c_str()); + this->sneak->setText(wgettext(KeyNames[key_sneak])); break; case GUI_ID_KEY_INVENTORY_BUTTON: this->inventory->setText( - narrow_to_wide(KeyNames[key_inventory]).c_str()); + wgettext(KeyNames[key_inventory])); break; case GUI_ID_KEY_CHAT_BUTTON: - this->chat->setText(narrow_to_wide(KeyNames[key_chat]).c_str()); + this->chat->setText(wgettext(KeyNames[key_chat])); break; case GUI_ID_KEY_RANGE_BUTTON: - this->range->setText(narrow_to_wide(KeyNames[key_range]).c_str()); + this->range->setText(wgettext(KeyNames[key_range])); break; case GUI_ID_KEY_FLY_BUTTON: - this->fly->setText(narrow_to_wide(KeyNames[key_fly]).c_str()); + this->fly->setText(wgettext(KeyNames[key_fly])); break; case GUI_ID_KEY_FAST_BUTTON: - this->fast->setText(narrow_to_wide(KeyNames[key_fast]).c_str()); + this->fast->setText(wgettext(KeyNames[key_fast])); break; case GUI_ID_KEY_USE_BUTTON: - this->use->setText(narrow_to_wide(KeyNames[key_use]).c_str()); + this->use->setText(wgettext(KeyNames[key_use])); break; case GUI_ID_KEY_DUMP_BUTTON: - this->dump->setText(narrow_to_wide(KeyNames[key_dump]).c_str()); + this->dump->setText(wgettext(KeyNames[key_dump])); break; } activeKey = -1; @@ -422,79 +422,79 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) if (activeKey == GUI_ID_KEY_FORWARD_BUTTON) { this->forward->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_forward = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_BACKWARD_BUTTON) { this->backward->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_backward = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_LEFT_BUTTON) { this->left->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_left = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_RIGHT_BUTTON) { this->right->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_right = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_JUMP_BUTTON) { this->jump->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_jump = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_SNEAK_BUTTON) { this->sneak->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_sneak = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_INVENTORY_BUTTON) { this->inventory->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_inventory = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_CHAT_BUTTON) { this->chat->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_chat = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_RANGE_BUTTON) { this->range->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_range = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_FLY_BUTTON) { this->fly->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_fly = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_FAST_BUTTON) { this->fast->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_fast = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_USE_BUTTON) { this->use->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_use = event.KeyInput.Key; } else if (activeKey == GUI_ID_KEY_DUMP_BUTTON) { this->dump->setText( - narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); + wgettext(KeyNames[event.KeyInput.Key])); this->key_dump = event.KeyInput.Key; } changeCtype("C"); diff --git a/src/guiKeyChangeMenu.h b/src/guiKeyChangeMenu.h index c40d802ac..db86ab2d1 100644 --- a/src/guiKeyChangeMenu.h +++ b/src/guiKeyChangeMenu.h @@ -30,32 +30,32 @@ #include static const char *KeyNames[] = - { "-", gettext("Left Button"), gettext("Right Button"), gettext("Cancel"), gettext("Middle Button"), gettext("X Button 1"), - gettext("X Button 2"), "-", gettext("Back"), gettext("Tab"), "-", "-", gettext("Clear"), gettext("Return"), "-", - "-", gettext("Shift"), gettext("Control"), gettext("Menu"), gettext("Pause"), gettext("Capital"), gettext("Kana"), "-", - gettext("Junja"), gettext("Final"), gettext("Kanji"), "-", gettext("Escape"), gettext("Convert"), gettext("Nonconvert"), - gettext("Accept"), gettext("Mode Change"), gettext("Space"), gettext("Priot"), gettext("Next"), gettext("End"), gettext("Home"), - gettext("Left"), gettext("Up"), gettext("Right"), gettext("Down"), gettext("Select"), gettext("Print"), gettext("Execute"), - gettext("Snapshot"), gettext("Insert"), gettext("Delete"), gettext("Help"), "0", "1", "2", "3", "4", "5", + { "-", N_("Left Button"), N_("Right Button"), N_("Cancel"), N_("Middle Button"), N_("X Button 1"), + N_("X Button 2"), "-", N_("Back"), N_("Tab"), "-", "-", N_("Clear"), N_("Return"), "-", + "-", N_("Shift"), N_("Control"), N_("Menu"), N_("Pause"), N_("Capital"), N_("Kana"), "-", + N_("Junja"), N_("Final"), N_("Kanji"), "-", N_("Escape"), N_("Convert"), N_("Nonconvert"), + N_("Accept"), N_("Mode Change"), N_("Space"), N_("Priot"), N_("Next"), N_("End"), N_("Home"), + N_("Left"), N_("Up"), N_("Right"), N_("Down"), N_("Select"), N_("Print"), N_("Execute"), + N_("Snapshot"), N_("Insert"), N_("Delete"), N_("Help"), "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "-", "-", "-", "-", "-", "-", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", - "R", "S", "T", "U", "V", "W", "X", "Y", "Z", gettext("Left Windows"), - gettext("Right Windows"), gettext("Apps"), "-", gettext("Sleep"), gettext("Numpad 0"), gettext("Numpad 1"), - gettext("Numpad 2"), gettext("Numpad 3"), gettext("Numpad 4"), gettext("Numpad 5"), gettext("Numpad 6"), gettext("Numpad 7"), - gettext("Numpad 8"), gettext("Numpad 9"), gettext("Numpad *"), gettext("Numpad +"), gettext("Numpad /"), gettext("Numpad -"), + "R", "S", "T", "U", "V", "W", "X", "Y", "Z", N_("Left Windows"), + N_("Right Windows"), N_("Apps"), "-", N_("Sleep"), N_("Numpad 0"), N_("Numpad 1"), + N_("Numpad 2"), N_("Numpad 3"), N_("Numpad 4"), N_("Numpad 5"), N_("Numpad 6"), N_("Numpad 7"), + N_("Numpad 8"), N_("Numpad 9"), N_("Numpad *"), N_("Numpad +"), N_("Numpad /"), N_("Numpad -"), "Numpad .", "Numpad /", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "-", "-", "-", "-", "-", "-", - "-", "-", gettext("Num Lock"), gettext("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", "-", "-", gettext("Left Shift"), gettext("Right Shight"), - gettext("Left Control"), gettext("Right Control"), gettext("Left Menu"), gettext("Right Menu"), "-", "-", + "-", "-", N_("Num Lock"), N_("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-", + "-", "-", "-", "-", "-", "-", "-", N_("Left Shift"), N_("Right Shight"), + N_("Left Control"), N_("Right Control"), N_("Left Menu"), N_("Right Menu"), "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", gettext("Plus"), gettext("Comma"), gettext("Minus"), gettext("Period"), "-", "-", + "-", "-", "-", "-", "-", N_("Plus"), N_("Comma"), N_("Minus"), N_("Period"), "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", gettext("Attn"), gettext("CrSel"), - gettext("ExSel"), gettext("Erase OEF"), gettext("Play"), gettext("Zoom"), gettext("PA1"), gettext("OEM Clear"), "-" }; + "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", N_("Attn"), N_("CrSel"), + N_("ExSel"), N_("Erase OEF"), N_("Play"), N_("Zoom"), N_("PA1"), N_("OEM Clear"), "-" }; enum { GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR, -- cgit v1.2.3