]> git.lizzy.rs Git - minetest.git/commitdiff
merged delta and c55
authorPerttu Ahola <celeron55@gmail.com>
Fri, 5 Aug 2011 08:22:13 +0000 (11:22 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 5 Aug 2011 08:22:13 +0000 (11:22 +0300)
41 files changed:
cmake/Modules/FindGettextLib.cmake
data/ladder.png [new file with mode: 0644]
makepackage_binary.sh
minetest-icon-24x24.png [new file with mode: 0644]
minetestmapper/colors.txt [deleted file]
minetestmapper/minetestmapper2.py [deleted file]
pnoise.py [new file with mode: 0644]
po/da/minetest.po [new file with mode: 0644]
po/de/minetest.po
po/en/minetest.pot [deleted file]
po/fr/minetest.po
po/it/minetest.po [new file with mode: 0644]
po/minetest.pot [new file with mode: 0644]
src/CMakeLists.txt
src/client.cpp
src/cmake_config.h.in
src/config.h
src/content_craft.cpp
src/content_mapblock.cpp
src/content_mapnode.cpp
src/content_mapnode.h
src/environment.cpp
src/game.cpp
src/gettext.h
src/guiKeyChangeMenu.cpp
src/guiKeyChangeMenu.h
src/guiMainMenu.cpp
src/guiMessageMenu.cpp
src/guiPasswordChange.cpp
src/guiPauseMenu.cpp
src/guiTextInputMenu.cpp
src/keycode.cpp
src/main.cpp
src/map.cpp
src/mapnode.h
src/player.cpp
src/player.h
src/servermain.cpp
util/colors.txt
util/minetestmapper.py
util/updatepo.sh [new file with mode: 0755]

index b99fd33b83f7e7e65a5ab3c479dd6abcc038547d..18935eaadb3e06cb6a6be009256d0bd6a48c06b9 100644 (file)
@@ -16,21 +16,6 @@ FIND_PROGRAM(GETTEXT_MSGFMT
        PATHS "${CUSTOM_GETTEXT_PATH}/bin"
        DOC "path to msgfmt")
 
-FIND_PROGRAM(GETTEXT_MSGMERGE
-       NAMES msgmerge
-       PATHS "${CUSTOM_GETTEXT_PATH}/bin"
-       DOC "path to msgmerge")
-
-FIND_PROGRAM(GETTEXT_MSGEN
-       NAMES msgen
-       PATHS "${CUSTOM_GETTEXT_PATH}/bin"
-       DOC "path to msgen")
-
-FIND_PROGRAM(GETTEXT_EXTRACT
-       NAMES xgettext
-       PATHS "${CUSTOM_GETTEXT_PATH}/bin"
-       DOC "path to xgettext")
-
 # modern Linux, as well as Mac, seem to not need require special linking
 # they do not because gettext is part of glibc
 # TODO check the requirements on other BSDs and older Linux
@@ -71,10 +56,14 @@ ENDIF()
 IF(GETTEXT_FOUND)
        SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
        SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
-       SET(GETTEXT_MO_DEST_PATH locale/<locale>/LC_MESSAGES)
+       SET(GETTEXT_MO_DEST_PATH ${DATADIR}/../locale/<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)
                STRING(REPLACE "<locale>" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH})
                STRING(REPLACE "<locale>" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH})
        ENDMACRO(SET_MO_PATHS)
+ELSE()
+       SET(GETTEXT_INCLUDE_DIR "")
+       SET(GETTEXT_LIBRARY "")
 ENDIF()
diff --git a/data/ladder.png b/data/ladder.png
new file mode 100644 (file)
index 0000000..1105635
Binary files /dev/null and b/data/ladder.png differ
index 32d19865ab98e3585f5a52b379267a4209d68347..fac3a03747519c4b62cf5b6b43c066f1e2731f7a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PROJECT_NAME=minetest-delta
+PROJECT_NAME=minetest
 PACKAGEDIR=../$PROJECT_NAME-packages
 PACKAGENAME=$PROJECT_NAME-binary-`date +%y%m%d%H%M%S`
 PACKAGEPATH=$PACKAGEDIR/$PACKAGENAME
diff --git a/minetest-icon-24x24.png b/minetest-icon-24x24.png
new file mode 100644 (file)
index 0000000..4d587c4
Binary files /dev/null and b/minetest-icon-24x24.png differ
diff --git a/minetestmapper/colors.txt b/minetestmapper/colors.txt
deleted file mode 100644 (file)
index e70f56e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-0 128 128 128\r
-1 107 134 51\r
-2 39 66 106\r
-3 255 255 0\r
-4 86 58 31\r
-5 48 95 8\r
-6 102 129 38\r
-7 178 178 0\r
-8 101 84 36\r
-9 39 66 106\r
-12 104 78 42\r
-13 210 194 156\r
-14 117 86 41\r
-15 128 79 0\r
-16 118 118 118\r
-18 123 123 123\r
-19 199 199 199\r
-20 183 183 222\r
-21 103 78 42\r
-22 219 202 178\r
-23 78 154 6\r
-24 204 0 0\r
-25 211 215 207\r
-26 138 226 52\r
-27 104 78 42\r
diff --git a/minetestmapper/minetestmapper2.py b/minetestmapper/minetestmapper2.py
deleted file mode 100755 (executable)
index 8dc3de2..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/env python\r
-# -*- coding: utf-8 -*-\r
-\r
-# Made by j0gge, modified by celeron55\r
-\r
-# This program is free software. It comes without any warranty, to\r
-# the extent permitted by applicable law. You can redistribute it\r
-# and/or modify it under the terms of the Do What The Fuck You Want\r
-# To Public License, Version 2, as published by Sam Hocevar. See\r
-# http://sam.zoy.org/wtfpl/COPYING for more details.\r
-\r
-# Requires Python Imaging Library: http://www.pythonware.com/products/pil/\r
-\r
-# Some speed-up: ...lol, actually it slows it down.\r
-#import psyco ; psyco.full()\r
-#from psyco.classes import *\r
-\r
-import zlib\r
-import Image, ImageDraw\r
-import os\r
-import string\r
-import time\r
-\r
-def hex_to_int(h):\r
-    i = int(h,16)\r
-    if(i > 2047):\r
-        i-=4096\r
-    return i\r
-\r
-def hex4_to_int(h):\r
-    i = int(h,16)\r
-    if(i > 32767):\r
-        i-=65536\r
-    return i\r
-\r
-def int_to_hex3(i):\r
-    if(i < 0):\r
-        return "%03X" % (i + 4096)\r
-    else:\r
-        return "%03X" % i\r
-\r
-def int_to_hex4(i):\r
-    if(i < 0):\r
-        return "%04X" % (i + 65536)\r
-    else:\r
-        return "%04X" % i\r
-\r
-def limit(i,l,h):\r
-    if(i>h):\r
-        i=h\r
-    if(i<l):\r
-        i=l\r
-    return i\r
-\r
-# Fix these!\r
-path="../map/"\r
-output="map.png"\r
-\r
-sector_xmin = -1000/16\r
-sector_xmax = 1000/16\r
-sector_zmin = -1000/16\r
-sector_zmax = 1000/16\r
-\r
-# Load color information for the blocks.\r
-colors = {}\r
-f = file("colors.txt")\r
-for line in f:\r
-    values = string.split(line)\r
-    colors[int(values[0])] = (int(values[1]), int(values[2]), int(values[3]))\r
-f.close()\r
-\r
-xlist = []\r
-zlist = []\r
-\r
-# List all sectors to memory and calculate the width and heigth of the resulting picture.\r
-if os.path.exists(path + "sectors2"):\r
-    for filename in os.listdir(path + "sectors2"):\r
-        for filename2 in os.listdir(path + "sectors2/" + filename):\r
-            x = hex_to_int(filename)\r
-            z = hex_to_int(filename2)\r
-            if x < sector_xmin or x > sector_xmax:\r
-                continue\r
-            if z < sector_zmin or z > sector_zmax:\r
-                continue\r
-            xlist.append(x)\r
-            zlist.append(z)\r
-\r
-if os.path.exists(path + "sectors"):\r
-    for filename in os.listdir(path + "sectors"):\r
-        x = hex4_to_int(filename[:4])\r
-        z = hex4_to_int(filename[-4:])\r
-        if x < sector_xmin or x > sector_xmax:\r
-            continue\r
-        if z < sector_zmin or z > sector_zmax:\r
-            continue\r
-        xlist.append(x)\r
-        zlist.append(z)\r
-\r
-w = (max(xlist) - min(xlist)) * 16 + 16\r
-h = (max(zlist) - min(zlist)) * 16 + 16\r
-\r
-print "w="+str(w)+" h="+str(h)\r
-\r
-im = Image.new("RGB", (w, h), "white")\r
-impix = im.load()\r
-\r
-stuff={}\r
-\r
-starttime = time.time()\r
-\r
-# Go through all sectors.\r
-for n in range(len(xlist)):\r
-    #if n > 500:\r
-    #   break\r
-    if n % 200 == 0:\r
-        nowtime = time.time()\r
-        dtime = nowtime - starttime\r
-        n_per_second = 1.0 * n / dtime\r
-        if n_per_second != 0:\r
-            seconds_per_n = 1.0 / n_per_second\r
-            time_guess = seconds_per_n * len(xlist)\r
-            remaining_s = time_guess - dtime\r
-            remaining_minutes = int(remaining_s / 60)\r
-            remaining_s -= remaining_minutes * 60;\r
-            print("Processing sector "+str(n)+" of "+str(len(xlist))\r
-                    +" ("+str(round(100.0*n/len(xlist), 1))+"%)"\r
-                    +" (ETA: "+str(remaining_minutes)+"m "\r
-                    +str(int(remaining_s))+"s)")\r
-\r
-    xpos = xlist[n]\r
-    zpos = zlist[n]\r
-\r
-    xhex = int_to_hex3(xpos)\r
-    zhex = int_to_hex3(zpos)\r
-    xhex4 = int_to_hex4(xpos)\r
-    zhex4 = int_to_hex4(zpos)\r
-\r
-    sector1 = xhex4.lower() + zhex4.lower()\r
-    sector2 = xhex.lower() + "/" + zhex.lower()\r
-\r
-    ylist=[]\r
-\r
-    sectortype = ""\r
-\r
-    try:\r
-        for filename in os.listdir(path + "sectors/" + sector1):\r
-            if(filename != "meta"):\r
-                pos = int(filename,16)\r
-                if(pos > 32767):\r
-                    pos-=65536\r
-                ylist.append(pos)\r
-                sectortype = "old"\r
-    except OSError:\r
-        pass\r
-\r
-    if sectortype != "old":\r
-        try:\r
-            for filename in os.listdir(path + "sectors2/" + sector2):\r
-                if(filename != "meta"):\r
-                    pos = int(filename,16)\r
-                    if(pos > 32767):\r
-                        pos-=65536\r
-                    ylist.append(pos)\r
-                    sectortype = "new"\r
-        except OSError:\r
-            pass\r
-\r
-    if sectortype == "":\r
-        continue\r
-\r
-    ylist.sort()\r
-\r
-    # Make a list of pixels of the sector that are to be looked for.\r
-    pixellist = []\r
-    for x in range(16):\r
-        for y in range(16):\r
-            pixellist.append((x,y))\r
-\r
-    # Go through the Y axis from top to bottom.\r
-    for ypos in reversed(ylist):\r
-\r
-        yhex = int_to_hex4(ypos)\r
-\r
-        filename = ""\r
-        if sectortype == "old":\r
-            filename = path + "sectors/" + sector1 + "/" + yhex.lower()\r
-        else:\r
-            filename = path + "sectors2/" + sector2 + "/" + yhex.lower()\r
-\r
-        f = file(filename, "rb")\r
-\r
-        # Let's just memorize these even though it's not really necessary.\r
-        version = f.read(1)\r
-        flags = f.read(1)\r
-\r
-        dec_o = zlib.decompressobj()\r
-        try:\r
-            mapdata = dec_o.decompress(f.read())\r
-        except:\r
-            mapdata = []\r
-\r
-        f.close()\r
-\r
-        if(len(mapdata)<4096):\r
-            print "bad: " + xhex+zhex+"/"+yhex + " " + len(mapdata)\r
-        else:\r
-            chunkxpos=xpos*16\r
-            chunkypos=ypos*16\r
-            chunkzpos=zpos*16\r
-            for (x,z) in reversed(pixellist):\r
-                for y in reversed(range(16)):\r
-                    datapos=x+y*16+z*256\r
-                    if(ord(mapdata[datapos])!=254):\r
-                        try:\r
-                            pixellist.remove((x,z))\r
-                            # Memorize information on the type and height of the block and for drawing the picture.\r
-                            stuff[(chunkxpos+x,chunkzpos+z)]=(chunkypos+y,ord(mapdata[datapos]))\r
-                            break\r
-                        except:\r
-                            print "strange block: " + xhex+zhex+"/"+yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " block: " + str(ord(mapdata[datapos]))\r
-\r
-        # After finding all the pixeld in the sector, we can move on to the next sector without having to continue the Y axis.\r
-        if(len(pixellist)==0):\r
-            break\r
-\r
-print "Drawing image"\r
-# Drawing the picture\r
-starttime = time.time()\r
-n = 0\r
-minx = min(xlist)\r
-minz = min(zlist)\r
-for (x,z) in stuff.iterkeys():\r
-    if n % 500000 == 0:\r
-        nowtime = time.time()\r
-        dtime = nowtime - starttime\r
-        n_per_second = 1.0 * n / dtime\r
-        if n_per_second != 0:\r
-            listlen = len(stuff)\r
-            seconds_per_n = 1.0 / n_per_second\r
-            time_guess = seconds_per_n * listlen\r
-            remaining_s = time_guess - dtime\r
-            remaining_minutes = int(remaining_s / 60)\r
-            remaining_s -= remaining_minutes * 60;\r
-            print("Drawing pixel "+str(n)+" of "+str(listlen)\r
-                    +" ("+str(round(100.0*n/listlen, 1))+"%)"\r
-                    +" (ETA: "+str(remaining_minutes)+"m "\r
-                    +str(int(remaining_s))+"s)")\r
-    n += 1\r
-\r
-    (r,g,b)=colors[stuff[(x,z)][1]]\r
-\r
-    # Comparing heights of a couple of adjacent blocks and changing brightness accordingly.\r
-    try:\r
-        y1=stuff[(x-1,z)][0]\r
-        y2=stuff[(x,z-1)][0]\r
-        y=stuff[(x,z)][0]\r
-\r
-        d=(y-y1+y-y2)*12\r
-\r
-        if(d>36):\r
-            d=36\r
-\r
-        r=limit(r+d,0,255)\r
-        g=limit(g+d,0,255)\r
-        b=limit(b+d,0,255)\r
-    except:\r
-        pass\r
-    #impix[w-1-(x-minx*16),h-1-(z-minz*16)]=(r,g,b)\r
-    impix[x-minx*16,h-1-(z-minz*16)]=(r,g,b)\r
-\r
-# Flip the picture to make it right and save.\r
-#print "Transposing"\r
-#im=im.transpose(Image.FLIP_TOP_BOTTOM)\r
-print "Saving"\r
-im.save(output)\r
diff --git a/pnoise.py b/pnoise.py
new file mode 100644 (file)
index 0000000..fcab5ac
--- /dev/null
+++ b/pnoise.py
@@ -0,0 +1,102 @@
+#
+# A python perlin noise implementation, from
+# http://www.fundza.com/c4serious/noise/perlin/perlin.html
+#
+# This is used for testing how to create maps with a python script.
+#
+
+import math
+p = (
+151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,
+30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,
+62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,
+125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,
+83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,
+143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,
+196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,
+250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,
+58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,
+221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,
+224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,
+12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,
+199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,
+205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,
+151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,
+30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,
+62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,
+125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,
+83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,
+143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,
+196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,
+250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,
+58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,
+221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,
+224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,
+12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,
+199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,
+205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180)
+  
+def lerp(t, a, b):
+    return a + t * (b - a)
+  
+def fade(t):
+    return t * t * t * (t * (t * 6 - 15) + 10)
+  
+def grad(hash, x, y, z):
+    h = hash & 15
+    if h < 8:
+        u = x
+    else:
+        u = y
+    if h < 4:
+        v = y
+    elif h == 12 or h == 14:
+        v = x
+    else:
+        v = z
+    if h & 1 != 0:
+        u = -u
+    if h & 2 != 0:
+        v = -v
+    return u + v
+  
+def pnoise(x, y, z):
+    global p
+    X = int(math.floor(x)) & 255
+    Y = int(math.floor(y)) & 255
+    Z = int(math.floor(z)) & 255
+    x -= math.floor(x)
+    y -= math.floor(y)
+    z -= math.floor(z)
+    
+    u = fade(x)
+    v = fade(y)
+    w = fade(z)
+    
+    A =  p[X] + Y
+    AA = p[A] + Z
+    AB = p[A + 1] + Z
+    B =  p[X + 1] + Y
+    BA = p[B] + Z
+    BB = p[B + 1] + Z
+    
+    pAA = p[AA]
+    pAB = p[AB]
+    pBA = p[BA]
+    pBB = p[BB]
+    pAA1 = p[AA + 1]
+    pBA1 = p[BA + 1]
+    pAB1 = p[AB + 1]
+    pBB1 = p[BB + 1]
+    
+    gradAA =  grad(pAA, x,   y,   z)
+    gradBA =  grad(pBA, x-1, y,   z)
+    gradAB =  grad(pAB, x,   y-1, z)
+    gradBB =  grad(pBB, x-1, y-1, z)
+    gradAA1 = grad(pAA1,x,   y,   z-1)
+    gradBA1 = grad(pBA1,x-1, y,   z-1)
+    gradAB1 = grad(pAB1,x,   y-1, z-1)
+    gradBB1 = grad(pBB1,x-1, y-1, z-1)
+    return lerp(w, 
+    lerp(v, lerp(u, gradAA, gradBA), lerp(u, gradAB, gradBB)),
+    lerp(v, lerp(u, gradAA1,gradBA1),lerp(u, gradAB1,gradBB1)))    
diff --git a/po/da/minetest.po b/po/da/minetest.po
new file mode 100644 (file)
index 0000000..b64b5d8
--- /dev/null
@@ -0,0 +1,486 @@
+# German translations for minetest-c55 package.
+# Copyright (C) 2011 celeron
+# This file is distributed under the same license as the minetest-c55 package.
+# Frederik Helth <Guides@live.dk>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-02 12:36+0200\n"
+"PO-Revision-Date: 2011-08-02 00:31+0100\n"
+"Last-Translator: Frederik Helth <Guides@live.dk>\n"
+"Language-Team: \n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/guiKeyChangeMenu.cpp:84
+msgid "KEYBINDINGS"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:94
+msgid "Forward"
+msgstr "Frem"
+
+#: src/guiKeyChangeMenu.cpp:111
+msgid "Backward"
+msgstr "Tilbage"
+
+#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
+msgid "Left"
+msgstr "Venstre"
+
+#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
+msgid "Right"
+msgstr "Højre"
+
+#: src/guiKeyChangeMenu.cpp:158
+msgid "Use"
+msgstr "Brug"
+
+#: src/guiKeyChangeMenu.cpp:173
+msgid "Sneak"
+msgstr "Snig"
+
+#: src/guiKeyChangeMenu.cpp:189
+msgid "Jump"
+msgstr "Hop"
+
+#: src/guiKeyChangeMenu.cpp:204
+msgid "Inventory"
+msgstr "Ting"
+
+#: src/guiKeyChangeMenu.cpp:220
+msgid "Chat"
+msgstr "Chat"
+
+#: src/guiKeyChangeMenu.cpp:236
+msgid "Toggle fly"
+msgstr "Flyvning"
+
+#: src/guiKeyChangeMenu.cpp:251
+msgid "Toggle fast"
+msgstr "Hurtig flyvning"
+
+#: src/guiKeyChangeMenu.cpp:266
+msgid "Range select"
+msgstr "Afstands load"
+
+#: src/guiKeyChangeMenu.cpp:283
+msgid "Print stacks"
+msgstr "Print stykker"
+
+#: src/guiKeyChangeMenu.cpp:298
+msgid "Save"
+msgstr "Gem"
+
+#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
+msgid "Cancel"
+msgstr "Afslut"
+
+#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
+#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
+#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
+#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
+#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
+#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
+#: src/guiKeyChangeMenu.cpp:597
+msgid "press Key"
+msgstr "Tryk knap"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Left Button"
+msgstr "Venstre Knap"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Middle Button"
+msgstr "Midt Knap"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Right Button"
+msgstr "Højre Knap"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "X Button 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Back"
+msgstr "Tilbage"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Clear"
+msgstr "Rens"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Return"
+msgstr "Tilbage"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Tab"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "X Button 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Capital"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Control"
+msgstr "Kontrol"
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Kana"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Pause"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Convert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Escape"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Final"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Junja"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Kanji"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Nonconvert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Accept"
+msgstr "Accepter"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "End"
+msgstr "Slut"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Home"
+msgstr "Hjem"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Mode Change"
+msgstr "Mode skift"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Next"
+msgstr "Næste"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Priot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Space"
+msgstr "Mellemrum"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Down"
+msgstr "Ned"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Execute"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Print"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Select"
+msgstr "Vælge"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Up"
+msgstr "Op"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Delete"
+msgstr "Slet"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Help"
+msgstr "Hjælp"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Insert"
+msgstr "Indset"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Snapshot"
+msgstr "Screenshot"
+
+#: src/guiKeyChangeMenu.h:42
+msgid "Left Windows"
+msgstr "Venstre windows"
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Apps"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 0"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Right Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Sleep"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 3"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 4"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 5"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 6"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 7"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad *"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad +"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad -"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad /"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 8"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 9"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Num Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Scroll Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Left Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Right Shight"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Comma"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Minus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Period"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Plus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "Attn"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "CrSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Erase OEF"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "ExSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "OEM Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "PA1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Play"
+msgstr "Spil"
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Zoom"
+msgstr ""
+
+#: src/guiMainMenu.cpp:181
+msgid "Name/Password"
+msgstr "Navn/kodeord"
+
+#: src/guiMainMenu.cpp:206
+msgid "Address/Port"
+msgstr "Adresse/port"
+
+#: src/guiMainMenu.cpp:228
+msgid "Leave address blank to start a local server."
+msgstr "Lad black for at spille localt"
+
+#: src/guiMainMenu.cpp:235
+msgid "Fancy trees"
+msgstr "Fancy trær"
+
+#: src/guiMainMenu.cpp:241
+msgid "Smooth Lighting"
+msgstr ""
+
+#: src/guiMainMenu.cpp:249
+msgid "Start Game / Connect"
+msgstr "Start spil"
+
+#: src/guiMainMenu.cpp:258
+msgid "Change keys"
+msgstr "Indstillinger"
+
+#: src/guiMainMenu.cpp:281
+msgid "Creative Mode"
+msgstr "Kreativ mode"
+
+#: src/guiMainMenu.cpp:287
+msgid "Enable Damage"
+msgstr "Tag imod skade"
+
+#: src/guiMainMenu.cpp:295
+msgid "Delete map"
+msgstr "Slet mappen"
+
+#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
+msgid "Proceed"
+msgstr "Fortsæt"
+
+#: src/guiPasswordChange.cpp:103
+msgid "Old Password"
+msgstr "Gamle kodeord"
+
+#: src/guiPasswordChange.cpp:120
+msgid "New Password"
+msgstr "Nye kodeord"
+
+#: src/guiPasswordChange.cpp:136
+msgid "Confirm Password"
+msgstr "Gentag kodeord"
+
+#: src/guiPasswordChange.cpp:153
+msgid "Change"
+msgstr "Skift"
+
+#: src/guiPasswordChange.cpp:162
+msgid "Passwords do not match!"
+msgstr "Kodeordne matcher ikke hinanden!"
+
+#: src/guiPauseMenu.cpp:111
+msgid "Continue"
+msgstr "Fortsæt"
+
+#: src/guiPauseMenu.cpp:118
+msgid "Change Password"
+msgstr "Skift kodeord"
+
+#: src/guiPauseMenu.cpp:125
+msgid "Disconnect"
+msgstr "Logud"
+
+#: src/guiPauseMenu.cpp:132
+msgid "Exit to OS"
+msgstr "Afslut til OS"
+
+#: src/guiPauseMenu.cpp:139
+msgid ""
+"Default Controls:\n"
+"- WASD: Walk\n"
+"- Mouse left: dig/hit\n"
+"- Mouse right: place/use\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 ""
index 69b57fd95b150849ff032343f9b38ea85b35b5aa..4b22855a317f5b8b9dcabc2c99e3d54e7dafafa3 100644 (file)
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 0.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-22 11:00+0200\n"
-"PO-Revision-Date: 2011-07-20 16:58+0100\n"
+"POT-Creation-Date: 2011-08-02 12:36+0200\n"
+"PO-Revision-Date: 2011-08-02 11:54+0100\n"
 "Last-Translator: Constantin Wenger <constantin.wenger@googlemail.com>\n"
 "Language-Team: Deutsch <>\n"
 "Language: de\n"
@@ -17,92 +17,467 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n!=1);\n"
 
-#: src/guiMainMenu.cpp:180
+#: src/guiKeyChangeMenu.cpp:84
+msgid "KEYBINDINGS"
+msgstr "TASTEN EINST."
+
+#: src/guiKeyChangeMenu.cpp:94
+msgid "Forward"
+msgstr "Vorwärts"
+
+#: src/guiKeyChangeMenu.cpp:111
+msgid "Backward"
+msgstr "Rückwärts"
+
+#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
+msgid "Left"
+msgstr "Links"
+
+#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
+msgid "Right"
+msgstr "Rechts"
+
+#: src/guiKeyChangeMenu.cpp:158
+msgid "Use"
+msgstr "Benutzen"
+
+#: src/guiKeyChangeMenu.cpp:173
+msgid "Sneak"
+msgstr "Kriechen"
+
+#: src/guiKeyChangeMenu.cpp:189
+msgid "Jump"
+msgstr "Springen"
+
+#: src/guiKeyChangeMenu.cpp:204
+msgid "Inventory"
+msgstr "Inventar"
+
+#: src/guiKeyChangeMenu.cpp:220
+msgid "Chat"
+msgstr "Chat"
+
+#: src/guiKeyChangeMenu.cpp:236
+msgid "Toggle fly"
+msgstr "Fliegen umsch."
+
+#: src/guiKeyChangeMenu.cpp:251
+msgid "Toggle fast"
+msgstr "Speed umsch."
+
+#: src/guiKeyChangeMenu.cpp:266
+msgid "Range select"
+msgstr "Entfernung wählen"
+
+#: src/guiKeyChangeMenu.cpp:283
+msgid "Print stacks"
+msgstr "Stack ausgeben"
+
+#: src/guiKeyChangeMenu.cpp:298
+msgid "Save"
+msgstr "Speichern"
+
+#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
+#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
+#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
+#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
+#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
+#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
+#: src/guiKeyChangeMenu.cpp:597
+msgid "press Key"
+msgstr "Taste drücken"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Left Button"
+msgstr "linke Taste"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Middle Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Right Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "X Button 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Back"
+msgstr "Rücktaste"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Clear"
+msgstr "löschen"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Return"
+msgstr "Return"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Tab"
+msgstr "Tab"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "X Button 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Capital"
+msgstr "Feststellen"
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Control"
+msgstr "Strg"
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Kana"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Menu"
+msgstr "Menü"
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Pause"
+msgstr "Pause"
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Shift"
+msgstr "Umsch."
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Convert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Escape"
+msgstr "Escape"
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Final"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Junja"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Kanji"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Nonconvert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Accept"
+msgstr "Annehmen"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "End"
+msgstr "Ende"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Home"
+msgstr "Pos1"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Mode Change"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Next"
+msgstr "Bild runter"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Priot"
+msgstr "Bild hoch"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Space"
+msgstr "Leertaste"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Down"
+msgstr "Runter"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Execute"
+msgstr "Ausführen"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Print"
+msgstr "Druck"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Select"
+msgstr "Select"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Up"
+msgstr "Hoch"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Delete"
+msgstr "Entf"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Help"
+msgstr "Hilfe"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Insert"
+msgstr "Einfg"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Snapshot"
+msgstr "Schnapschuss"
+
+#: src/guiKeyChangeMenu.h:42
+msgid "Left Windows"
+msgstr "Win links"
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Apps"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 0"
+msgstr "Ziffernblock 0"
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 1"
+msgstr "Ziffernblock 1"
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Right Windows"
+msgstr "Win rechts"
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Sleep"
+msgstr "Schlaf"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 2"
+msgstr "Ziffernblock 2"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 3"
+msgstr "Ziffernblock 3"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 4"
+msgstr "Ziffernblock 4"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 5"
+msgstr "Ziffernblock 5"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 6"
+msgstr "Ziffernblock 6"
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 7"
+msgstr "Ziffernblock 7"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad *"
+msgstr "Ziffernblock *"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad +"
+msgstr "Ziffernblock +"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad -"
+msgstr "Ziffernblock -"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad /"
+msgstr "Ziffernblock /"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 8"
+msgstr "Ziffernblock 8"
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 9"
+msgstr "Ziffernblock 9"
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Num Lock"
+msgstr "Num"
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Scroll Lock"
+msgstr "Rollen"
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Left Shift"
+msgstr "Umsch. links"
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Right Shight"
+msgstr "Umsch. rechts"
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Control"
+msgstr "Strg links"
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Menu"
+msgstr "Alt"
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Control"
+msgstr "Strg rechts"
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Menu"
+msgstr "Alt Gr"
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Comma"
+msgstr "Komma"
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Minus"
+msgstr "Minus"
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Period"
+msgstr "Punkt"
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Plus"
+msgstr "Plus"
+
+#: src/guiKeyChangeMenu.h:57
+msgid "Attn"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "CrSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Erase OEF"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "ExSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "OEM Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "PA1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Play"
+msgstr "Play"
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Zoom"
+msgstr "Zoom"
+
+#: src/guiMainMenu.cpp:181
 msgid "Name/Password"
 msgstr "Name/Passwort"
 
-#: src/guiMainMenu.cpp:203
+#: src/guiMainMenu.cpp:206
 msgid "Address/Port"
 msgstr "Adresse / Port"
 
-#: src/guiMainMenu.cpp:223
+#: src/guiMainMenu.cpp:228
 msgid "Leave address blank to start a local server."
 msgstr "Lasse die Adresse frei um einen eigenen Server zu starten"
 
-#: src/guiMainMenu.cpp:230
+#: src/guiMainMenu.cpp:235
 msgid "Fancy trees"
 msgstr "Schöne Bäume"
 
-#: src/guiMainMenu.cpp:236
+#: src/guiMainMenu.cpp:241
 msgid "Smooth Lighting"
 msgstr "Besseres Licht"
 
-#: src/guiMainMenu.cpp:244
+#: src/guiMainMenu.cpp:249
 msgid "Start Game / Connect"
 msgstr "Spiel starten / Verbinden"
 
-#: src/guiMainMenu.cpp:253
+#: src/guiMainMenu.cpp:258
 msgid "Change keys"
-msgstr "Tastenbelegung Ã¤ndern"
+msgstr "Tasten Ã¤ndern"
 
-#: src/guiMainMenu.cpp:276
+#: src/guiMainMenu.cpp:281
 msgid "Creative Mode"
 msgstr "Kreativitätsmodus"
 
-#: src/guiMainMenu.cpp:282
+#: src/guiMainMenu.cpp:287
 msgid "Enable Damage"
 msgstr "Schaden einschalten"
 
-#: src/guiMainMenu.cpp:290
+#: src/guiMainMenu.cpp:295
 msgid "Delete map"
 msgstr "Karte löschen"
 
-#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
+#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
 msgid "Proceed"
 msgstr "Fortsetzen"
 
-#: src/guiPasswordChange.cpp:102
+#: src/guiPasswordChange.cpp:103
 msgid "Old Password"
 msgstr "Altes Passwort"
 
-#: src/guiPasswordChange.cpp:117
+#: src/guiPasswordChange.cpp:120
 msgid "New Password"
 msgstr "Neues Passwort"
 
-#: src/guiPasswordChange.cpp:131
+#: src/guiPasswordChange.cpp:136
 msgid "Confirm Password"
 msgstr "Passwort wiederholen"
 
-#: src/guiPasswordChange.cpp:146
+#: src/guiPasswordChange.cpp:153
 msgid "Change"
 msgstr "Ändern"
 
-#: src/guiPasswordChange.cpp:155
+#: src/guiPasswordChange.cpp:162
 msgid "Passwords do not match!"
 msgstr "Passwörter passen nicht zusammen"
 
-#: src/guiPauseMenu.cpp:110
+#: src/guiPauseMenu.cpp:111
 msgid "Continue"
 msgstr "Weiter"
 
-#: src/guiPauseMenu.cpp:117
+#: src/guiPauseMenu.cpp:118
 msgid "Change Password"
 msgstr "Passwort Ã¤ndern"
 
-#: src/guiPauseMenu.cpp:124
+#: src/guiPauseMenu.cpp:125
 msgid "Disconnect"
 msgstr "Verbindung trennen"
 
-#: src/guiPauseMenu.cpp:131
+#: src/guiPauseMenu.cpp:132
 msgid "Exit to OS"
 msgstr "Programm beenden"
 
-#: src/guiPauseMenu.cpp:138
+#: src/guiPauseMenu.cpp:139
+#, fuzzy
 msgid ""
-"Keys:\n"
+"Default Controls:\n"
 "- WASD: Walk\n"
-"- Mouse left: dig blocks\n"
-"- Mouse right: place blocks\n"
+"- Mouse left: dig/hit\n"
+"- Mouse right: place/use\n"
 "- Mouse wheel: select item\n"
 "- 0...9: select item\n"
 "- Shift: sneak\n"
@@ -113,11 +488,11 @@ msgid ""
 msgstr ""
 "Tastenkürzel:\n"
 "- WASD: Gehen\n"
-"- linke Maustaste: dig blocks\n"
-"- rechte Maustaste: place blocks\n"
+"- linke Maustaste: Blöcke aufnehmen \n"
+"- rechte Maustaste: Blöche ablegen\n"
 "- Mausrad: Item auswählen\n"
 "- 0...9: Item auswählen\n"
 "- Shift: ducken\n"
-"- R: Alle geladenen Kartenteile anzeigen, umschalten\n"
+"- R: alle geladenen Blöcke anzeigen (wechseln)\n"
 "- I: Inventarmenü\n"
 "- T: Chat\n"
diff --git a/po/en/minetest.pot b/po/en/minetest.pot
deleted file mode 100644 (file)
index 8fbac78..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-24 11:32+0300\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/guiMainMenu.cpp:180
-msgid "Name/Password"
-msgstr ""
-
-#: src/guiMainMenu.cpp:203
-msgid "Address/Port"
-msgstr ""
-
-#: src/guiMainMenu.cpp:223
-msgid "Leave address blank to start a local server."
-msgstr ""
-
-#: src/guiMainMenu.cpp:230
-msgid "Fancy trees"
-msgstr ""
-
-#: src/guiMainMenu.cpp:236
-msgid "Smooth Lighting"
-msgstr ""
-
-#: src/guiMainMenu.cpp:244
-msgid "Start Game / Connect"
-msgstr ""
-
-#: src/guiMainMenu.cpp:253
-msgid "Change keys"
-msgstr ""
-
-#: src/guiMainMenu.cpp:276
-msgid "Creative Mode"
-msgstr ""
-
-#: src/guiMainMenu.cpp:282
-msgid "Enable Damage"
-msgstr ""
-
-#: src/guiMainMenu.cpp:290
-msgid "Delete map"
-msgstr ""
-
-#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
-msgid "Proceed"
-msgstr ""
-
-#: src/guiPasswordChange.cpp:102
-msgid "Old Password"
-msgstr ""
-
-#: src/guiPasswordChange.cpp:117
-msgid "New Password"
-msgstr ""
-
-#: src/guiPasswordChange.cpp:131
-msgid "Confirm Password"
-msgstr ""
-
-#: src/guiPasswordChange.cpp:146
-msgid "Change"
-msgstr ""
-
-#: src/guiPasswordChange.cpp:155
-msgid "Passwords do not match!"
-msgstr ""
-
-#: src/guiPauseMenu.cpp:110
-msgid "Continue"
-msgstr ""
-
-#: src/guiPauseMenu.cpp:117
-msgid "Change Password"
-msgstr ""
-
-#: src/guiPauseMenu.cpp:124
-msgid "Disconnect"
-msgstr ""
-
-#: src/guiPauseMenu.cpp:131
-msgid "Exit to OS"
-msgstr ""
-
-#: 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 ""
index b060c424c562c9dc80177e63d337e8052ed566be..52a02c2a713c852d4c4eac9499cbc0269e3d418b 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 0.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-22 11:00+0200\n"
+"POT-Creation-Date: 2011-08-02 12:36+0200\n"
 "PO-Revision-Date: 2011-07-21 15:48+0200\n"
 "Last-Translator: Cyriaque 'Cisoun' Skrapits <cysoun@gmail.com>\n"
 "Language-Team: Français <>\n"
@@ -17,92 +17,469 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n!=1);\n"
 
-#: src/guiMainMenu.cpp:180
+#: src/guiKeyChangeMenu.cpp:84
+msgid "KEYBINDINGS"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:94
+msgid "Forward"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:111
+msgid "Backward"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
+msgid "Left"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
+msgid "Right"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:158
+msgid "Use"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:173
+msgid "Sneak"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:189
+msgid "Jump"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:204
+msgid "Inventory"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:220
+msgid "Chat"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:236
+msgid "Toggle fly"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:251
+msgid "Toggle fast"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:266
+msgid "Range select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:283
+msgid "Print stacks"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:298
+msgid "Save"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
+msgid "Cancel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
+#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
+#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
+#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
+#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
+#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
+#: src/guiKeyChangeMenu.cpp:597
+msgid "press Key"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Left Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Middle Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Right Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "X Button 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Back"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Return"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Tab"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "X Button 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Capital"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Kana"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Pause"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Convert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Escape"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Final"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Junja"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Kanji"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Nonconvert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Accept"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "End"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Home"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+#, fuzzy
+msgid "Mode Change"
+msgstr "Changer"
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Next"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Priot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Space"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Down"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Execute"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Print"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Up"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+#, fuzzy
+msgid "Delete"
+msgstr "Supprimer carte"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Help"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Insert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Snapshot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:42
+msgid "Left Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Apps"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 0"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Right Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Sleep"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 3"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 4"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 5"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 6"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 7"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad *"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad +"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad -"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad /"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 8"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 9"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Num Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Scroll Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Left Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Right Shight"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Comma"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Minus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Period"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Plus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "Attn"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "CrSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Erase OEF"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "ExSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "OEM Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "PA1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Play"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Zoom"
+msgstr ""
+
+#: src/guiMainMenu.cpp:181
 msgid "Name/Password"
 msgstr "Nom / MdP"
 
-#: src/guiMainMenu.cpp:203
+#: src/guiMainMenu.cpp:206
 msgid "Address/Port"
 msgstr "Adresse / Port"
 
-#: src/guiMainMenu.cpp:223
+#: src/guiMainMenu.cpp:228
 msgid "Leave address blank to start a local server."
 msgstr "Laisser l'adresse vide pour lancer un serveur local."
 
-#: src/guiMainMenu.cpp:230
+#: src/guiMainMenu.cpp:235
 msgid "Fancy trees"
 msgstr "Arbres spéciaux"
 
-#: src/guiMainMenu.cpp:236
+#: src/guiMainMenu.cpp:241
 msgid "Smooth Lighting"
 msgstr "Lumière douce"
 
-#: src/guiMainMenu.cpp:244
+#: src/guiMainMenu.cpp:249
 msgid "Start Game / Connect"
 msgstr "Démarrer / Connecter"
 
-#: src/guiMainMenu.cpp:253
+#: src/guiMainMenu.cpp:258
 msgid "Change keys"
 msgstr "Changer touches"
 
-#: src/guiMainMenu.cpp:276
+#: src/guiMainMenu.cpp:281
 msgid "Creative Mode"
 msgstr "Mode créatif"
 
-#: src/guiMainMenu.cpp:282
+#: src/guiMainMenu.cpp:287
 msgid "Enable Damage"
 msgstr "Activer blessures"
 
-#: src/guiMainMenu.cpp:290
+#: src/guiMainMenu.cpp:295
 msgid "Delete map"
 msgstr "Supprimer carte"
 
-#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
+#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
 msgid "Proceed"
 msgstr "OK"
 
-#: src/guiPasswordChange.cpp:102
+#: src/guiPasswordChange.cpp:103
 msgid "Old Password"
 msgstr "Ancien mot de passe"
 
-#: src/guiPasswordChange.cpp:117
+#: src/guiPasswordChange.cpp:120
 msgid "New Password"
 msgstr "Nouveau mot de passe"
 
-#: src/guiPasswordChange.cpp:131
+#: src/guiPasswordChange.cpp:136
 msgid "Confirm Password"
 msgstr "Confirmer mot de passe"
 
-#: src/guiPasswordChange.cpp:146
+#: src/guiPasswordChange.cpp:153
 msgid "Change"
 msgstr "Changer"
 
-#: src/guiPasswordChange.cpp:155
+#: src/guiPasswordChange.cpp:162
 msgid "Passwords do not match!"
 msgstr "Mauvaise correspondance!"
 
-#: src/guiPauseMenu.cpp:110
+#: src/guiPauseMenu.cpp:111
 msgid "Continue"
 msgstr "Continuer"
 
-#: src/guiPauseMenu.cpp:117
+#: src/guiPauseMenu.cpp:118
 msgid "Change Password"
 msgstr "Changer mot de passe"
 
-#: src/guiPauseMenu.cpp:124
+#: src/guiPauseMenu.cpp:125
 msgid "Disconnect"
 msgstr "Déconnection"
 
-#: src/guiPauseMenu.cpp:131
+#: src/guiPauseMenu.cpp:132
 msgid "Exit to OS"
 msgstr "Quitter le jeu"
 
-#: src/guiPauseMenu.cpp:138
+#: src/guiPauseMenu.cpp:139
+#, fuzzy
 msgid ""
-"Keys:\n"
+"Default Controls:\n"
 "- WASD: Walk\n"
-"- Mouse left: dig blocks\n"
-"- Mouse right: place blocks\n"
+"- Mouse left: dig/hit\n"
+"- Mouse right: place/use\n"
 "- Mouse wheel: select item\n"
 "- 0...9: select item\n"
 "- Shift: sneak\n"
diff --git a/po/it/minetest.po b/po/it/minetest.po
new file mode 100644 (file)
index 0000000..6410d2c
--- /dev/null
@@ -0,0 +1,499 @@
+# 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 <giuseppe.bilotta@gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: minetest\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-02 12:36+0200\n"
+"PO-Revision-Date: 2011-07-24 18:56+0200\n"
+"Last-Translator: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\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/guiKeyChangeMenu.cpp:84
+msgid "KEYBINDINGS"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:94
+msgid "Forward"
+msgstr "Avanti"
+
+#: src/guiKeyChangeMenu.cpp:111
+msgid "Backward"
+msgstr "Indietro"
+
+#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
+msgid "Left"
+msgstr "Sinistra"
+
+#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
+msgid "Right"
+msgstr "Destra"
+
+#: src/guiKeyChangeMenu.cpp:158
+msgid "Use"
+msgstr "Usa"
+
+#: src/guiKeyChangeMenu.cpp:173
+msgid "Sneak"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:189
+msgid "Jump"
+msgstr "Salta"
+
+#: src/guiKeyChangeMenu.cpp:204
+msgid "Inventory"
+msgstr "Invetario"
+
+#: src/guiKeyChangeMenu.cpp:220
+msgid "Chat"
+msgstr "Parla"
+
+#: src/guiKeyChangeMenu.cpp:236
+msgid "Toggle fly"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:251
+msgid "Toggle fast"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:266
+msgid "Range select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:283
+msgid "Print stacks"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:298
+msgid "Save"
+msgstr "Salva"
+
+#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
+msgid "Cancel"
+msgstr "Annulla"
+
+#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
+#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
+#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
+#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
+#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
+#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
+#: src/guiKeyChangeMenu.cpp:597
+msgid "press Key"
+msgstr "premi tasto"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Left Button"
+msgstr "Tasto sinistro"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Middle Button"
+msgstr "Tasto centrale"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Right Button"
+msgstr "Tasto destro"
+
+#: src/guiKeyChangeMenu.h:33
+msgid "X Button 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Back"
+msgstr "Indietro"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Return"
+msgstr "Invio"
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Tab"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "X Button 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Capital"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Kana"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Pause"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Convert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Escape"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Final"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Junja"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Kanji"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Nonconvert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Accept"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "End"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Home"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Mode Change"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Next"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Priot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Space"
+msgstr "Spazio"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Down"
+msgstr "Giù"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Execute"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Print"
+msgstr "Stampa"
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Up"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Delete"
+msgstr "Cancella"
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Help"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Insert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Snapshot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:42
+msgid "Left Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Apps"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 0"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Right Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Sleep"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 3"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 4"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 5"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 6"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 7"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad *"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad +"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad -"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad /"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 8"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 9"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Num Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Scroll Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Left Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Right Shight"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Comma"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Minus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Period"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Plus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "Attn"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "CrSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Erase OEF"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "ExSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "OEM Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "PA1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Play"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Zoom"
+msgstr ""
+
+#: src/guiMainMenu.cpp:181
+msgid "Name/Password"
+msgstr "Nome/Password"
+
+#: src/guiMainMenu.cpp:206
+msgid "Address/Port"
+msgstr "Indirizzo/Porta"
+
+#: src/guiMainMenu.cpp:228
+msgid "Leave address blank to start a local server."
+msgstr "Lascia vuoto l'indirizzo per avviare un server locale"
+
+#: src/guiMainMenu.cpp:235
+msgid "Fancy trees"
+msgstr "Alberi strani"
+
+#: src/guiMainMenu.cpp:241
+msgid "Smooth Lighting"
+msgstr ""
+
+#: src/guiMainMenu.cpp:249
+msgid "Start Game / Connect"
+msgstr "Avvia Gioco / Connetti"
+
+#: src/guiMainMenu.cpp:258
+msgid "Change keys"
+msgstr "Modifica tasti"
+
+#: src/guiMainMenu.cpp:281
+msgid "Creative Mode"
+msgstr "Modalità creativa"
+
+#: src/guiMainMenu.cpp:287
+msgid "Enable Damage"
+msgstr "Attiva Danno"
+
+#: src/guiMainMenu.cpp:295
+msgid "Delete map"
+msgstr "Cancella mappa"
+
+#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
+msgid "Proceed"
+msgstr "Procedi"
+
+#: src/guiPasswordChange.cpp:103
+msgid "Old Password"
+msgstr "Vecchia password"
+
+#: src/guiPasswordChange.cpp:120
+msgid "New Password"
+msgstr "Nuova password"
+
+#: src/guiPasswordChange.cpp:136
+msgid "Confirm Password"
+msgstr "Conferma password"
+
+#: src/guiPasswordChange.cpp:153
+msgid "Change"
+msgstr "Modifica"
+
+#: src/guiPasswordChange.cpp:162
+msgid "Passwords do not match!"
+msgstr "Le password non corrispondono!"
+
+#: src/guiPauseMenu.cpp:111
+msgid "Continue"
+msgstr "Continua"
+
+#: src/guiPauseMenu.cpp:118
+msgid "Change Password"
+msgstr "Cambia password"
+
+#: src/guiPauseMenu.cpp:125
+msgid "Disconnect"
+msgstr "Disconnetti"
+
+#: src/guiPauseMenu.cpp:132
+msgid "Exit to OS"
+msgstr "Esci al S.O."
+
+#: src/guiPauseMenu.cpp:139
+#, fuzzy
+msgid ""
+"Default Controls:\n"
+"- WASD: Walk\n"
+"- Mouse left: dig/hit\n"
+"- Mouse right: place/use\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
new file mode 100644 (file)
index 0000000..b4ae8ee
--- /dev/null
@@ -0,0 +1,487 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: minetest\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-02 12:36+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/guiKeyChangeMenu.cpp:84
+msgid "KEYBINDINGS"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:94
+msgid "Forward"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:111
+msgid "Backward"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
+msgid "Left"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
+msgid "Right"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:158
+msgid "Use"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:173
+msgid "Sneak"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:189
+msgid "Jump"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:204
+msgid "Inventory"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:220
+msgid "Chat"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:236
+msgid "Toggle fly"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:251
+msgid "Toggle fast"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:266
+msgid "Range select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:283
+msgid "Print stacks"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:298
+msgid "Save"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
+msgid "Cancel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
+#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
+#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
+#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
+#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
+#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
+#: src/guiKeyChangeMenu.cpp:597
+msgid "press Key"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Left Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Middle Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "Right Button"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:33
+msgid "X Button 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Back"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Return"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "Tab"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:34
+msgid "X Button 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Capital"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Kana"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Pause"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:35
+msgid "Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Convert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Escape"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Final"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Junja"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Kanji"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:36
+msgid "Nonconvert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Accept"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "End"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Home"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Mode Change"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Next"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Priot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:37
+msgid "Space"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Down"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Execute"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Print"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Select"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:38
+msgid "Up"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Delete"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Help"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Insert"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:39
+msgid "Snapshot"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:42
+msgid "Left Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Apps"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 0"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Numpad 1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Right Windows"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:43
+msgid "Sleep"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 2"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 3"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 4"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 5"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 6"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:44
+msgid "Numpad 7"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad *"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad +"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad -"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad /"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 8"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:45
+msgid "Numpad 9"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Num Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:49
+msgid "Scroll Lock"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Left Shift"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:50
+msgid "Right Shight"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Left Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Control"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:51
+msgid "Right Menu"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Comma"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Minus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Period"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:53
+msgid "Plus"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "Attn"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:57
+msgid "CrSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Erase OEF"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "ExSel"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "OEM Clear"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "PA1"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Play"
+msgstr ""
+
+#: src/guiKeyChangeMenu.h:58
+msgid "Zoom"
+msgstr ""
+
+#: src/guiMainMenu.cpp:181
+msgid "Name/Password"
+msgstr ""
+
+#: src/guiMainMenu.cpp:206
+msgid "Address/Port"
+msgstr ""
+
+#: src/guiMainMenu.cpp:228
+msgid "Leave address blank to start a local server."
+msgstr ""
+
+#: src/guiMainMenu.cpp:235
+msgid "Fancy trees"
+msgstr ""
+
+#: src/guiMainMenu.cpp:241
+msgid "Smooth Lighting"
+msgstr ""
+
+#: src/guiMainMenu.cpp:249
+msgid "Start Game / Connect"
+msgstr ""
+
+#: src/guiMainMenu.cpp:258
+msgid "Change keys"
+msgstr ""
+
+#: src/guiMainMenu.cpp:281
+msgid "Creative Mode"
+msgstr ""
+
+#: src/guiMainMenu.cpp:287
+msgid "Enable Damage"
+msgstr ""
+
+#: src/guiMainMenu.cpp:295
+msgid "Delete map"
+msgstr ""
+
+#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
+msgid "Proceed"
+msgstr ""
+
+#: src/guiPasswordChange.cpp:103
+msgid "Old Password"
+msgstr ""
+
+#: src/guiPasswordChange.cpp:120
+msgid "New Password"
+msgstr ""
+
+#: src/guiPasswordChange.cpp:136
+msgid "Confirm Password"
+msgstr ""
+
+#: src/guiPasswordChange.cpp:153
+msgid "Change"
+msgstr ""
+
+#: src/guiPasswordChange.cpp:162
+msgid "Passwords do not match!"
+msgstr ""
+
+#: src/guiPauseMenu.cpp:111
+msgid "Continue"
+msgstr ""
+
+#: src/guiPauseMenu.cpp:118
+msgid "Change Password"
+msgstr ""
+
+#: src/guiPauseMenu.cpp:125
+msgid "Disconnect"
+msgstr ""
+
+#: src/guiPauseMenu.cpp:132
+msgid "Exit to OS"
+msgstr ""
+
+#: src/guiPauseMenu.cpp:139
+msgid ""
+"Default Controls:\n"
+"- WASD: Walk\n"
+"- Mouse left: dig/hit\n"
+"- Mouse right: place/use\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 ""
index 4d51f7104c966c2e723c50a6e3b7b2df0d592f72..ce53651b0dee22555de44788808c80595ec46c77 100644 (file)
@@ -1,15 +1,19 @@
-cmake_minimum_required( VERSION 2.6 )
-
 project(minetest)
+cmake_minimum_required( VERSION 2.6 )
 
 if(RUN_IN_PLACE)
        add_definitions ( -DRUN_IN_PLACE )
 endif(RUN_IN_PLACE)
 
-OPTION(USE_GETTEXT "Use GetText for internationalization" OFF)
+# user-visible option to enable/disable gettext usage
+OPTION(ENABLE_GETTEXT "Use GetText for internationalization" ON)
+
+# this is only set to 1 if gettext is enabled _and_ available
+set(USE_GETTEXT 0)
+
+find_package(GettextLib)
 
-if(USE_GETTEXT)
-       find_package(GettextLib REQUIRED)
+if(GETTEXT_FOUND AND ENABLE_GETTEXT)
        message(STATUS "gettext include path: ${GETTEXT_INCLUDE_DIR}")
        message(STATUS "gettext msgfmt path: ${GETTEXT_MSGFMT}")
        if(WIN32)
@@ -17,16 +21,13 @@ if(USE_GETTEXT)
                message(STATUS "gettext dll: ${GETTEXT_DLL}")
                message(STATUS "gettext iconv dll: ${GETTEXT_ICONV_DLL}")
        endif()
-       if (GETTEXT_FOUND)
-               add_definitions( -DUSE_GETTEXT )
-               message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
-       else()
-               message(STATUS "ERROR: GetText enabled but not found, disabling")
-               set(USE_GETTEXT FALSE)
-       endif(GETTEXT_FOUND)
-else(USE_GETTEXT)
+       set(USE_GETTEXT 1)
+       message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
+elseif(GETTEXT_FOUND AND NOT ENABLE_GETTEXT)
+       MESSAGE(STATUS "GetText found but disabled;")
+else(GETTEXT_FOUND AND ENABLE_GETTEXT)
        message(STATUS "GetText disabled")
-endif(USE_GETTEXT)
+endif(GETTEXT_FOUND AND ENABLE_GETTEXT)
 
 if(NOT MSVC)
        set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")
@@ -274,7 +275,7 @@ if(BUILD_CLIENT)
 
        install(FILES ${images} DESTINATION ${DATADIR})
 
-       if (USE_GETTEXT)
+       if(USE_GETTEXT)
                foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
                        set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
                        set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
@@ -305,54 +306,29 @@ if(BUILD_SERVER)
 endif(BUILD_SERVER)
 
 if (USE_GETTEXT)
-       add_custom_command(OUTPUT "${GETTEXT_PO_PATH}/en"
-               COMMAND ${CMAKE_COMMAND} -E make_directory "${GETTEXT_PO_PATH}/en"
-               COMMENT "po-update [en]: creating translation template base directory")
-       set(POT_FILE "${GETTEXT_PO_PATH}/en/minetest.pot")
-       file(GLOB GETTEXT_POT_DEPS *.cpp *.h)
-       file(GLOB GETTEXT_POT_DEPS_REL RELATIVE ${CMAKE_SOURCE_DIR} *.cpp *.h)
-       add_custom_command(OUTPUT ${POT_FILE}
-               COMMAND ${GETTEXT_EXTRACT} -F -n -o ${POT_FILE} ${GETTEXT_POT_DEPS_REL}
-               DEPENDS "${GETTEXT_PO_PATH}/en" ${GETTEXT_POT_DEPS}
-               WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-               COMMENT "po-update [en]: updating translation template")
-
-       set(PO_FILES)
        set(MO_FILES)
 
        foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
-               # skip the 'en' locale which is treated separately
-               if (NOT LOCALE STREQUAL "en")
-                       set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/minetest.po")
-                       add_custom_command(OUTPUT ${PO_FILE_PATH}
-                               COMMAND ${GETTEXT_MSGMERGE} -F -U ${PO_FILE_PATH} ${POT_FILE}
-                               DEPENDS ${POT_FILE}
-                               WORKING_DIRECTORY "${GETTEXT_PO_PATH}/${LOCALE}"
-                               COMMENT "po-update [${LOCALE}]: updating strings")
-
+               set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/minetest.po")
+               set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
+               set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
+
+               add_custom_command(OUTPUT ${MO_BUILD_PATH}
+                       COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
+                       COMMENT "mo-update [${LOCALE}]: Creating locale directory.")
+
+               add_custom_command(
+                       OUTPUT ${MO_FILE_PATH}
+                       COMMAND ${GETTEXT_MSGFMT} -o ${MO_FILE_PATH} ${PO_FILE_PATH}
+                       DEPENDS ${MO_BUILD_PATH} ${PO_FILE_PATH}
+                       WORKING_DIRECTORY "${GETTEXT_PO_PATH}/${LOCALE}"
+                       COMMENT "mo-update [${LOCALE}]: Creating mo file."
+                       )
 
-                       set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
-                       add_custom_command(OUTPUT ${MO_BUILD_PATH}
-                               COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
-                               COMMENT "mo-update [${LOCALE}]: Creating locale directory.")
-
-                       set(MO_FILE_PATH "${MO_BUILD_PATH}/minetest.mo")
-
-                       add_custom_command(
-                               OUTPUT ${MO_FILE_PATH}
-                               COMMAND ${GETTEXT_MSGFMT} -o ${MO_FILE_PATH} ${PO_FILE_PATH}
-                               DEPENDS ${MO_BUILD_PATH} ${PO_FILE_PATH}
-                               WORKING_DIRECTORY "${GETTEXT_PO_PATH}/${LOCALE}"
-                               COMMENT "mo-update [${LOCALE}]: Creating mo file."
-                               )
-
-                       set(MO_FILES ${MO_FILES} ${MO_FILE_PATH})
-                       set(PO_FILES ${PO_FILES} ${PO_FILE_PATH})
-               endif(NOT LOCALE STREQUAL "en")
+               set(MO_FILES ${MO_FILES} ${MO_FILE_PATH})
        endforeach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
 
        add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
-       add_custom_target(updatepo COMMENT "po update" DEPENDS ${PO_FILES})
 endif(USE_GETTEXT)
 
 # Subdirectories
index 55f0af6dceda0b9a035aa0509eb5d9a5972ab148..02f78e233293236c193b08ab5ef7d1dfa1206016 100644 (file)
@@ -936,7 +936,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
                */
 
                //m_env.getClientMap().updateMeshes(block->getPos(), getDayNightRatio());
-               
                /*
                        Add it to mesh update queue and set it to be acknowledged after update.
                */
index 5e375191fb6af08cdaa0c2a86a5248c6aa02752f..7cbb11f6b2feadd9c7686ecaf567ce301bad4e61 100644 (file)
@@ -3,14 +3,16 @@
 #ifndef CMAKE_CONFIG_H
 #define CMAKE_CONFIG_H
 
+#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
        #define BUILD_TYPE "Debug"
 #endif
-#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
+#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
 
 #endif
 
index b24cf6a69d675d8936a934b0b6315be85ed32d7b..54b89a060902ab1ac03a826330d85576d7a35334 100644 (file)
@@ -9,6 +9,8 @@
 #ifdef USE_CMAKE_CONFIG_H
        #include "cmake_config.h"
 #else
+       #define PROJECT_NAME "minetest"
+
        //#define INSTALL_PREFIX ""
        #define VERSION_STRING "unknown"
        #ifdef NDEBUG
        #else
                #define RUN_IN_PLACE_BOOLSTRING "0"
        #endif
-       #define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
-#endif
+       #if USE_GETTEXT
+               #define USE_GETTEXT_BOOLSTRING "1"
+       #else
+               #define USE_GETTEXT_BOOLSTRING "0"
+       #endif
 
+       #define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" USE_GETTEXT="USE_GETTEXT_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
+#endif
 #endif
 
index b5a1dc7761795deeee13cabf022ef920f15859f9..481ea1a6304d26d328124fc67ab208b1c5dec55f 100644 (file)
@@ -413,6 +413,22 @@ InventoryItem *craft_get_result(InventoryItem **items)
                }
        }
 
+       // Ladder
+       {
+               ItemSpec specs[9];
+               specs[0] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[2] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[3] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[5] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[6] = ItemSpec(ITEM_CRAFT, "Stick");
+               specs[8] = ItemSpec(ITEM_CRAFT, "Stick");
+               if(checkItemCombination(items, specs))
+               {
+                       return new MaterialItem(CONTENT_LADDER, 1);
+               }
+       }
+
        return NULL;
 }
 
index 3044c8b359102c8c55293d48ecd62fb1b1509b4f..ed2cd766a032acdca7c640b7b459a162168498b3 100644 (file)
@@ -1134,6 +1134,53 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
                        u16 indices[] = {0,1,2,2,3,0};
                        collector.append(material_rail, vertices, 4, indices, 6);
                }
+               else if (n.getContent() == CONTENT_LADDER) {
+                       u8 l = decode_light(n.getLightBlend(data->m_daynight_ratio));
+                       video::SColor c(255,l,l,l);
+
+                       float d = (float)BS/16;
+
+                       // Assume wall is at X+
+                       video::S3DVertex vertices[4] =
+                       {
+                               video::S3DVertex(BS/2-d,-BS/2,-BS/2, 0,0,0, c, 0,1),
+                               video::S3DVertex(BS/2-d,-BS/2,BS/2, 0,0,0, c, 1,1),
+                               video::S3DVertex(BS/2-d,BS/2,BS/2, 0,0,0, c, 1,0),
+                               video::S3DVertex(BS/2-d,BS/2,-BS/2, 0,0,0, c, 0,0),
+                       };
+
+                       v3s16 dir = unpackDir(n.param2);
+
+                       for(s32 i=0; i<4; i++)
+                       {
+                               if(dir == v3s16(1,0,0))
+                                       vertices[i].Pos.rotateXZBy(0);
+                               if(dir == v3s16(-1,0,0))
+                                       vertices[i].Pos.rotateXZBy(180);
+                               if(dir == v3s16(0,0,1))
+                                       vertices[i].Pos.rotateXZBy(90);
+                               if(dir == v3s16(0,0,-1))
+                                       vertices[i].Pos.rotateXZBy(-90);
+                               if(dir == v3s16(0,-1,0))
+                                       vertices[i].Pos.rotateXYBy(-90);
+                               if(dir == v3s16(0,1,0))
+                                       vertices[i].Pos.rotateXYBy(90);
+
+                               vertices[i].Pos += intToFloat(p + blockpos_nodes, BS);
+                       }
+
+                       video::SMaterial material_ladder;
+                       material_ladder.setFlag(video::EMF_LIGHTING, false);
+                       material_ladder.setFlag(video::EMF_BACK_FACE_CULLING, false);
+                       material_ladder.setFlag(video::EMF_BILINEAR_FILTER, false);
+                       material_ladder.setFlag(video::EMF_FOG_ENABLE, true);
+                       material_ladder.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
+                       material_ladder.setTexture(0, g_texturesource->getTextureRaw("ladder.png"));
+
+                       u16 indices[] = {0,1,2,2,3,0};
+                       // Add to mesh collector
+                       collector.append(material_ladder, vertices, 4, indices, 6);
+               }
        }
 }
 #endif
index 7589f06edd02b9b3b776203780ea0b5c1d87c686..b164033db6e8669a3d2f0f2c2152e2af2695def5 100644 (file)
@@ -303,6 +303,20 @@ void content_mapnode_init()
        f->walkable = false;
        setDirtLikeDiggingProperties(f->digging_properties, 0.75);
 
+       i = CONTENT_LADDER;
+       f = &content_features(i);
+       f->setInventoryTexture("ladder.png");
+       f->light_propagates = true;
+       f->param_type = CPT_LIGHT;
+       f->is_ground_content = true;
+       f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
+       f->wall_mounted = true;
+       f->solidness = 0;
+       f->air_equivalent = true;
+       f->walkable = false;
+       f->climbable = true;
+       setWoodLikeDiggingProperties(f->digging_properties, 0.5);
+
        // Deprecated
        i = CONTENT_COALSTONE;
        f = &content_features(i);
index 609df0a958087ce0de4e44bd6b122885872039aa..9643db7463f9f79cf85351f3be0deba6a3f1f548 100644 (file)
@@ -46,6 +46,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
 #define CONTENT_FURNACE 16
 #define CONTENT_FENCE 21
 #define CONTENT_RAIL 30
+#define CONTENT_LADDER 31
 
 // 0x800...0xfff (2048...4095): higher 4 bytes of param2 are not usable
 #define CONTENT_GRASS 0x800 //1
@@ -75,6 +76,5 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
 #define CONTENT_NC 0x817
 #define CONTENT_NC_RB 0x818
 
-
 #endif
 
index e9b94f3fa8928be5ee820442e39a51186f64a7d6..680d209fc2dbdf87b66e23a6f4659c0e284b8a77 100644 (file)
@@ -1511,6 +1511,8 @@ void ClientEnvironment::step(float dtime)
        /*
                Get the speed the player is going
        */
+       bool is_climbing = lplayer->is_climbing;
+
        f32 player_speed = 0.001; // just some small value
        player_speed = lplayer->getSpeed().getLength();
        
@@ -1568,7 +1570,7 @@ void ClientEnvironment::step(float dtime)
                        v3f lplayerpos = lplayer->getPosition();
                        
                        // Apply physics
-                       if(free_move == false)
+                       if(free_move == false && is_climbing == false)
                        {
                                // Gravity
                                v3f speed = lplayer->getSpeed();
index a42bf2b2cab249a9af612eff740ba50642948103..c4a9aba00050fb306b63db026b72ae1e02a446d3 100644 (file)
@@ -538,6 +538,56 @@ void getPointedNode(Client *client, v3f player_position,
                                }
                        }
                }
+
+               else if(n.getContent() == CONTENT_LADDER)
+               {
+                       v3s16 dir = unpackDir(n.param2);
+                       v3f dir_f = v3f(dir.X, dir.Y, dir.Z);
+                       dir_f *= BS/2 - BS/6 - BS/20;
+                       v3f cpf = npf + dir_f;
+                       f32 distance = (cpf - camera_position).getLength();
+
+                       v3f vertices[4] =
+                       {
+                               v3f(BS*0.42,-BS/2,-BS/2),
+                               v3f(BS*0.49, BS/2, BS/2),
+                       };
+
+                       for(s32 i=0; i<2; i++)
+                       {
+                               if(dir == v3s16(1,0,0))
+                                       vertices[i].rotateXZBy(0);
+                               if(dir == v3s16(-1,0,0))
+                                       vertices[i].rotateXZBy(180);
+                               if(dir == v3s16(0,0,1))
+                                       vertices[i].rotateXZBy(90);
+                               if(dir == v3s16(0,0,-1))
+                                       vertices[i].rotateXZBy(-90);
+                               if(dir == v3s16(0,-1,0))
+                                       vertices[i].rotateXYBy(-90);
+                               if(dir == v3s16(0,1,0))
+                                       vertices[i].rotateXYBy(90);
+
+                               vertices[i] += npf;
+                       }
+
+                       core::aabbox3d<f32> box;
+
+                       box = core::aabbox3d<f32>(vertices[0]);
+                       box.addInternalPoint(vertices[1]);
+
+                       if(distance < mindistance)
+                       {
+                               if(box.intersectsWithLine(shootline))
+                               {
+                                       nodefound = true;
+                                       nodepos = np;
+                                       neighbourpos = np;
+                                       mindistance = distance;
+                                       nodehilightbox = box;
+                               }
+                       }
+               }
                else if(n.getContent() == CONTENT_RAIL)
                {
                        v3s16 dir = unpackDir(n.param0);
index 73b9f89869a32a610c8c0e601887ac883ac3169a..0e6ee0fd5f779965a1dc7d10caeb3f214c880284 100644 (file)
@@ -1,4 +1,8 @@
-#ifdef USE_GETTEXT
+#ifndef GETTEXT_HEADER
+#include "config.h" // for USE_GETTEXT
+#include <iostream>
+
+#if USE_GETTEXT
 #include <libintl.h>
 #else
 #define gettext(String) String
@@ -8,6 +12,17 @@
 #define gettext_noop(String) String
 #define N_(String) gettext_noop (String)
 
+inline void init_gettext(const char *path) {
+#if USE_GETTEXT
+       // don't do this if MSVC compiler is used, it gives an assertion fail
+       #ifndef _MSC_VER
+               setlocale(LC_MESSAGES, "");
+       #endif
+       bindtextdomain(PROJECT_NAME, path);
+       textdomain(PROJECT_NAME);
+#endif
+}
+
 inline wchar_t* chartowchar_t(const char *str)
 {
        size_t l = strlen(str)+1;
@@ -15,3 +30,20 @@ inline wchar_t* chartowchar_t(const char *str)
        mbstowcs(nstr, str, l);
        return nstr;
 }
+
+inline wchar_t* wgettext(const char *str)
+{
+       return chartowchar_t(gettext(str));
+}
+
+inline void changeCtype(const char *l)
+{
+       char *ret = NULL;
+       ret = setlocale(LC_CTYPE, l);
+       if(ret == NULL)
+               std::cout<<"locale could not be set"<<std::endl;
+       else
+               std::cout<<"locale has been set to:"<<ret<<std::endl;
+}
+#define GETTEXT_HEADER
+#endif
index 98d6f8086c092072fb0baa6ab607becb99c970f8..20a3d361e2b4067759ca101dcb3324eb62c11c0d 100644 (file)
@@ -76,13 +76,13 @@ 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);
-               const wchar_t *text = L"KEYBINDINGS";
                //gui::IGUIStaticText *t =
-               Environment->addStaticText(text, rect, false, true, this, -1);
+               Environment->addStaticText(wgettext("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(wgettext("Forward"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -101,15 +101,15 @@ 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);
        {
                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(wgettext("Backward"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -118,14 +118,14 @@ 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);
        {
                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(wgettext("Left"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -133,14 +133,14 @@ 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);
        {
                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(wgettext("Right"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -149,14 +149,14 @@ 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);
        {
                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(wgettext("Use"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -164,14 +164,14 @@ 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);
        {
                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(wgettext("Sneak"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -180,14 +180,13 @@ 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);
        {
                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(wgettext("Jump"), rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -195,15 +194,15 @@ 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);
        {
                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(wgettext("Inventory"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -212,14 +211,13 @@ 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);
        {
                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(wgettext("Chat"), rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -227,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
@@ -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(wgettext("Toggle fly"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -244,14 +242,14 @@ 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);
        {
                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(wgettext("Toggle fast"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -259,14 +257,14 @@ 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);
        {
                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(wgettext("Range select"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -275,15 +273,15 @@ 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);
        {
                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(wgettext("Print stacks"),
+                               rect, false, true, this, -1);
                //t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
        }
 
@@ -291,18 +289,21 @@ 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);
                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,
+               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, L"Cancel");
+               Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON,
+               wgettext("Cancel"));
        }
+       changeCtype("C");
 }
 
 void GUIKeyChangeMenu::drawMenu()
@@ -366,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;
@@ -417,85 +418,86 @@ 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(
-                                       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");
                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
@@ -526,70 +534,71 @@ 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(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_BACKWARD_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->backward->setText(L"press Key");
+                               this->backward->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_LEFT_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->left->setText(L"press Key");
+                               this->left->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_RIGHT_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->right->setText(L"press Key");
+                               this->right->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_USE_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->use->setText(L"press Key");
+                               this->use->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_FLY_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->fly->setText(L"press Key");
+                               this->fly->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_FAST_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->fast->setText(L"press Key");
+                               this->fast->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_JUMP_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->jump->setText(L"press Key");
+                               this->jump->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_CHAT_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->chat->setText(L"press Key");
+                               this->chat->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_SNEAK_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->sneak->setText(L"press Key");
+                               this->sneak->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_INVENTORY_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->inventory->setText(L"press Key");
+                               this->inventory->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_DUMP_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->dump->setText(L"press Key");
+                               this->dump->setText(wgettext("press Key"));
                                break;
                        case GUI_ID_KEY_RANGE_BUTTON:
                                resetMenu();
                                activeKey = event.GUIEvent.Caller->getID();
-                               this->range->setText(L"press Key");
+                               this->range->setText(wgettext("press Key"));
                                break;
                        }
                        //Buttons
+                       changeCtype("C");
 
                }
        }
index e9e359c3cd282104e477ff5af2433c7717c7153b..db86ab2d175f01c0b382c25a55951ec9d97df968 100644 (file)
 #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",
+       { "-", 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", "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", 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", "-", "-", "-", "-", "-", "-",
-                       "-", "-", "Num Lock", "Scroll Lock", "-", "-", "-", "-", "-", "-", "-",
-                       "-", "-", "-", "-", "-", "-", "-", "Left Shift", "Right Shight",
-                       "Left Control", "Right Control", "Left Menu", "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"), "-", "-",
                        "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
-                       "-", "-", "-", "-", "-", "Plus", "Comma", "Minus", "Period", "-", "-",
+                       "-", "-", "-", "-", "-", N_("Plus"), N_("Comma"), N_("Minus"), N_("Period"), "-", "-",
                        "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
                        "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
                        "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
-                       "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel",
-                       "ExSel", "Erase OEF", "Play", "Zoom", "PA1", "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,
index 1d7f224f614fa3bf3af6be185414f09fbd7f85f5..2d5bd151acadd87fcb84f0f436e076fb2a1f90b1 100644 (file)
@@ -164,6 +164,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
        v2s32 topleft_client(40, 0);
        v2s32 size_client = size - v2s32(40, 0);
        
+       changeCtype("");
        {
                core::rect<s32> rect(0, 0, 20, 125);
                rect += topleft_client + v2s32(-15, 60);
@@ -177,9 +178,10 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
        {
                core::rect<s32> 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");
        {
                core::rect<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, 50);
@@ -196,13 +198,15 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
                e->setPasswordBox(true);
 
        }
+       changeCtype("");
        // Address + port
        {
                core::rect<s32> 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");
        {
                core::rect<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, 100);
@@ -217,23 +221,24 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
                rect += topleft_client + v2s32(size_client.X-60-100, 100);
                Environment->addEditBox(text_port.c_str(), rect, true, this, GUI_ID_PORT_INPUT);
        }
+       changeCtype("");
        {
                core::rect<s32> 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<s32> 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<s32> 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
        {
@@ -241,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
@@ -250,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
@@ -273,13 +278,13 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
                core::rect<s32> 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<s32> 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
        {
@@ -287,8 +292,9 @@ 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");
 }
 
 void GUIMainMenu::drawMenu()
index 155be6029c8b0f08174a121e8bb50c4d44617853..14b360708a8439a6806e0de8e7b18ead983002fb 100644 (file)
@@ -85,14 +85,16 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize)
                Environment->addStaticText(m_message_text.c_str(), rect, false,
                                true, this, 256);
        }
+       changeCtype("");
        {
                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,
-                       chartowchar_t(gettext("Proceed")));
+                       wgettext("Proceed"));
                Environment->setFocus(e);
        }
+       changeCtype("C");
 }
 
 void GUIMessageMenu::drawMenu()
index fabe7511013d8ccd56394c1626859793b4a19d3e..273326fd59761d3802366610126703603b786af4 100644 (file)
@@ -96,12 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                Add stuff
        */
        s32 ypos = 50;
+       changeCtype("");
        {
                core::rect<s32> 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");
        {
                core::rect<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -111,12 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                e->setPasswordBox(true);
        }
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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");
        {
                core::rect<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -125,12 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                e->setPasswordBox(true);
        }
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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");
        {
                core::rect<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -140,10 +146,11 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
        }
 
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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;
@@ -152,10 +159,11 @@ 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);
        }
+       changeCtype("C");
 
 }
 
index 7745b8dd2103df40b27c0273109c1a8bb7aaac39..eae887a4ceaab048b3ea9a19d2720f9c4a953f2e 100644 (file)
@@ -103,32 +103,33 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
        const s32 btn_gap = 20;\r
        const s32 btn_num = 4;\r
        s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2;\r
+       changeCtype("");\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,\r
-                       chartowchar_t(gettext("Continue")));\r
+                       wgettext("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,\r
-                       chartowchar_t(gettext("Change Password")));\r
+                       wgettext("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,\r
-                       chartowchar_t(gettext("Disconnect")));\r
+                       wgettext("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,\r
-                       chartowchar_t(gettext("Exit to OS")));\r
+                       wgettext("Exit to OS"));\r
        }\r
 \r
        {\r
@@ -172,7 +173,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
                );*/\r
 \r
                std::ostringstream os;\r
-               os<<"Minetest-c55\n";\r
+               os<<"Minetest\n";\r
                os<<"by Perttu Ahola and contributors\n";\r
                os<<"celeron55@gmail.com\n";\r
                os<<BUILD_INFO<<"\n";\r
@@ -180,6 +181,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
        \r
                Environment->addStaticText(narrow_to_wide(os.str()).c_str(), rect, false, true, this, 259);\r
        }\r
+       changeCtype("C");\r
 }\r
 \r
 void GUIPauseMenu::drawMenu()\r
index 252e452f5d30f690c86c24abd2340b51c506c613..bfe0ea5de259b0123a0d20f80a864f7049d92b5e 100644 (file)
@@ -104,12 +104,14 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
                Environment->addEditBox(text.c_str(), rect, true, this, 256);
                Environment->setFocus(e);
        }
+       changeCtype("");
        {
                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,
-                       chartowchar_t(gettext("Proceed")));
+                       wgettext("Proceed"));
        }
+       changeCtype("C");
 }
 
 void GUITextInputMenu::drawMenu()
index d6472d2eaa7e0e780f4dc42ecca7ed02fc9ad2f1..f014914d02a6f27e3070a60aa4693e9affc36a36 100644 (file)
@@ -233,4 +233,3 @@ void clearKeyCache()
 {
        g_key_setting_cache.clear();
 }
-
index 3193194affe17a83c162b1657c67ed0d183145df..4f57fc078e05921e86ad5bceac0960795e9b1baf 100644 (file)
@@ -1164,11 +1164,7 @@ int main(int argc, char *argv[])
        // Create user data directory
        fs::CreateDir(porting::path_userdata);
 
-#ifdef USE_GETTEXT
-       setlocale(LC_MESSAGES, "");
-       bindtextdomain("minetest", (porting::path_userdata+"/locale").c_str());
-       textdomain("minetest");
-#endif
+       init_gettext((porting::path_data+"/../locale").c_str());
        
        // Initialize debug streams
 #ifdef RUN_IN_PLACE
@@ -1189,7 +1185,7 @@ int main(int argc, char *argv[])
        BEGIN_DEBUG_EXCEPTION_HANDLER
 
        // Print startup message
-       dstream<<DTIME<<"minetest-c55"
+       dstream<<DTIME<<PROJECT_NAME
                        " with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
                        <<", "<<BUILD_INFO
                        <<std::endl;
index 83062706694022984f5ae077c86d29e9c6c1c11b..dc4459263ac5750988f14d19230a84656865cac0 100644 (file)
@@ -1086,7 +1086,7 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
                v3s16 p2 = p + dirs[i];
 
                MapNode n2 = getNode(p2);
-               if(content_liquid(n2.getContent()))
+               if(content_liquid(n2.getContent()) || n2.getContent() == CONTENT_AIR)
                {
                        m_transforming_liquid.push_back(p2);
                }
@@ -1260,7 +1260,7 @@ void Map::removeNodeAndUpdate(v3s16 p,
                v3s16 p2 = p + dirs[i];
 
                MapNode n2 = getNode(p2);
-               if(content_liquid(n2.getContent()))
+               if(content_liquid(n2.getContent()) || n2.getContent() == CONTENT_AIR)
                {
                        m_transforming_liquid.push_back(p2);
                }
@@ -1540,6 +1540,17 @@ void Map::PrintInfo(std::ostream &out)
 
 #define WATER_DROP_BOOST 4
 
+enum NeighborType {
+       NEIGHBOR_UPPER,
+       NEIGHBOR_SAME_LEVEL,
+       NEIGHBOR_LOWER
+};
+struct NodeNeighbor {
+       MapNode n;
+       NeighborType t;
+       v3s16 p;
+};
+
 void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
 {
        DSTACK(__FUNCTION_NAME);
@@ -1559,240 +1570,221 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
                v3s16 p0 = m_transforming_liquid.pop_front();
 
                MapNode n0 = getNodeNoEx(p0);
-
-               // Don't deal with non-liquids
-               if(content_liquid(n0.getContent()) == false)
-                       continue;
-
-               bool is_source = !content_flowing_liquid(n0.getContent());
-
-               u8 liquid_level = 8;
-               if(is_source == false)
-                       liquid_level = n0.param2 & 0x0f;
-
-               // Turn possible source into non-source
-               u8 nonsource_c = make_liquid_flowing(n0.getContent());
-
+                               
                /*
-                       If not source, check that some node flows into this one
-                       and what is the level of liquid in this one
-               */
-               if(is_source == false)
-               {
-                       s8 new_liquid_level_max = -1;
-
-                       v3s16 dirs_from[5] = {
-                               v3s16(0,1,0), // top
-                               v3s16(0,0,1), // back
-                               v3s16(1,0,0), // right
-                               v3s16(0,0,-1), // front
-                               v3s16(-1,0,0), // left
-                       };
-                       for(u16 i=0; i<5; i++)
-                       {
-                               bool from_top = (i==0);
-
-                               v3s16 p2 = p0 + dirs_from[i];
-                               MapNode n2 = getNodeNoEx(p2);
-
-                               if(content_liquid(n2.getContent()))
-                               {
-                                       u8 n2_nonsource_c = make_liquid_flowing(n2.getContent());
-                                       // Check that the liquids are the same type
-                                       if(n2_nonsource_c != nonsource_c)
-                                       {
-                                               dstream<<"WARNING: Not handling: different liquids"
-                                                               " collide"<<std::endl;
-                                               continue;
+                       Collect information about current node
+                */
+               s8 liquid_level = -1;
+               u8 liquid_kind = CONTENT_IGNORE;
+               LiquidType liquid_type = content_features(n0.getContent()).liquid_type;
+               switch (liquid_type) {
+                       case LIQUID_SOURCE:
+                               liquid_level = 8;
+                               liquid_kind = content_features(n0.getContent()).liquid_alternative_flowing;
+                               break;
+                       case LIQUID_FLOWING:
+                               liquid_level = (n0.param2 & LIQUID_LEVEL_MASK);
+                               liquid_kind = n0.getContent();
+                               break;
+                       case LIQUID_NONE:
+                               // if this is an air node, it *could* be transformed into a liquid. otherwise,
+                               // continue with the next node.
+                               if (n0.getContent() != CONTENT_AIR)
+                                       continue;
+                               liquid_kind = CONTENT_AIR;
+                               break;
+               }
+               
+               /*
+                       Collect information about the environment
+                */
+               v3s16 dirs[6] = {
+                       v3s16( 0, 1, 0), // top
+                       v3s16( 0,-1, 0), // bottom
+                       v3s16( 1, 0, 0), // right
+                       v3s16(-1, 0, 0), // left
+                       v3s16( 0, 0, 1), // back
+                       v3s16( 0, 0,-1), // front
+               };
+               NodeNeighbor sources[6]; // surrounding sources
+               int num_sources = 0;
+               NodeNeighbor flows[6]; // surrounding flowing liquid nodes
+               int num_flows = 0;
+               NodeNeighbor airs[6]; // surrounding air
+               int num_airs = 0;
+               NodeNeighbor neutrals[6]; // nodes that are solid or another kind of liquid
+               int num_neutrals = 0;
+               bool flowing_down = false;
+               for (u16 i = 0; i < 6; i++) {
+                       NeighborType nt = NEIGHBOR_SAME_LEVEL;
+                       switch (i) {
+                               case 0:
+                                       nt = NEIGHBOR_UPPER;
+                                       break;
+                               case 1:
+                                       nt = NEIGHBOR_LOWER;
+                                       break;
+                       }
+                       v3s16 npos = p0 + dirs[i];
+                       NodeNeighbor nb = {getNodeNoEx(npos), nt, npos};
+                       switch (content_features(nb.n.getContent()).liquid_type) {
+                               case LIQUID_NONE:
+                                       if (nb.n.getContent() == CONTENT_AIR) {
+                                               airs[num_airs++] = nb;
+                                               // if the current node happens to be a flowing node, it will start to flow down here.
+                                               if (nb.t == NEIGHBOR_LOWER)
+                                                       flowing_down = true;
+                                       } else {
+                                               neutrals[num_neutrals++] = nb;
                                        }
-                                       bool n2_is_source = !content_flowing_liquid(n2.getContent());
-                                       s8 n2_liquid_level = 8;
-                                       if(n2_is_source == false)
-                                               n2_liquid_level = n2.param2 & 0x07;
-
-                                       s8 new_liquid_level = -1;
-                                       if(from_top)
-                                       {
-                                               //new_liquid_level = 7;
-                                               if(n2_liquid_level >= 7 - WATER_DROP_BOOST)
-                                                       new_liquid_level = 7;
-                                               else
-                                                       new_liquid_level = n2_liquid_level + WATER_DROP_BOOST;
+                                       break;
+                               case LIQUID_SOURCE:
+                                       // if this node is not (yet) of a liquid type, choose the first liquid type we encounter 
+                                       if (liquid_kind == CONTENT_AIR)
+                                               liquid_kind = content_features(nb.n.getContent()).liquid_alternative_flowing;
+                                       if (content_features(nb.n.getContent()).liquid_alternative_flowing !=liquid_kind) {
+                                               neutrals[num_neutrals++] = nb;
+                                       } else {
+                                               sources[num_sources++] = nb;
                                        }
-                                       else if(n2_liquid_level > 0)
-                                       {
-                                               new_liquid_level = n2_liquid_level - 1;
+                                       break;
+                               case LIQUID_FLOWING:
+                                       // if this node is not (yet) of a liquid type, choose the first liquid type we encounter
+                                       if (liquid_kind == CONTENT_AIR)
+                                               liquid_kind = content_features(nb.n.getContent()).liquid_alternative_flowing;
+                                       if (content_features(nb.n.getContent()).liquid_alternative_flowing != liquid_kind) {
+                                               neutrals[num_neutrals++] = nb;
+                                       } else {
+                                               flows[num_flows++] = nb;
+                                               if (nb.t == NEIGHBOR_LOWER)
+                                                       flowing_down = true;
                                        }
-
-                                       if(new_liquid_level > new_liquid_level_max)
-                                               new_liquid_level_max = new_liquid_level;
-                               }
-                       } //for
-
-                       /*
-                               If liquid level should be something else, update it and
-                               add all the neighboring water nodes to the transform queue.
-                       */
-                       if(new_liquid_level_max != liquid_level)
-                       {
-                               if(new_liquid_level_max == -1)
-                               {
-                                       // Remove water alltoghether
-                                       n0.setContent(CONTENT_AIR);
-                                       n0.param2 = 0;
-                                       setNode(p0, n0);
-                               }
-                               else
-                               {
-                                       n0.param2 = new_liquid_level_max;
-                                       setNode(p0, n0);
-                               }
-
-                               // Block has been modified
-                               {
-                                       v3s16 blockpos = getNodeBlockPos(p0);
-                                       MapBlock *block = getBlockNoCreateNoEx(blockpos);
-                                       if(block != NULL)
-                                               modified_blocks.insert(blockpos, block);
+                                       break;
+                       }
+               }
+               
+               /*
+                       decide on the type (and possibly level) of the current node
+                */
+               content_t new_node_content;
+               s8 new_node_level = -1;
+               if (num_sources >= 2 || liquid_type == LIQUID_SOURCE) {
+                       // liquid_kind will be set to either the flowing alternative of the node (if it's a liquid)
+                       // or the flowing alternative of the first of the surrounding sources (if it's air), so
+                       // it's perfectly safe to use liquid_kind here to determine the new node content.
+                       new_node_content = content_features(liquid_kind).liquid_alternative_source;
+               } else if (num_sources == 1 && sources[0].t != NEIGHBOR_LOWER) {
+                       // liquid_kind is set properly, see above
+                       new_node_content = liquid_kind;
+                       new_node_level = 7;
+               } else {
+                       // no surrounding sources, so get the maximum level that can flow into this node
+                       for (u16 i = 0; i < num_flows; i++) {
+                               u8 nb_liquid_level = (flows[i].n.param2 & LIQUID_LEVEL_MASK);
+                               switch (flows[i].t) {
+                                       case NEIGHBOR_UPPER:
+                                               if (nb_liquid_level + WATER_DROP_BOOST > new_node_level) {
+                                                       new_node_level = 7;
+                                                       if (nb_liquid_level + WATER_DROP_BOOST < 7)
+                                                               new_node_level = nb_liquid_level + WATER_DROP_BOOST;
+                                               }
+                                               break;
+                                       case NEIGHBOR_LOWER:
+                                               break;
+                                       case NEIGHBOR_SAME_LEVEL:
+                                               if ((flows[i].n.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK &&
+                                                       nb_liquid_level > 0 && nb_liquid_level - 1 > new_node_level) {
+                                                       new_node_level = nb_liquid_level - 1;
+                                               }
+                                               break;
                                }
-
-                               /*
-                                       Add neighboring non-source liquid nodes to transform queue.
-                               */
-                               v3s16 dirs[6] = {
-                                       v3s16(0,0,1), // back
-                                       v3s16(0,1,0), // top
-                                       v3s16(1,0,0), // right
-                                       v3s16(0,0,-1), // front
-                                       v3s16(0,-1,0), // bottom
-                                       v3s16(-1,0,0), // left
-                               };
-                               for(u16 i=0; i<6; i++)
-                               {
-                                       v3s16 p2 = p0 + dirs[i];
-
-                                       MapNode n2 = getNodeNoEx(p2);
-                                       if(content_flowing_liquid(n2.getContent()))
-                                       {
-                                               m_transforming_liquid.push_back(p2);
+                       }
+                       // don't flow as far in open terrain - if there isn't at least one adjacent solid block,
+                       // substract another unit from the resulting water level.
+                       if (!flowing_down && new_node_level >= 1) {
+                               bool at_wall = false;
+                               for (u16 i = 0; i < num_neutrals; i++) {
+                                       if (neutrals[i].t == NEIGHBOR_SAME_LEVEL) {
+                                               at_wall = true;
+                                               break;
                                        }
                                }
+                               if (!at_wall)
+                                       new_node_level -= 1;
                        }
+                       
+                       if (new_node_level >= 0)
+                               new_node_content = liquid_kind;
+                       else
+                               new_node_content = CONTENT_AIR;
                }
-
-               // Get a new one from queue if the node has turned into non-water
-               if(content_liquid(n0.getContent()) == false)
+               
+               /*
+                       check if anything has changed. if not, just continue with the next node.
+                */
+               if (new_node_content == n0.getContent() && (content_features(n0.getContent()).liquid_type != LIQUID_FLOWING ||
+                                                                                ((n0.param2 & LIQUID_LEVEL_MASK) == (u8)new_node_level &&
+                                                                                ((n0.param2 & LIQUID_FLOW_DOWN_MASK) == LIQUID_FLOW_DOWN_MASK)
+                                                                                == flowing_down)))
                        continue;
-
+               
+               
                /*
-                       Flow water from this node
-               */
-               v3s16 dirs_to[5] = {
-                       v3s16(0,-1,0), // bottom
-                       v3s16(0,0,1), // back
-                       v3s16(1,0,0), // right
-                       v3s16(0,0,-1), // front
-                       v3s16(-1,0,0), // left
-               };
-               for(u16 i=0; i<5; i++)
-               {
-                       bool to_bottom = (i == 0);
-
-                       // If liquid is at lowest possible height, it's not going
-                       // anywhere except down
-                       if(liquid_level == 0 && to_bottom == false)
-                               continue;
-
-                       u8 liquid_next_level = 0;
-                       // If going to bottom
-                       if(to_bottom)
-                       {
-                               //liquid_next_level = 7;
-                               if(liquid_level >= 7 - WATER_DROP_BOOST)
-                                       liquid_next_level = 7;
-                               else
-                                       liquid_next_level = liquid_level + WATER_DROP_BOOST;
-                       }
-                       else
-                               liquid_next_level = liquid_level - 1;
-
-                       bool n2_changed = false;
-                       bool flowed = false;
-
-                       v3s16 p2 = p0 + dirs_to[i];
-
-                       MapNode n2 = getNodeNoEx(p2);
-                       //dstream<<"[1] n2.param="<<(int)n2.param<<std::endl;
-
-                       if(content_liquid(n2.getContent()))
-                       {
-                               u8 n2_nonsource_c = make_liquid_flowing(n2.getContent());
-                               // Check that the liquids are the same type
-                               if(n2_nonsource_c != nonsource_c)
-                               {
-                                       dstream<<"WARNING: Not handling: different liquids"
-                                                       " collide"<<std::endl;
-                                       continue;
-                               }
-                               bool n2_is_source = !content_flowing_liquid(n2.getContent());
-                               u8 n2_liquid_level = 8;
-                               if(n2_is_source == false)
-                                       n2_liquid_level = n2.param2 & 0x07;
-
-                               if(to_bottom)
-                               {
-                                       flowed = true;
-                               }
-
-                               if(n2_is_source)
-                               {
-                                       // Just flow into the source, nothing changes.
-                                       // n2_changed is not set because destination didn't change
-                                       flowed = true;
+                       update the current node
+                */
+               bool flow_down_enabled = (flowing_down && ((n0.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK));
+               n0.setContent(new_node_content);
+               if (content_features(n0.getContent()).liquid_type == LIQUID_FLOWING) {
+                       // set level to last 3 bits, flowing down bit to 4th bit
+                       n0.param2 |= (flowing_down ? LIQUID_FLOW_DOWN_MASK : 0x00) | (new_node_level & LIQUID_LEVEL_MASK);
+               } else {
+                       // set the liquid level and flow bit to 0
+                       n0.param2 &= ~(LIQUID_LEVEL_MASK | LIQUID_FLOW_DOWN_MASK);
+               }
+               setNode(p0, n0);
+               v3s16 blockpos = getNodeBlockPos(p0);
+               MapBlock *block = getBlockNoCreateNoEx(blockpos);
+               if(block != NULL)
+                       modified_blocks.insert(blockpos, block);
+               
+               /*
+                       enqueue neighbors for update if neccessary
+                */
+               switch (content_features(n0.getContent()).liquid_type) {
+                       case LIQUID_SOURCE:
+                               // make sure source flows into all neighboring nodes
+                               for (u16 i = 0; i < num_flows; i++)
+                                       if (flows[i].t != NEIGHBOR_UPPER)
+                                               m_transforming_liquid.push_back(flows[i].p);
+                               for (u16 i = 0; i < num_airs; i++)
+                                       if (airs[i].t != NEIGHBOR_UPPER)
+                                               m_transforming_liquid.push_back(airs[i].p);
+                               break;
+                       case LIQUID_NONE:
+                               // this flow has turned to air; neighboring flows might need to do the same
+                               for (u16 i = 0; i < num_flows; i++)
+                                       m_transforming_liquid.push_back(flows[i].p);
+                               break;
+                       case LIQUID_FLOWING:
+                               for (u16 i = 0; i < num_flows; i++) {
+                                       u8 flow_level = (flows[i].n.param2 & LIQUID_LEVEL_MASK);
+                                       // liquid_level is still the ORIGINAL level of this node.
+                                       if (flows[i].t != NEIGHBOR_UPPER && ((flow_level < liquid_level || flow_level < new_node_level) ||
+                                               flow_down_enabled))
+                                               m_transforming_liquid.push_back(flows[i].p);
                                }
-                               else
-                               {
-                                       if(liquid_next_level > liquid_level)
-                                       {
-                                               n2.param2 = liquid_next_level;
-                                               setNode(p2, n2);
-
-                                               n2_changed = true;
-                                               flowed = true;
-                                       }
+                               for (u16 i = 0; i < num_airs; i++) {
+                                       if (airs[i].t != NEIGHBOR_UPPER && (airs[i].t == NEIGHBOR_LOWER || new_node_level > 0))
+                                               m_transforming_liquid.push_back(airs[i].p);
                                }
-                       }
-                       else if(n2.getContent() == CONTENT_AIR)
-                       {
-                               n2.setContent(nonsource_c);
-                               n2.param2 = liquid_next_level;
-                               setNode(p2, n2);
-
-                               n2_changed = true;
-                               flowed = true;
-                       }
-
-                       //dstream<<"[2] n2.param="<<(int)n2.param<<std::endl;
-
-                       if(n2_changed)
-                       {
-                               m_transforming_liquid.push_back(p2);
-
-                               v3s16 blockpos = getNodeBlockPos(p2);
-                               MapBlock *block = getBlockNoCreateNoEx(blockpos);
-                               if(block != NULL)
-                                       modified_blocks.insert(blockpos, block);
-                       }
-
-                       // If n2_changed to bottom, don't flow anywhere else
-                       if(to_bottom && flowed && !is_source)
                                break;
                }
-
+               
                loopcount++;
                //if(loopcount >= 100000)
-               if(loopcount >= initial_size * 1)
+               if(loopcount >= initial_size * 10) {
                        break;
+               }
        }
        //dstream<<"Map::transformLiquids(): loopcount="<<loopcount<<std::endl;
 }
index aeb72c97aca9d7b9ec498947793d6b57d45d9b10..389fa1c9c7f73da1587d2e6aa34709c9d4ace4af 100644 (file)
@@ -96,7 +96,7 @@ enum LiquidType
        LIQUID_SOURCE
 };
 
-class MapNode;
+struct MapNode;
 class NodeMetadata;
 
 struct ContentFeatures
@@ -128,6 +128,8 @@ struct ContentFeatures
        bool pointable;
        // Player can dig these
        bool diggable;
+        // Player can climb these
+        bool climbable;
        // Player can build on these
        bool buildable_to;
        // Whether the node has no liquid, source liquid or flowing liquid
@@ -171,6 +173,7 @@ struct ContentFeatures
                walkable = true;
                pointable = true;
                diggable = true;
+               climbable = false;
                buildable_to = false;
                liquid_type = LIQUID_NONE;
                wall_mounted = false;
@@ -403,10 +406,17 @@ enum LightBank
        LIGHTBANK_NIGHT
 };
 
+/*
+       Masks for MapNode.param2 of flowing liquids
+ */
+#define LIQUID_LEVEL_MASK 0x07
+#define LIQUID_FLOW_DOWN_MASK 0x08
+
 /*
        This is the stuff what the whole world consists of.
 */
 
+
 struct MapNode
 {
        /*
index c43276ef132db71f8dbc1766953ef674ea8cd585..be478e8693efce74dfe42d21cb2a5bb1403e71db 100644 (file)
@@ -375,6 +375,21 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
                in_water_stable = false;
        }
 
+       /*
+               Check if player is climbing
+       */
+
+       try {
+               v3s16 pp = floatToInt(position + v3f(0,0.5*BS,0), BS);
+               v3s16 pp2 = floatToInt(position + v3f(0,-0.2*BS,0), BS);
+               is_climbing = ((content_features(map.getNode(pp).getContent()).climbable ||
+                               content_features(map.getNode(pp2).getContent()).climbable) && !free_move);
+       }
+       catch(InvalidPositionException &e)
+       {
+               is_climbing = false;
+       }
+
        /*
                Collision uncertainty radius
                Make it a bit larger than the maximum distance of movement
@@ -461,7 +476,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
                Player is allowed to jump when this is true.
        */
        touching_ground = false;
-       
+
        /*std::cout<<"Checking collisions for ("
                        <<oldpos_i.X<<","<<oldpos_i.Y<<","<<oldpos_i.Z
                        <<") -> ("
@@ -723,7 +738,7 @@ void LocalPlayer::applyControl(float dtime)
        bool fast_move = g_settings.getBool("fast_move");
        bool continuous_forward = g_settings.getBool("continuous_forward");
 
-       if(free_move)
+       if(free_move || is_climbing)
        {
                v3f speed = getSpeed();
                speed.Y = 0;
@@ -750,6 +765,12 @@ void LocalPlayer::applyControl(float dtime)
                                speed.Y = -walkspeed_max;
                        setSpeed(speed);
                }
+               else if(is_climbing)
+               {
+                       v3f speed = getSpeed();
+                       speed.Y = -3*BS;
+                       setSpeed(speed);
+               }
                else
                {
                        // If not free movement but fast is allowed, aux1 is
@@ -812,6 +833,12 @@ void LocalPlayer::applyControl(float dtime)
                        setSpeed(speed);
                        swimming_up = true;
                }
+               else if(is_climbing)
+               {
+                       v3f speed = getSpeed();
+                       speed.Y = 3*BS;
+                       setSpeed(speed);
+               }
        }
 
        // The speed of the player (Y is ignored)
index 29460e1e1e7323ad7a554371b8774af97515df46..78ca149488370fe0424c3f0e237acad9367792a0 100644 (file)
@@ -118,6 +118,7 @@ class Player
        bool in_water;
        // This is more stable and defines the maximum speed of the player
        bool in_water_stable;
+       bool is_climbing;
        bool swimming_up;
        
        Inventory inventory;
index 91fd1d3a50f35e681c3b2e8b98f16f1387805212..dc41720fb2ed44bdebbb796ed98a22af5f0fbd11 100644 (file)
@@ -162,7 +162,7 @@ int main(int argc, char *argv[])
        BEGIN_DEBUG_EXCEPTION_HANDLER
 
        // Print startup message
-       dstream<<DTIME<<"minetest-c55"
+       dstream<<DTIME<<PROJECT_NAME <<
                        " with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
                        <<", "<<BUILD_INFO
                        <<std::endl;
index c16fd3e238f7b18b46517ff67a391fc75ea95c46..2dceb913442be3b1bbb54d71465f6b4b72c18a85 100644 (file)
@@ -1,21 +1,26 @@
-0 128 128 128\r
-1 107 134 51\r
-2 39 66 106\r
-3 255 255 0\r
-4 86 58 31\r
-5 48 95 8\r
-6 102 129 38\r
-7 178 178 0\r
-8 101 84 36\r
-9 39 66 106\r
-12 104 78 42\r
-13 210 194 156\r
-14 117 86 41\r
-15 128 79 0\r
-16 118 118 118\r
-18 123 123 123\r
-19 199 199 199\r
-20 183 183 222\r
-21 103 78 42\r
-22 108 138 108\r
-23 90 90 90\r
+0 128 128 128   # CONTENT_STONE\r
+800 107 134 51  # CONTENT_GRASS\r
+2 39 66 106     # CONTENT_WATER\r
+3 255 255 0     # CONTENT_TORCH\r
+801 86 58 31    # CONTENT_TREE\r
+802 48 95 8     # CONTENT_LEAVES\r
+803 102 129 38  # CONTENT_GRASS_FOOTSTEPS\r
+804 178 178 0   # CONTENT_MESE\r
+805 101 84 36   # CONTENT_MUD\r
+9 39 66 106     # CONTENT_WATERSOURCE\r
+808 104 78 42   # CONTENT_WOOD\r
+809 210 194 156 # CONTENT_SAND\r
+e 117 86 41     # CONTENT_SIGN_WALL\r
+f 128 79 0      # CONTENT_CHEST\r
+10 118 118 118  # CONTENT_FURNACE\r
+80a 123 123 123 # CONTENT_COBBLE\r
+80b 199 199 199 # CONTENT_STEEL\r
+80c 183 183 222 # CONENT_GLASS\r
+15 103 78 42    # CONTENT_FENCE\r
+80d 219 202 178 # CONTENT_MOSSYCOBBLE\r
+80e 78 154 6    # CONTENT_GRAVEL\r
+80f 204 0 0     # CONTENT_SANDSTONE\r
+810 211 215 207 # CONTENT_CACTUS\r
+811 170 50 25   # CONTENT_BRICK\r
+812 104 78 42   # CONTENT_CLAY\r
+813 58 105 18   # CONTENT_PAPYRUS\r
index 162ceb204476f1b6247a70fbc05e3bdd70489498..e13a1bdc34be194e51f138f60b6dab1e0ac90453 100755 (executable)
@@ -1,5 +1,5 @@
-#!/usr/bin/python2
-# -*- coding: windows-1252 -*-
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 # This program is free software. It comes without any warranty, to
 # the extent permitted by applicable law. You can redistribute it
 
 # Made by Jogge, modified by celeron55
 # 2011-05-29: j0gge: initial release
-# 2011-05-30: celeron55: simultaneous support for sectors/sectors2, removed 
+# 2011-05-30: celeron55: simultaneous support for sectors/sectors2, removed
 # 2011-06-02: j0gge: command line parameters, coordinates, players, ...
 # 2011-06-04: celeron55: added #!/usr/bin/python2 and converted \r\n to \n
 #                        to make it easily executable on Linux
+# 2011-07-30: WF: Support for content types extension, refactoring
+# 2011-07-30: erlehmann: PEP 8 compliance.
 
 # Requires Python Imaging Library: http://www.pythonware.com/products/pil/
 
 # Some speed-up: ...lol, actually it slows it down.
-#import psyco ; psyco.full() 
+#import psyco ; psyco.full()
 #from psyco.classes import *
 
 import zlib
-import Image, ImageDraw, ImageFont, ImageColor
 import os
 import string
 import time
 import getopt
 import sys
+import array
+from PIL import Image, ImageDraw, ImageFont, ImageColor
+
+CONTENT_WATER = [2, 9]
+
+TRANSLATION_TABLE = {
+    1: 0x800,  # CONTENT_GRASS
+    4: 0x801,  # CONTENT_TREE
+    5: 0x802,  # CONTENT_LEAVES
+    6: 0x803,  # CONTENT_GRASS_FOOTSTEPS
+    7: 0x804,  # CONTENT_MESE
+    8: 0x805,  # CONTENT_MUD
+    10: 0x806,  # CONTENT_CLOUD
+    11: 0x807,  # CONTENT_COALSTONE
+    12: 0x808,  # CONTENT_WOOD
+    13: 0x809,  # CONTENT_SAND
+    18: 0x80a,  # CONTENT_COBBLE
+    19: 0x80b,  # CONTENT_STEEL
+    20: 0x80c,  # CONTENT_GLASS
+    22: 0x80d,  # CONTENT_MOSSYCOBBLE
+    23: 0x80e,  # CONTENT_GRAVEL
+    24: 0x80f,  # CONTENT_SANDSTONE
+    25: 0x810,  # CONTENT_CACTUS
+    26: 0x811,  # CONTENT_BRICK
+    27: 0x812,  # CONTENT_CLAY
+    28: 0x813,  # CONTENT_PAPYRUS
+    29: 0x814}  # CONTENT_BOOKSHELF
+
 
 def hex_to_int(h):
-       i = int(h, 16)
-       if(i > 2047):
-               i -= 4096
-       return i
+    i = int(h, 16)
+    if(i > 2047):
+        i -= 4096
+    return i
+
 
 def hex4_to_int(h):
-       i = int(h, 16)
-       if(i > 32767):
-               i -= 65536
-       return i
+    i = int(h, 16)
+    if(i > 32767):
+        i -= 65536
+    return i
+
 
 def int_to_hex3(i):
-       if(i < 0):
-               return "%03X" % (i + 4096)
-       else:
-               return "%03X" % i
+    if(i < 0):
+        return "%03X" % (i + 4096)
+    else:
+        return "%03X" % i
+
 
 def int_to_hex4(i):
-       if(i < 0):
-               return "%04X" % (i + 65536)
-       else:
-               return "%04X" % i
+    if(i < 0):
+        return "%04X" % (i + 65536)
+    else:
+        return "%04X" % i
+
 
 def limit(i, l, h):
-       if(i > h):
-               i = h
-       if(i < l):
-               i = l
-       return i
+    if(i > h):
+        i = h
+    if(i < l):
+        i = l
+    return i
+
 
 def usage():
-       print "TODO: Help"
+    print "TODO: Help"
 try:
-       opts, args = getopt.getopt(sys.argv[1:], "hi:o:", ["help", "input=", "output=", "bgcolor=", "scalecolor=", "origincolor=", "playercolor=", "draworigin", "drawplayers", "drawscale"])
+    opts, args = getopt.getopt(sys.argv[1:], "hi:o:", ["help", "input=",
+        "output=", "bgcolor=", "scalecolor=", "origincolor=",
+        "playercolor=", "draworigin", "drawplayers", "drawscale"])
 except getopt.GetoptError, err:
-       # print help information and exit:
-       print str(err) # will print something like "option -a not recognized"
-       usage()
-       sys.exit(2)
+    # print help information and exit:
+    print str(err)  # will print something like "option -a not recognized"
+    usage()
+    sys.exit(2)
 
 path = "../world/"
-output = "uloste.png"
+output = "map.png"
 border = 0
 scalecolor = "black"
 bgcolor = "white"
@@ -86,71 +122,75 @@ sector_zmin = -1500 / 16
 sector_zmax = 1500 / 16
 
 for o, a in opts:
-       if o in ("-h", "--help"):
-               usage()
-               sys.exit()
-       elif o in ("-i", "--input"):
-               path = a
-       elif o in ("-o", "--output"):
-               output = a
-       elif o == "--bgcolor":
-               bgcolor = ImageColor.getrgb(a)
-       elif o == "--scalecolor":
-               scalecolor = ImageColor.getrgb(a)
-       elif o == "--playercolor":
-               playercolor = ImageColor.getrgb(a)
-       elif o == "--origincolor":
-               origincolor = ImageColor.getrgb(a)
-       elif o == "--drawscale":
-               drawscale = True
-               border = 40
-       elif o == "--drawplayers":
-               drawplayers = True
-       elif o == "--draworigin":
-               draworigin = True
-       else:
-               assert False, "unhandled option"
-       
-if path[-1:]!="/" and path[-1:]!="\\":
-       path = path + "/"
+    if o in ("-h", "--help"):
+        usage()
+        sys.exit()
+    elif o in ("-i", "--input"):
+        path = a
+    elif o in ("-o", "--output"):
+        output = a
+    elif o == "--bgcolor":
+        bgcolor = ImageColor.getrgb(a)
+    elif o == "--scalecolor":
+        scalecolor = ImageColor.getrgb(a)
+    elif o == "--playercolor":
+        playercolor = ImageColor.getrgb(a)
+    elif o == "--origincolor":
+        origincolor = ImageColor.getrgb(a)
+    elif o == "--drawscale":
+        drawscale = True
+        border = 40
+    elif o == "--drawplayers":
+        drawplayers = True
+    elif o == "--draworigin":
+        draworigin = True
+    else:
+        assert False, "unhandled option"
+
+if path[-1:] != "/" and path[-1:] != "\\":
+    path = path + "/"
 
 # Load color information for the blocks.
 colors = {}
-f = file("colors.txt")
+try:
+       f = file("colors.txt")
+except IOError:
+       f = file(os.path.join(os.path.dirname(__file__), "colors.txt"))
 for line in f:
-       values = string.split(line)
-       colors[int(values[0])] = (int(values[1]), int(values[2]), int(values[3]))
+    values = string.split(line)
+    colors[int(values[0], 16)] = (
+        int(values[1]),
+        int(values[2]),
+        int(values[3]))
 f.close()
 
 xlist = []
 zlist = []
 
-# List all sectors to memory and calculate the width and heigth of the resulting picture.
-try:
-       for filename in os.listdir(path + "sectors2"):
-               for filename2 in os.listdir(path + "sectors2/" + filename):
-                       x = hex_to_int(filename)
-                       z = hex_to_int(filename2)
-                       if x < sector_xmin or x > sector_xmax:
-                               continue
-                       if z < sector_zmin or z > sector_zmax:
-                               continue
-                       xlist.append(x)
-                       zlist.append(z)
-except OSError:
-       pass
-try:
-       for filename in os.listdir(path + "sectors"):
-               x = hex4_to_int(filename[:4])
-               z = hex4_to_int(filename[-4:])
-               if x < sector_xmin or x > sector_xmax:
-                       continue
-               if z < sector_zmin or z > sector_zmax:
-                       continue
-               xlist.append(x)
-               zlist.append(z)
-except OSError:
-       pass
+# List all sectors to memory and calculate the width and heigth of the
+# resulting picture.
+if os.path.exists(path + "sectors2"):
+    for filename in os.listdir(path + "sectors2"):
+        for filename2 in os.listdir(path + "sectors2/" + filename):
+            x = hex_to_int(filename)
+            z = hex_to_int(filename2)
+            if x < sector_xmin or x > sector_xmax:
+                continue
+            if z < sector_zmin or z > sector_zmax:
+                continue
+            xlist.append(x)
+            zlist.append(z)
+
+if os.path.exists(path + "sectors"):
+    for filename in os.listdir(path + "sectors"):
+        x = hex4_to_int(filename[:4])
+        z = hex4_to_int(filename[-4:])
+        if x < sector_xmin or x > sector_xmax:
+            continue
+        if z < sector_zmin or z > sector_zmax:
+            continue
+        xlist.append(x)
+        zlist.append(z)
 
 minx = min(xlist)
 minz = min(zlist)
@@ -160,7 +200,7 @@ maxz = max(zlist)
 w = (maxx - minx) * 16 + 16
 h = (maxz - minz) * 16 + 16
 
-print "w="+str(w)+" h="+str(h)
+print "w=" + str(w) + " h=" + str(h)
 
 im = Image.new("RGB", (w + border, h + border), bgcolor)
 draw = ImageDraw.Draw(im)
@@ -170,278 +210,290 @@ stuff = {}
 
 starttime = time.time()
 
+
 def data_is_air(d):
-       return (d == 254 or d == 126)
+    return d in [126, 127, 254]
+
+
+def read_blocknum(mapdata, version, datapos):
+    if version == 20:
+        if mapdata[datapos] < 0x80:
+            return mapdata[datapos]
+        else:
+            return (mapdata[datapos] << 4) | (mapdata[datapos + 0x2000] >> 4)
+    elif 16 <= version < 20:
+        return TRANSLATION_TABLE.get(mapdata[datapos], mapdata[datapos])
+    else:
+        raise Exception("Unsupported map format: " + str(version))
+
+
+def read_mapdata(f, version, pixellist, water):
+    global stuff  # oh my :-)
+
+    dec_o = zlib.decompressobj()
+    try:
+        mapdata = array.array("B", dec_o.decompress(f.read()))
+    except:
+        mapdata = []
+
+    f.close()
+
+    if(len(mapdata) < 4096):
+        print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + \
+            str(len(mapdata))
+    else:
+        chunkxpos = xpos * 16
+        chunkypos = ypos * 16
+        chunkzpos = zpos * 16
+        blocknum = 0
+        datapos = 0
+        for (x, z) in reversed(pixellist):
+            for y in reversed(range(16)):
+                datapos = x + y * 16 + z * 256
+                blocknum = read_blocknum(mapdata, version, datapos)
+                if not data_is_air(blocknum) and blocknum in colors:
+                    if blocknum in CONTENT_WATER:
+                        water[(x, z)] += 1
+                        # Add dummy stuff for drawing sea without seabed
+                        stuff[(chunkxpos + x, chunkzpos + z)] = (
+                            chunkypos + y, blocknum, water[(x, z)])
+                    else:
+                        pixellist.remove((x, z))
+                        # Memorize information on the type and height of
+                        # the block and for drawing the picture.
+                        stuff[(chunkxpos + x, chunkzpos + z)] = (
+                            chunkypos + y, blocknum, water[(x, z)])
+                        break
+                elif not data_is_air(blocknum) and blocknum not in colors:
+                    print "strange block: %s/%s/%s x: %d y: %d z: %d \
+block id: %x" % (xhex, zhex, yhex, x, y, z, blocknum)
 
 # Go through all sectors.
 for n in range(len(xlist)):
-       #if n > 500:
-       #       break
-       if n % 200 == 0:
-               nowtime = time.time()
-               dtime = nowtime - starttime
-               try:
-                       n_per_second = 1.0 * n / dtime
-               except ZeroDivisionError:
-                       n_per_second = 0
-               if n_per_second != 0:
-                       seconds_per_n = 1.0 / n_per_second
-                       time_guess = seconds_per_n * len(xlist)
-                       remaining_s = time_guess - dtime
-                       remaining_minutes = int(remaining_s / 60)
-                       remaining_s -= remaining_minutes * 60;
-                       print("Processing sector "+str(n)+" of "+str(len(xlist))
-                                       +" ("+str(round(100.0*n/len(xlist), 1))+"%)"
-                                       +" (ETA: "+str(remaining_minutes)+"m "
-                                       +str(int(remaining_s))+"s)")
-
-       xpos = xlist[n]
-       zpos = zlist[n]
-       
-       xhex = int_to_hex3(xpos)
-       zhex = int_to_hex3(zpos)
-       xhex4 = int_to_hex4(xpos)
-       zhex4 = int_to_hex4(zpos)
-       
-       sector1 = xhex4.lower() + zhex4.lower()
-       sector2 = xhex.lower() + "/" + zhex.lower()
-       
-       ylist = []
-       
-       sectortype = ""
-       
-       try:
-               for filename in os.listdir(path + "sectors/" + sector1):
-                       if(filename != "meta"):
-                               pos = int(filename, 16)
-                               if(pos > 32767):
-                                       pos -= 65536
-                               ylist.append(pos)
-                               sectortype = "old"
-       except OSError:
-               pass
-       
-       if sectortype != "old":
-               try:
-                       for filename in os.listdir(path + "sectors2/" + sector2):
-                               if(filename != "meta"):
-                                       pos = int(filename, 16)
-                                       if(pos > 32767):
-                                               pos -= 65536
-                                       ylist.append(pos)
-                                       sectortype = "new"
-               except OSError:
-                       pass
-       
-       if sectortype == "":
-               continue
-
-       ylist.sort()
-       
-       # Make a list of pixels of the sector that are to be looked for.
-       pixellist = []
-       water = {}
-       for x in range(16):
-               for z in range(16):
-                       pixellist.append((x, z))
-                       water[(x, z)] = 0
-       
-       # Go through the Y axis from top to bottom.
-       ylist2=[]
-       for ypos in reversed(ylist):
-               
-               yhex = int_to_hex4(ypos)
-
-               filename = ""
-               if sectortype == "old":
-                       filename = path + "sectors/" + sector1 + "/" + yhex.lower()
-               else:
-                       filename = path + "sectors2/" + sector2 + "/" + yhex.lower()
-
-               f = file(filename, "rb")
-
-               version = f.read(1)
-               flags = f.read(1)
-               
-               # Checking day and night differs -flag
-               if not ord(flags) & 2:
-                       ylist2.append((ypos,filename))
-                       f.close()
-                       continue
-
-               dec_o = zlib.decompressobj()
-               try:
-                       mapdata = dec_o.decompress(f.read())
-               except:
-                       mapdata = []
-                       
-               f.close()
-               
-               if(len(mapdata) < 4096):
-                       print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + str(len(mapdata))
-               else:
-                       chunkxpos = xpos * 16
-                       chunkypos = ypos * 16
-                       chunkzpos = zpos * 16
-                       for (x, z) in reversed(pixellist):
-                               for y in reversed(range(16)):
-                                       datapos = x + y * 16 + z * 256
-                                       if(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) in colors):
-                                               if(ord(mapdata[datapos]) == 2 or ord(mapdata[datapos]) == 9):
-                                                       water[(x, z)] += 1
-                                                       # Add dummy stuff for drawing sea without seabed
-                                                       stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
-                                               else:
-                                                       pixellist.remove((x, z))
-                                                       # Memorize information on the type and height of the block and for drawing the picture.
-                                                       stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
-                                                       break
-                                       elif(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) not in colors):
-                                               print "strange block: " + xhex + "/" + zhex + "/" + yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " palikka: " + str(ord(mapdata[datapos]))
-               
-               # After finding all the pixels in the sector, we can move on to the next sector without having to continue the Y axis.
-               if(len(pixellist) == 0):
-                       break
-       
-       if len(pixellist) > 0:
-               for (ypos, filename) in ylist2:
-                       f = file(filename, "rb")
-
-                       version = f.read(1)
-                       flags = f.read(1)
-
-                       dec_o = zlib.decompressobj()
-                       try:
-                               mapdata = dec_o.decompress(f.read())
-                       except:
-                               mapdata = []
-                               
-                       f.close()
-                       
-                       if(len(mapdata) < 4096):
-                               print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + str(len(mapdata))
-                       else:
-                               chunkxpos = xpos * 16
-                               chunkypos = ypos * 16
-                               chunkzpos = zpos * 16
-                               for (x, z) in reversed(pixellist):
-                                       for y in reversed(range(16)):
-                                               datapos = x + y * 16 + z * 256
-                                               if(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) in colors):
-                                                       if(ord(mapdata[datapos]) == 2 or ord(mapdata[datapos]) == 9):
-                                                               water[(x, z)] += 1
-                                                               # Add dummy stuff for drawing sea without seabed
-                                                               stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
-                                                       else:
-                                                               pixellist.remove((x, z))
-                                                               # Memorize information on the type and height of the block and for drawing the picture.
-                                                               stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
-                                                               break
-                                               elif(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) not in colors):
-                                                       print "outo palikka: " + xhex + "/" + zhex + "/" + yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " palikka: " + str(ord(mapdata[datapos]))
-                       
-                       # After finding all the pixels in the sector, we can move on to the next sector without having to continue the Y axis.
-                       if(len(pixellist) == 0):
-                               break
+    #if n > 500:
+    #   break
+    if n % 200 == 0:
+        nowtime = time.time()
+        dtime = nowtime - starttime
+        try:
+            n_per_second = 1.0 * n / dtime
+        except ZeroDivisionError:
+            n_per_second = 0
+        if n_per_second != 0:
+            seconds_per_n = 1.0 / n_per_second
+            time_guess = seconds_per_n * len(xlist)
+            remaining_s = time_guess - dtime
+            remaining_minutes = int(remaining_s / 60)
+            remaining_s -= remaining_minutes * 60
+            print("Processing sector " + str(n) + " of " + str(len(xlist))
+                    + " (" + str(round(100.0 * n / len(xlist), 1)) + "%)"
+                    + " (ETA: " + str(remaining_minutes) + "m "
+                    + str(int(remaining_s)) + "s)")
+
+    xpos = xlist[n]
+    zpos = zlist[n]
+
+    xhex = int_to_hex3(xpos)
+    zhex = int_to_hex3(zpos)
+    xhex4 = int_to_hex4(xpos)
+    zhex4 = int_to_hex4(zpos)
+
+    sector1 = xhex4.lower() + zhex4.lower()
+    sector2 = xhex.lower() + "/" + zhex.lower()
+
+    ylist = []
+
+    sectortype = ""
+
+    try:
+        for filename in os.listdir(path + "sectors/" + sector1):
+            if(filename != "meta"):
+                pos = int(filename, 16)
+                if(pos > 32767):
+                    pos -= 65536
+                ylist.append(pos)
+                sectortype = "old"
+    except OSError:
+        pass
+
+    if sectortype != "old":
+        try:
+            for filename in os.listdir(path + "sectors2/" + sector2):
+                if(filename != "meta"):
+                    pos = int(filename, 16)
+                    if(pos > 32767):
+                        pos -= 65536
+                    ylist.append(pos)
+                    sectortype = "new"
+        except OSError:
+            pass
+
+    if sectortype == "":
+        continue
+
+    ylist.sort()
+
+    # Make a list of pixels of the sector that are to be looked for.
+    pixellist = []
+    water = {}
+    for x in range(16):
+        for z in range(16):
+            pixellist.append((x, z))
+            water[(x, z)] = 0
+
+    # Go through the Y axis from top to bottom.
+    ylist2 = []
+    for ypos in reversed(ylist):
+
+        yhex = int_to_hex4(ypos)
+
+        filename = ""
+        if sectortype == "old":
+            filename = path + "sectors/" + sector1 + "/" + yhex.lower()
+        else:
+            filename = path + "sectors2/" + sector2 + "/" + yhex.lower()
+
+        f = file(filename, "rb")
+
+        # Let's just memorize these even though it's not really necessary.
+        version = ord(f.read(1))
+        flags = f.read(1)
+
+        # Checking day and night differs -flag
+        if not ord(flags) & 2:
+            ylist2.append((ypos, filename))
+            f.close()
+            continue
+
+        read_mapdata(f, version, pixellist, water)
+
+        # After finding all the pixels in the sector, we can move on to
+        # the next sector without having to continue the Y axis.
+        if(len(pixellist) == 0):
+            break
+
+    if len(pixellist) > 0:
+        for (ypos, filename) in ylist2:
+            f = file(filename, "rb")
+
+            version = ord(f.read(1))
+            flags = f.read(1)
+
+            read_mapdata(f, version, pixellist, water)
+
+            # After finding all the pixels in the sector, we can move on
+            # to the next sector without having to continue the Y axis.
+            if(len(pixellist) == 0):
+                break
 
 print "Drawing image"
 # Drawing the picture
 starttime = time.time()
 n = 0
 for (x, z) in stuff.iterkeys():
-       if n % 500000 == 0:
-               nowtime = time.time()
-               dtime = nowtime - starttime
-               try:
-                       n_per_second = 1.0 * n / dtime
-               except ZeroDivisionError:
-                       n_per_second = 0
-               if n_per_second != 0:
-                       listlen = len(stuff)
-                       seconds_per_n = 1.0 / n_per_second
-                       time_guess = seconds_per_n * listlen
-                       remaining_s = time_guess - dtime
-                       remaining_minutes = int(remaining_s / 60)
-                       remaining_s -= remaining_minutes * 60;
-                       print("Drawing pixel "+str(n)+" of "+str(listlen)
-                                       +" ("+str(round(100.0*n/listlen, 1))+"%)"
-                                       +" (ETA: "+str(remaining_minutes)+"m "
-                                       +str(int(remaining_s))+"s)")
-       n += 1
-
-       (r, g, b) = colors[stuff[(x,z)][1]]
-       # Comparing heights of a couple of adjacent blocks and changing brightness accordingly.
-       try:
-               c1 = stuff[(x - 1, z)][1]
-               c2 = stuff[(x, z + 1)][1]
-               c = stuff[(x, z)][1]
-               if c1 != 2 and c1 != 9 and c2 != 2 and c2 != 9 and c != 2 and c != 9:
-                       y1 = stuff[(x - 1, z)][0]
-                       y2 = stuff[(x, z + 1)][0]
-                       y = stuff[(x, z)][0]
-                       
-                       d = ((y - y1) + (y - y2)) * 12
-               else:
-                       d = 0
-               
-               if(d > 36):
-                       d = 36
-                       
-               r = limit(r + d, 0, 255)
-               g = limit(g + d, 0, 255)
-               b = limit(b + d, 0, 255)
-       except:
-               pass
-       
-       # Water
-       if(stuff[(x,z)][2] > 0):
-               r=int(r * .15 + colors[2][0] * .85)
-               g=int(g * .15 + colors[2][1] * .85)
-               b=int(b * .15 + colors[2][2] * .85)
-               
-       impix[x - minx * 16 + border, h - 1 - (z - minz * 16) + border] = (r, g, b)
+    if n % 500000 == 0:
+        nowtime = time.time()
+        dtime = nowtime - starttime
+        try:
+            n_per_second = 1.0 * n / dtime
+        except ZeroDivisionError:
+            n_per_second = 0
+        if n_per_second != 0:
+            listlen = len(stuff)
+            seconds_per_n = 1.0 / n_per_second
+            time_guess = seconds_per_n * listlen
+            remaining_s = time_guess - dtime
+            remaining_minutes = int(remaining_s / 60)
+            remaining_s -= remaining_minutes * 60
+            print("Drawing pixel " + str(n) + " of " + str(listlen)
+                    + " (" + str(round(100.0 * n / listlen, 1)) + "%)"
+                    + " (ETA: " + str(remaining_minutes) + "m "
+                    + str(int(remaining_s)) + "s)")
+    n += 1
+
+    (r, g, b) = colors[stuff[(x, z)][1]]
+    # Comparing heights of a couple of adjacent blocks and changing
+    # brightness accordingly.
+    try:
+        c1 = stuff[(x - 1, z)][1]
+        c2 = stuff[(x, z + 1)][1]
+        c = stuff[(x, z)][1]
+        if c1 not in CONTENT_WATER and c2 not in CONTENT_WATER and \
+            c not in CONTENT_WATER:
+            y1 = stuff[(x - 1, z)][0]
+            y2 = stuff[(x, z + 1)][0]
+            y = stuff[(x, z)][0]
+
+            d = ((y - y1) + (y - y2)) * 12
+        else:
+            d = 0
+
+        if(d > 36):
+            d = 36
+
+        r = limit(r + d, 0, 255)
+        g = limit(g + d, 0, 255)
+        b = limit(b + d, 0, 255)
+    except:
+        pass
+
+    # Water
+    if(stuff[(x, z)][2] > 0):
+        r = int(r * .15 + colors[2][0] * .85)
+        g = int(g * .15 + colors[2][1] * .85)
+        b = int(b * .15 + colors[2][2] * .85)
+
+    impix[x - minx * 16 + border, h - 1 - (z - minz * 16) + border] = (r, g, b)
 
 
 if draworigin:
-       draw.ellipse((minx * -16 - 5 + border, h - minz * -16 - 6 + border, minx * -16 + 5 + border, h - minz * -16 + 4 + border), outline = origincolor)
+    draw.ellipse((minx * -16 - 5 + border, h - minz * -16 - 6 + border,
+        minx * -16 + 5 + border, h - minz * -16 + 4 + border),
+        outline=origincolor)
 
 font = ImageFont.load_default()
 
 if drawscale:
-       draw.text((24, 0), "X", font = font, fill = scalecolor)
-       draw.text((2, 24), "Z", font = font, fill = scalecolor)
+    draw.text((24, 0), "X", font=font, fill=scalecolor)
+    draw.text((2, 24), "Z", font=font, fill=scalecolor)
 
-       for n in range(int(minx / -4) * -4, maxx, 4):
-               draw.text((minx * -16 + n * 16 + 2 + border, 0), str(n * 16), font = font, fill = scalecolor)
-               draw.line((minx * -16 + n * 16 + border, 0, minx * -16 + n * 16 + border, border - 1), fill = scalecolor)
+    for n in range(int(minx / -4) * -4, maxx, 4):
+        draw.text((minx * -16 + n * 16 + 2 + border, 0), str(n * 16),
+            font=font, fill=scalecolor)
+        draw.line((minx * -16 + n * 16 + border, 0,
+            minx * -16 + n * 16 + border, border - 1), fill=scalecolor)
 
-       for n in range(int(maxz / 4) * 4, minz, -4):
-               draw.text((2, h - 1 - (n * 16 - minz * 16) + border), str(n * 16), font = font, fill = scalecolor)
-               draw.line((0, h - 1 - (n * 16 - minz * 16) + border, border - 1, h - 1 - (n * 16 - minz * 16) + border), fill = scalecolor)
+    for n in range(int(maxz / 4) * 4, minz, -4):
+        draw.text((2, h - 1 - (n * 16 - minz * 16) + border), str(n * 16),
+            font=font, fill=scalecolor)
+        draw.line((0, h - 1 - (n * 16 - minz * 16) + border, border - 1,
+            h - 1 - (n * 16 - minz * 16) + border), fill=scalecolor)
 
 if drawplayers:
-       try:
-               for filename in os.listdir(path + "players"):
-                       f = file(path + "players/" + filename)
-                       lines = f.readlines()
-                       name=""
-                       position=[]
-                       for line in lines:
-                               p = string.split(line)
-                               if p[0] == "name":
-                                       name = p[2]
-                                       print filename + ": name = " + name
-                               if p[0] == "position":
-                                       position = string.split(p[2][1:-1], ",")
-                                       print filename + ": position = " + p[2]
-                       if len(name) > 0 and len(position) == 3:
-                               x=(int(float(position[0]) / 10 - minx * 16))
-                               z=int(h - (float(position[2]) / 10 - minz * 16))
-                               draw.ellipse((x - 2 + border, z - 2 + border, x + 2 + border, z + 2 + border), outline = playercolor)
-                               draw.text((x + 2 + border, z + 2 + border), name, font = font, fill = playercolor)
-                       f.close()
-       except OSError:
-               pass
+    try:
+        for filename in os.listdir(path + "players"):
+            f = file(path + "players/" + filename)
+            lines = f.readlines()
+            name = ""
+            position = []
+            for line in lines:
+                p = string.split(line)
+                if p[0] == "name":
+                    name = p[2]
+                    print filename + ": name = " + name
+                if p[0] == "position":
+                    position = string.split(p[2][1:-1], ",")
+                    print filename + ": position = " + p[2]
+            if len(name) > 0 and len(position) == 3:
+                x = (int(float(position[0]) / 10 - minx * 16))
+                z = int(h - (float(position[2]) / 10 - minz * 16))
+                draw.ellipse((x - 2 + border, z - 2 + border,
+                    x + 2 + border, z + 2 + border), outline=playercolor)
+                draw.text((x + 2 + border, z + 2 + border), name,
+                    font=font, fill=playercolor)
+            f.close()
+    except OSError:
+        pass
 
 print "Saving"
 im.save(output)
diff --git a/util/updatepo.sh b/util/updatepo.sh
new file mode 100755 (executable)
index 0000000..fbf1aad
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Update/create minetest po files
+
+# an auxiliary function to abort processing with an optional error
+# message
+abort() {
+       test -n "$1" && echo >&2 "$1"
+       exit 1
+}
+
+# The po/ directory is assumed to be parallel to the directory where
+# this script is. Relative paths are fine for us so we can just
+# use the following trick (works both for manual invocations and for
+# script found from PATH)
+scriptisin="$(dirname "$(which "$0")")"
+
+# The script is executed from the parent of po/, which is also the
+# parent of the script directory and of the src/ directory.
+# We go through $scriptisin so that it can be executed from whatever
+# directory and still work correctly
+cd "$scriptisin/.."
+
+test -e po || abort "po/ directory not found"
+test -d po || abort "po/ is not a directory!"
+
+# Get a list of the languages we have to update/create
+
+cd po || abort "couldn't change directory to po!"
+
+# This assumes that we won't have dirnames with space, which is
+# the case for language codes, which are the only subdirs we expect to
+# find in po/ anyway. If you put anything else there, you need to suffer
+# the consequences of your actions, so we don't do sanity checks
+langs=""
+
+for lang in * ; do
+       if test ! -d $lang; then
+               continue
+       fi
+       langs="$langs $lang"
+done
+
+# go back
+cd ..
+
+# First thing first, update the .pot template. We place it in the po/
+# directory at the top level. You a recent enough xgettext that supports
+# --package-name
+potfile=po/minetest.pot
+xgettext --package-name=minetest -kN_ -kwgettext -F -n -o $potfile src/*.cpp src/*.h
+
+# Now iterate on all languages and create the po file if missing, or update it
+# if it exists already
+for lang in $langs ; do # note the missing quotes around $langs
+       pofile=po/$lang/minetest.po
+       if test -e $pofile; then
+               echo "[$lang]: updating strings"
+               msgmerge -F -U $pofile $potfile
+       else
+               # This will ask for the translator identity
+               echo "[$lang]: NEW strings"
+               msginit -l $lang -o $pofile -i $potfile
+       fi
+done