diff options
author | Constantin Wenger <constantin.wenger@googlemail.com> | 2011-07-30 11:43:20 +0200 |
---|---|---|
committer | Constantin Wenger <constantin.wenger@googlemail.com> | 2011-07-30 22:08:16 +0200 |
commit | 37bf9a666aaa37b21d944ac7cca73c2b92f92c68 (patch) | |
tree | 78b1c36cc326a9d2ea137858f01c3d68a90ab2c3 /src | |
parent | cd6d204a9d18df19320ca2a7adecdbc3fa519ebf (diff) | |
download | minetest-37bf9a666aaa37b21d944ac7cca73c2b92f92c68.tar.gz minetest-37bf9a666aaa37b21d944ac7cca73c2b92f92c68.tar.bz2 minetest-37bf9a666aaa37b21d944ac7cca73c2b92f92c68.zip |
set some more text to gettext and updated po files
Diffstat (limited to 'src')
-rw-r--r-- | src/guiKeyChangeMenu.cpp | 84 | ||||
-rw-r--r-- | src/guiKeyChangeMenu.h | 35 |
2 files changed, 61 insertions, 58 deletions
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 diff --git a/src/guiKeyChangeMenu.h b/src/guiKeyChangeMenu.h index e9e359c3c..c40d802ac 100644 --- a/src/guiKeyChangeMenu.h +++ b/src/guiKeyChangeMenu.h @@ -26,35 +26,36 @@ #include "utility.h" #include "modalMenu.h" #include "client.h" +#include "gettext.h" #include <string> static const char *KeyNames[] = - { "-", "Left Button", "Right Button", "Cancel", "Middle Button", "X Button 1", - "X Button 2", "-", "Back", "Tab", "-", "-", "Clear", "Return", "-", - "-", "Shift", "Control", "Menu", "Pause", "Capital", "Kana", "-", - "Junja", "Final", "Kanji", "-", "Escape", "Convert", "Nonconvert", - "Accept", "Mode Change", "Space", "Priot", "Next", "End", "Home", - "Left", "Up", "Right", "Down", "Select", "Print", "Execute", - "Snapshot", "Insert", "Delete", "Help", "0", "1", "2", "3", "4", "5", + { "-", 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", "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", "Left Windows", - "Right Windows", "Apps", "-", "Sleep", "Numpad 0", "Numpad 1", - "Numpad 2", "Numpad 3", "Numpad 4", "Numpad 5", "Numpad 6", "Numpad 7", - "Numpad 8", "Numpad 9", "Numpad *", "Numpad +", "Numpad /", "Numpad -", + "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 -"), "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", "-", "-", "-", "-", "-", "-", - "-", "-", "Num Lock", "Scroll Lock", "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", "-", "-", "Left Shift", "Right Shight", - "Left Control", "Right Control", "Left Menu", "Right Menu", "-", "-", + "-", "-", gettext("Num Lock"), gettext("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-", + "-", "-", "-", "-", "-", "-", "-", gettext("Left Shift"), gettext("Right Shight"), + gettext("Left Control"), gettext("Right Control"), gettext("Left Menu"), gettext("Right Menu"), "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", "Plus", "Comma", "Minus", "Period", "-", "-", + "-", "-", "-", "-", "-", gettext("Plus"), gettext("Comma"), gettext("Minus"), gettext("Period"), "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", - "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel", - "ExSel", "Erase OEF", "Play", "Zoom", "PA1", "OEM Clear", "-" }; + "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", gettext("Attn"), gettext("CrSel"), + gettext("ExSel"), gettext("Erase OEF"), gettext("Play"), gettext("Zoom"), gettext("PA1"), gettext("OEM Clear"), "-" }; enum { GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR, |