From 423109e64c9e723f9f2a52e3537892f584383865 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 24 Jul 2011 18:12:11 +0200 Subject: [PATCH 1/5] Two more instances of unhardcoding the project name --- src/main.cpp | 2 +- src/servermain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bdfbc35f7..0001d33ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1153,7 +1153,7 @@ int main(int argc, char *argv[]) BEGIN_DEBUG_EXCEPTION_HANDLER // Print startup message - dstream< Date: Sun, 24 Jul 2011 18:34:10 +0200 Subject: [PATCH 2/5] Actually make USE_GETTEXT available in the source --- src/cmake_config.h.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in index 6a8f93bac..7cbb11f6b 100644 --- a/src/cmake_config.h.in +++ b/src/cmake_config.h.in @@ -6,6 +6,7 @@ #define PROJECT_NAME "@PROJECT_NAME@" #define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" #define VERSION_STRING "@VERSION_STRING@" +#define USE_GETTEXT @USE_GETTEXT@ #ifdef NDEBUG #define BUILD_TYPE "Release" #else From e00d7ee5be63ab8854032adfd586395538d3324e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 24 Jul 2011 19:06:17 +0200 Subject: [PATCH 3/5] Italian translations --- po/it/minetest.po | 124 ++++++++++++++++++++++++++++++++++++++++++++++ po/minetest.pot | 2 +- 2 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 po/it/minetest.po diff --git a/po/it/minetest.po b/po/it/minetest.po new file mode 100644 index 000000000..8f6631135 --- /dev/null +++ b/po/it/minetest.po @@ -0,0 +1,124 @@ +# Italian translations for minetest package. +# Copyright (C) 2011 THE minetest'S COPYRIGHT HOLDER +# This file is distributed under the same license as the minetest package. +# Giuseppe Bilotta , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: minetest\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-07-24 18:56+0200\n" +"PO-Revision-Date: 2011-07-24 18:56+0200\n" +"Last-Translator: Giuseppe Bilotta \n" +"Language-Team: Italian\n" +"Language: it\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:180 +msgid "Name/Password" +msgstr "Nome/Password" + +#: src/guiMainMenu.cpp:203 +msgid "Address/Port" +msgstr "Indirizzo/Porta" + +#: src/guiMainMenu.cpp:223 +msgid "Leave address blank to start a local server." +msgstr "Lascia vuoto l'indirizzo per avviare un server locale" + +#: src/guiMainMenu.cpp:230 +msgid "Fancy trees" +msgstr "Alberi strani" + +#: src/guiMainMenu.cpp:236 +msgid "Smooth Lighting" +msgstr "" + +#: src/guiMainMenu.cpp:244 +msgid "Start Game / Connect" +msgstr "Avvia Gioco / Connetti" + +#: src/guiMainMenu.cpp:253 +msgid "Change keys" +msgstr "Modifica tasti" + +#: src/guiMainMenu.cpp:276 +msgid "Creative Mode" +msgstr "Modalità creativa" + +#: src/guiMainMenu.cpp:282 +msgid "Enable Damage" +msgstr "Attiva Danno" + +#: src/guiMainMenu.cpp:290 +msgid "Delete map" +msgstr "Cancella mappa" + +#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111 +msgid "Proceed" +msgstr "Procedi" + +#: src/guiPasswordChange.cpp:102 +msgid "Old Password" +msgstr "Vecchia password" + +#: src/guiPasswordChange.cpp:117 +msgid "New Password" +msgstr "Nuova password" + +#: src/guiPasswordChange.cpp:131 +msgid "Confirm Password" +msgstr "Conferma password" + +#: src/guiPasswordChange.cpp:146 +msgid "Change" +msgstr "Modifica" + +#: src/guiPasswordChange.cpp:155 +msgid "Passwords do not match!" +msgstr "Le password non corrispondono!" + +#: src/guiPauseMenu.cpp:110 +msgid "Continue" +msgstr "Continua" + +#: src/guiPauseMenu.cpp:117 +msgid "Change Password" +msgstr "Cambia password" + +#: src/guiPauseMenu.cpp:124 +msgid "Disconnect" +msgstr "Disconnetti" + +#: src/guiPauseMenu.cpp:131 +msgid "Exit to OS" +msgstr "Esci al S.O." + +#: src/guiPauseMenu.cpp:138 +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 "" +"Tasti:\n" +"- WASD: Cammina\n" +"- Mouse left: scava blocchi\n" +"- Mouse right: piazza blocchi\n" +"- Mouse wheel: seleziona oggetto\n" +"- 0...9: seleziona oggetto\n" +"- Shift: furtivo\n" +"- R: (Dis)attiva motra tutti i blocchi caricati\n" +"- I: Inventario\n" +"- ESC: Questo menu\n" +"- T: Parla\n" diff --git a/po/minetest.pot b/po/minetest.pot index 7b95d212e..e359bf4bc 100644 --- a/po/minetest.pot +++ b/po/minetest.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: minetest\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-24 10:16+0200\n" +"POT-Creation-Date: 2011-07-24 18:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From a8e493122e436b3202b266db23e200e764bdabc5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 24 Jul 2011 19:13:30 +0200 Subject: [PATCH 4/5] Read config from gettext.h Otherwise the USE_GETTEXT define might not be visible. --- src/gettext.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gettext.h b/src/gettext.h index 7c3a6ffab..493f9b21b 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -1,3 +1,5 @@ +#include "config.h" // for USE_GETTEXT + #if USE_GETTEXT #include #else From cce210f6768ab9960248f07d2b203dfae660daac Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 24 Jul 2011 19:20:40 +0200 Subject: [PATCH 5/5] Locale dir should be parallel to global data dir --- cmake/Modules/FindGettextLib.cmake | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindGettextLib.cmake b/cmake/Modules/FindGettextLib.cmake index a215f3f8d..18935eaad 100644 --- a/cmake/Modules/FindGettextLib.cmake +++ b/cmake/Modules/FindGettextLib.cmake @@ -56,7 +56,7 @@ ENDIF() IF(GETTEXT_FOUND) SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po) SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale//LC_MESSAGES) - SET(GETTEXT_MO_DEST_PATH locale//LC_MESSAGES) + SET(GETTEXT_MO_DEST_PATH ${DATADIR}/../locale//LC_MESSAGES) FILE(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*") LIST(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot) MACRO(SET_MO_PATHS _buildvar _destvar _locale) diff --git a/src/main.cpp b/src/main.cpp index 0001d33ec..bcca60d95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1132,7 +1132,7 @@ int main(int argc, char *argv[]) // Create user data directory fs::CreateDir(porting::path_userdata); - init_gettext((porting::path_userdata+"/locale").c_str()); + init_gettext((porting::path_data+"/../locale").c_str()); // Initialize debug streams #ifdef RUN_IN_PLACE