1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

added gettext support

german translation file
and bashscript to update translations
This commit is contained in:
Constantin Wenger 2011-07-20 16:51:19 +02:00
parent d0810b0156
commit 052bb24c7f
11 changed files with 237 additions and 42 deletions

View file

@ -21,6 +21,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "serialization.h"
#include <string>
#include "gettext.h"
const int ID_oldPassword = 256;
const int ID_newPassword1 = 257;
const int ID_newPassword2 = 258;
@ -97,8 +99,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
const wchar_t *text = L"Old Password";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(chartowchar_t(gettext("Old Password")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 230, 30);
@ -112,8 +113,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
const wchar_t *text = L"New Password";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(chartowchar_t(gettext("New Password")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 230, 30);
@ -126,8 +126,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
const wchar_t *text = L"Confirm Password";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(chartowchar_t(gettext("Confirm Password")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 230, 30);
@ -141,16 +140,15 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, ypos);
Environment->addButton(rect, this, ID_change, L"Change");
Environment->addButton(rect, this, ID_change, chartowchar_t(gettext("Change")));
}
ypos += 50;
{
core::rect<s32> rect(0, 0, 300, 20);
rect += topleft_client + v2s32(35, ypos);
const wchar_t *text = L"Passwords do not match!";
IGUIElement *e =
Environment->addStaticText(text, rect, false, true, this, ID_message);
Environment->addStaticText(chartowchar_t(gettext("Passwords do not match!")), rect, false, true, this, ID_message);
e->setVisible(false);
}