http://www.winimage.com/zLibDll/index.html
* Zlib library (zlibwapi.lib and zlibwapi.dll from zlib125dll.zip):
http://www.winimage.com/zLibDll/index.html
+ * gettext bibrary and tools:
+ http://gnuwin32.sourceforge.net/downlinks/gettext.php
* And, of course, Minetest-c55:
http://celeron.55.lt/~celeron55/minetest/download
- Steps:
+ lib
+ include
...
+ + gettext
+ +bin
+ +include
+ +lib
+ minetest
+ src
+ doc
ZLIB_DLL DIR/zlib125dll/dll32/zlibwapi.dll
ZLIB_INCLUDE_DIR DIR/zlib-1.2.5
ZLIB_LIBRARIES DIR/zlib125dll/dll32/zlibwapi.lib
+ GETTEXT_BIN_DIR DIR/gettext/bin
+ GETTEXT_INCLUDE_DIR DIR/gettext/include
+ GETTEXT_LIBRARIES DIR/gettext/lib/intl.lib
+ GETTEXT_MSGFMT DIR/gettext/bin/msgfmt
-----------------
- Hit "Configure"
- Hit "Generate"
--- /dev/null
+# German translations for minetest-c55 package.
+# Copyright (C) 2011 celeron
+# This file is distributed under the same license as the minetest-c55 package.
+# Constantin Wenger <constantin.wenger@googlemail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-07-20 16:03+0200\n"
+"PO-Revision-Date: 2011-07-20 16:04+0100\n"
+"Last-Translator: Constantin Wenger <constantin.wenger@googlemail.com>\n"
+"Language-Team: Deutsch <>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+
+#: src/guiMainMenu.cpp:173
+msgid "Name/Password"
+msgstr "Name/Passwort"
+
+#: src/guiMainMenu.cpp:195
+msgid "Address/Port"
+msgstr "Adresse / Port"
+
+#: src/guiMainMenu.cpp:214
+msgid "Leave address blank to start a local server."
+msgstr "Lasse die Adresse frei um einen eigenen Server zu starten"
+
+#: src/guiMainMenu.cpp:220
+msgid "Fancy trees"
+msgstr "Schöne Bäume"
+
+#: src/guiMainMenu.cpp:226
+msgid "Smooth Lighting"
+msgstr "Besseres Licht"
+
+#: src/guiMainMenu.cpp:233
+msgid "Start Game / Connect"
+msgstr "Spiel starten / Verbinden"
+
+#: src/guiMainMenu.cpp:256
+msgid "Creative Mode"
+msgstr "Kreativitätsmodus"
+
+#: src/guiMainMenu.cpp:261
+msgid "Enable Damage"
+msgstr "Schaden einschalten"
+
+#: src/guiMainMenu.cpp:268
+msgid "Delete world"
+msgstr "Welt löschen"
+
+#: src/guiMessageMenu.cpp:92
+#: src/guiTextInputMenu.cpp:110
+msgid "Proceed"
+msgstr "Fortsetzen"
+
+#: src/guiPasswordChange.cpp:102
+msgid "Old Password"
+msgstr "Altes Passwort"
+
+#: src/guiPasswordChange.cpp:116
+msgid "New Password"
+msgstr "Neues Passwort"
+
+#: src/guiPasswordChange.cpp:129
+msgid "Confirm Password"
+msgstr "Passwort wiederholen"
+
+#: src/guiPasswordChange.cpp:143
+msgid "Change"
+msgstr "Ändern"
+
+#: src/guiPasswordChange.cpp:151
+msgid "Passwords do not match!"
+msgstr "Passwörter passen nicht zusammen"
+
+#: src/guiPauseMenu.cpp:109
+msgid "Continue"
+msgstr "Weiter"
+
+#: src/guiPauseMenu.cpp:115
+msgid "Change Password"
+msgstr "Passwort ändern"
+
+#: src/guiPauseMenu.cpp:121
+msgid "Disconnect"
+msgstr "Verbindung trennen"
+
+#: src/guiPauseMenu.cpp:127
+msgid "Exit to OS"
+msgstr "Programm beenden"
+
+#: src/guiPauseMenu.cpp:134
+msgid ""
+"Keys:\n"
+"- WASD: Walk\n"
+"- Mouse left: dig blocks\n"
+"- Mouse right: place blocks\n"
+"- Mouse wheel: select item\n"
+"- 0...9: select item\n"
+"- Shift: sneak\n"
+"- R: Toggle viewing all loaded chunks\n"
+"- I: Inventory menu\n"
+"- ESC: This menu\n"
+"- T: Chat\n"
+msgstr ""
+"Tastenkürzel:\n"
+"- WASD: Gehen\n"
+"- linke Maustaste: dig blocks\n"
+"- rechte Maustaste: place blocks\n"
+"- Mausrad: Item auswählen\n"
+"- 0...9: Item auswählen\n"
+"- Shift: ducken\n"
+"- R: Alle geladenen Kartenteile anzeigen, umschalten\n"
+"- I: Inventarmenü\n"
+"- T: Chat\n"
+
CACHE FILEPATH "Path to zlibwapi.lib")
set(ZLIB_DLL "${PROJECT_SOURCE_DIR}/../../zlib125dll/dll32/zlibwapi.dll"
CACHE FILEPATH "Path to zlibwapi.dll (for installation)")
+ set(GETTEXT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/../../gettext/include"
+ CACHE PATH "gettext include directory")
+ set(GETTEXT_BIN_DIR "${PROJECT_SOURCE_DIR}/../../gettext/bin"
+ CACHE PATH "gettext bin directory")
+ set(GETTEXT_LIBRARIES "${PROJECT_SOURCE_DIR}/../../gettext/lib/intl.lib"
+ CACHE FILEPATH "gettext intl.lib")
+ set(IRRLICHT_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../irrlicht-1.7.2"
+ CACHE PATH "irrlicht dir")
else()
# Unix probably
if(BUILD_CLIENT)
${ZLIB_INCLUDE_DIR}
${CMAKE_BUILD_TYPE}
${PNG_INCLUDE_DIR}
+ ${GETTEXT_INCLUDE_DIR}
"${PROJECT_SOURCE_DIR}/jthread"
"${PROJECT_SOURCE_DIR}/sqlite"
)
${BZIP2_LIBRARIES}
${PNG_LIBRARIES}
${X11_LIBRARIES}
+ ${GETTEXT_LIBRARIES}
${PLATFORM_LIBS}
${CLIENT_PLATFORM_LIBS}
jthread
set(ARCH i386)
endif()
+ if(WIN32)
+ set(CMAKE_EXE_LINKER_FLAGS "-lintl -L ${GETTEXT_BIN_DIR}")
+ endif()
+
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1 -Wall ${WARNING_FLAGS}")
install(FILES ${images} DESTINATION ${DATADIR})
+ install(FILES ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES/minetest-c55.mo DESTINATION locale/de/LC_MESSAGES)
+
if(WIN32)
if(DEFINED IRRLICHT_DLL)
install(FILES ${IRRLICHT_DLL} DESTINATION ${BINDIR})
if(DEFINED ZLIB_DLL)
install(FILES ${ZLIB_DLL} DESTINATION ${BINDIR})
endif()
+ if(DEFINED GETTEXT_BIN_DIR)
+ install(FILES ${GETTEXT_BIN_DIR}/libintl3.dll DESTINATION ${BINDIR})
+ install(FILES ${GETTEXT_BIN_DIR}/libiconv2.dll DESTINATION ${BINDIR})
+ endif()
endif()
endif(BUILD_CLIENT)
install(TARGETS minetestserver DESTINATION ${BINDIR})
endif(BUILD_SERVER)
+if(WIN32)
+ set(GETTEXT_MSGFMT "${GETTEXT_BIN_DIR}/msgfmt" CACHE FILEPATH "path to msgfmt")
+elseif(APPLE)
+ set(GETTEXT_MSGFMT "${GETTEXT_BIN_DIR}/msgfmt" CACHE FILEPATH "path to msgfmt")
+else()
+ set(GETTEXT_MSGFMT "msgfmt")
+endif()
+
+add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES COMMENT "mo-update [de]: Creating locale directory.")
+
+add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES/minetest-c55.mo
+ COMMAND ${GETTEXT_MSGFMT} -o ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES/minetest-c55.mo ${CMAKE_SOURCE_DIR}/po/de/minetest-c55.po
+ DEPENDS
+ ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES
+ ${CMAKE_SOURCE_DIR}/po/de/minetest-c55.po
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/po/de
+ COMMENT "mo-update [de]: Creating mo file."
+ )
+add_custom_target(translation_de ALL COMMENT "mo update [de]" DEPENDS ${CMAKE_BINARY_DIR}/locale/de/LC_MESSAGES/minetest-c55.mo)
+
# Subdirectories
add_subdirectory(jthread)
--- /dev/null
+#include <libintl.h>
+#define _(String) gettext(String)
+#define gettext_noop(String) String
+#define N_(String) gettext_noop (String)
+
+inline wchar_t* chartowchar_t(char *str)
+{
+ size_t l = strlen(str)+1;
+ wchar_t* nstr = new wchar_t[l];
+ mbstowcs(nstr, str, l);
+ return nstr;
+}
+#include "gettext.h"
+
GUIMainMenu::GUIMainMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, 50+6);
- const wchar_t *text = L"Name/Password";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Name/Password")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 230, 30);
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, 100+6);
- const wchar_t *text = L"Address/Port";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Address/Port")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 230, 30);
}
{
core::rect<s32> rect(0, 0, 400, 20);
- rect += topleft_client + v2s32(160, 100+35);
- const wchar_t *text = L"Leave address blank to start a local server.";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Leave address blank to start a local server.")), rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_client + v2s32(35, 150);
Environment->addCheckBox(fancy_trees, rect, this, GUI_ID_FANCYTREE_CB,
- L"Fancy trees");
+ chartowchar_t(gettext("Fancy trees")));
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_client + v2s32(35, 150+30);
Environment->addCheckBox(smooth_lighting, rect, this, GUI_ID_SMOOTH_LIGHTING_CB,
- L"Smooth Lighting");
+ chartowchar_t(gettext("Smooth Lighting")));
}
// Start game button
{
core::rect<s32> rect(0, 0, 180, 30);
//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, L"Start Game / Connect");
+ Environment->addButton(rect, this, GUI_ID_JOIN_GAME_BUTTON, chartowchar_t(gettext("Start Game / Connect")));
}
// Key change button
core::rect<s32> rect(0, 0, 100, 30);
//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, L"Change keys");
+ Environment->addButton(rect, this, GUI_ID_CHANGE_KEYS_BUTTON, chartowchar_t(gettext("Change keys")));
}
/*
Server section
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_server + v2s32(35, 30);
- Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB, L"Creative Mode");
+ Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB, chartowchar_t(gettext("Creative Mode")));
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_server + v2s32(35, 60);
- Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB, L"Enable Damage");
+ Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB, chartowchar_t(gettext("Enable Damage")));
}
// Map delete button
{
core::rect<s32> rect(0, 0, 130, 30);
//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, L"Delete map");
+ Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON, chartowchar_t(gettext("Delete map")));
}
}
#include "serialization.h"
#include <string>
+#include "gettext.h"
+
GUIMessageMenu::GUIMessageMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
gui::IGUIElement *e =
- Environment->addButton(rect, this, 257, L"Proceed");
+ Environment->addButton(rect, this, 257, chartowchar_t(gettext("Proceed")));
Environment->setFocus(e);
}
}
#include "serialization.h"
#include <string>
+#include "gettext.h"
+
const int ID_oldPassword = 256;
const int ID_newPassword1 = 257;
const int ID_newPassword2 = 258;
{
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);
{
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);
{
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);
{
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);
}
#include "config.h"\r
#include "main.h"\r
\r
+#include "gettext.h"\r
+\r
GUIPauseMenu::GUIPauseMenu(gui::IGUIEnvironment* env,\r
gui::IGUIElement* parent, s32 id,\r
IGameCallback *gamecallback,\r
{\r
core::rect<s32> rect(0, 0, 140, btn_height);\r
rect = rect + v2s32(size.X/2-140/2, btn_y);\r
- Environment->addButton(rect, this, 256, L"Continue");\r
+ Environment->addButton(rect, this, 256, chartowchar_t(gettext("Continue")));\r
}\r
btn_y += btn_height + btn_gap;\r
{\r
core::rect<s32> rect(0, 0, 140, btn_height);\r
rect = rect + v2s32(size.X/2-140/2, btn_y);\r
- Environment->addButton(rect, this, 261, L"Change Password");\r
+ Environment->addButton(rect, this, 261, chartowchar_t(gettext("Change Password")));\r
}\r
btn_y += btn_height + btn_gap;\r
{\r
core::rect<s32> rect(0, 0, 140, btn_height);\r
rect = rect + v2s32(size.X/2-140/2, btn_y);\r
- Environment->addButton(rect, this, 260, L"Disconnect");\r
+ Environment->addButton(rect, this, 260, chartowchar_t(gettext("Disconnect")));\r
}\r
btn_y += btn_height + btn_gap;\r
{\r
core::rect<s32> rect(0, 0, 140, btn_height);\r
rect = rect + v2s32(size.X/2-140/2, btn_y);\r
- Environment->addButton(rect, this, 257, L"Exit to OS");\r
+ Environment->addButton(rect, this, 257, chartowchar_t(gettext("Exit to OS")));\r
}\r
\r
{\r
core::rect<s32> rect(0, 0, 180, 240);\r
rect = rect + v2s32(size.X/2 + 90, size.Y/2-rect.getHeight()/2);\r
- const wchar_t *text =\r
- L"Keys:\n"\r
- L"- WASD: Walk\n"\r
- L"- Mouse left: dig blocks\n"\r
- L"- Mouse right: place blocks\n"\r
- L"- Mouse wheel: select item\n"\r
- L"- 0...9: select item\n"\r
- L"- Shift: sneak\n"\r
- L"- R: Toggle viewing all loaded chunks\n"\r
- L"- I: Inventory menu\n"\r
- L"- ESC: This menu\n"\r
- L"- T: Chat\n";\r
- Environment->addStaticText(text, rect, false, true, this, 258);\r
+ Environment->addStaticText(chartowchar_t(gettext(\r
+ "Keys:\n"\r
+ "- WASD: Walk\n"\r
+ "- Mouse left: dig blocks\n"\r
+ "- Mouse right: place blocks\n"\r
+ "- Mouse wheel: select item\n"\r
+ "- 0...9: select item\n"\r
+ "- Shift: sneak\n"\r
+ "- R: Toggle viewing all loaded chunks\n"\r
+ "- I: Inventory menu\n"\r
+ "- ESC: This menu\n"\r
+ "- T: Chat\n"\r
+ )), rect, false, true, this, 258);\r
}\r
{\r
core::rect<s32> rect(0, 0, 180, 220);\r
#include "serialization.h"
#include <string>
+#include "gettext.h"
+
GUITextInputMenu::GUITextInputMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
- Environment->addButton(rect, this, 257, L"Proceed");
+ Environment->addButton(rect, this, 257, chartowchar_t(gettext("Proceed")));
}
}
#include "keycode.h"\r
#include "tile.h"\r
\r
+#include "gettext.h"\r
+\r
// This makes textures\r
ITextureSource *g_texturesource = NULL;\r
\r
std::locale::global(std::locale("C"));\r
// This enables printing all characters in bitmap font\r
setlocale(LC_CTYPE, "en_US");\r
+ setlocale(LC_ALL, "");\r
+ bindtextdomain("minetest-c55", "./../locale");\r
+ textdomain("minetest-c55");\r
\r
/*\r
Parse command line\r
--- /dev/null
+#! /bin/bash
+xgettext -n -o minetest-c55.pot ./src/*.cpp ./src/*.h
+msgmerge -U ./po/de/minetest-c55.po minetest-c55.pot
+rm minetest-c55.pot