Translation feature does not work on Linux

User avatar
Linuxdirk
Member
 
Posts: 1972
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Translation feature does not work on Linux

by Linuxdirk » Fri Sep 19, 2014 05:59

Hey there!

I’m crossposting this from German discussion sub board to reach a wider audience.

It sems like the translation feature in Minetest does not work on my machine for unknown reason.

The language files are there and Minetest was compiled with gettext support. LANG and LC_MESSAGES are properly set (I even tried LC_ALL). Localization in all other applications that support localization works properly.

Maybe relevant system information

Code: Select all
$ uname -rms
Linux 3.16.1-1-ARCH x86_64

$ minetest --version
Minetest 0.4.10
Using Irrlicht 1.8.1
Build info: VER=0.4.10 BUILD_TYPE=Release RUN_IN_PLACE=0 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=0 STATIC_SHAREDIR=/usr/share/minetest

$ pacman -Ql minetest | grep locale/de
minetest /usr/share/locale/de/
minetest /usr/share/locale/de/LC_MESSAGES/
minetest /usr/share/locale/de/LC_MESSAGES/minetest.mo

$ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8

$ cat /etc/locale.gen
de_DE.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_US.UTF-8 UTF-8


According to the discussion over there I can add the following:

I tried to set language = DE (and valiants like de_DE with or without .utf8 in all possible variants) in minetest.conf but it didn’t change anything.

Here’s the output of running minetest --verbose (just started and quit without playing).

Code: Select all
$ minetest --verbose
16:47:01: INFO[main]: Using system-wide paths (NOT RUN_IN_PLACE)
16:47:01: INFO[main]: path_share = /usr/share/minetest
16:47:01: INFO[main]: path_user  = /home/dirk/.minetest
16:47:01: INFO[main]: minetest with SER_FMT_VER_HIGHEST_READ=26, VER=0.4.10 BUILD_TYPE=Release RUN_IN_PLACE=0 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=0 STATIC_SHAREDIR=/usr/share/minetest
16:47:01: INFO[main]: logfile = /home/dirk/.minetest/debug.txt
16:47:01: VERBOSE[main]: httpfetch_init: parallel_limit=8
16:47:01: INFO[main]: Message locale is now set to: LC_CTYPE=de_DE.utf8;LC_NUMERIC=C;LC_TIME=en_DK.utf8;LC_COLLATE=de_DE.utf8;LC_MONETARY=de_DE.utf8;LC_MESSAGES=de_DE.utf8;LC_PAPER=de_DE.utf8;LC_NAME=de_DE.utf8;LC_ADDRESS=de_DE.utf8;LC_TELEPHONE=de_DE.utf8;LC_MEASUREMENT=de_DE.utf8;LC_IDENTIFICATION=de_DE.utf8
Irrlicht log: Irrlicht Engine version 1.8.1
Irrlicht log: Linux 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64
Irrlicht log: Using renderer: OpenGL 3.3.0
Irrlicht log: GeForce 9600 GT/PCIe/SSE2: NVIDIA Corporation
Irrlicht log: OpenGL driver version is 1.2 or better.
Irrlicht log: GLSL version: 3.3
16:47:01: INFO[main]: text_height=22
16:47:01: INFO[main]: Searching worlds...
16:47:01: INFO[main]:   In /home/dirk/.minetest/worlds:
16:47:01: INFO[main]: Spielwelt
16:47:01: INFO[main]: 1 found.
16:47:01: INFO[main]: Waiting for other menus
16:47:01: INFO[main]: Waited for other menus
16:47:01: INFO[main]: Audio: Initializing...
16:47:01: INFO[main]: Audio: Vorbis extension NOT present
16:47:01: INFO[main]: Audio: Initialized: OpenAL 1.1 ALSOFT 1.16.0, using OpenAL Soft
16:47:01: INFO[main]: GUIEngine: Initializing Lua
16:47:01: VERBOSE[AsyncWorkerThread_0]: Loading and running script from /usr/share/minetest/builtin/init.lua
16:47:01: INFO[AsyncWorkerThread_0]: Initializing Asynchronous environment
16:47:01: VERBOSE[AsyncWorkerThread_1]: Loading and running script from /usr/share/minetest/builtin/init.lua
16:47:01: INFO[AsyncWorkerThread_1]: Initializing Asynchronous environment
16:47:01: VERBOSE[AsyncWorkerThread_2]: Loading and running script from /usr/share/minetest/builtin/init.lua
16:47:01: INFO[main]: SCRIPTAPI: Initialized main menu modules
16:47:01: VERBOSE[main]: Loading and running script from /usr/share/minetest/builtin/init.lua
16:47:01: INFO[AsyncWorkerThread_2]: Initializing Asynchronous environment
16:47:01: VERBOSE[AsyncWorkerThread_3]: Loading and running script from /usr/share/minetest/builtin/init.lua
16:47:01: INFO[AsyncWorkerThread_3]: Initializing Asynchronous environment
16:47:01: INFO[main]: Searching worlds...
16:47:01: INFO[main]:   In /home/dirk/.minetest/worlds:
16:47:01: INFO[main]: Spielwelt
16:47:01: INFO[main]: 1 found.
16:47:01: VERBOSE[main]: OpenALSoundManager::maintain(): 0 playing sounds, 0 sound names loaded
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.0.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.1.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.2.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.3.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.4.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.5.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.6.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.7.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.8.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.9.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /home/dirk/.minetest/sounds/main_menu.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.0.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.1.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.2.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.3.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.4.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.5.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.6.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.7.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.8.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.9.ogg for decoding
16:47:01: INFO[main]: Audio: Error opening /usr/share/minetest/sounds/main_menu.ogg for decoding
16:47:01: INFO[main]: OpenALSoundManager: "main_menu" not found.
16:47:05: INFO[main]: Audio: Deinitializing...
16:47:05: INFO[main]: Audio: Deinitialized.
16:47:05: INFO[main]: GUIEngine: Deinitializing scripting
16:47:05: INFO[main]: Searching worlds...
16:47:05: INFO[main]:   In /home/dirk/.minetest/worlds:
16:47:05: INFO[main]: Spielwelt
16:47:05: INFO[main]: 1 found.
16:47:05: INFO[main]: Updating configuration file: "/home/dirk/.minetest/minetest.conf"
16:47:05: INFO[main]: Skipping writing of /home/dirk/.minetest/minetest.conf because content wouldn't be modified
16:47:05: INFO[main]: Updating configuration file: "/home/dirk/.minetest/minetest.conf"
16:47:05: INFO[main]: Skipping writing of /home/dirk/.minetest/minetest.conf because content wouldn't be modified
16:47:05: VERBOSE[main]: httpfetch_cleanup: cleaning up

And because it’s not very well readable here’s the same thing on nopaste.info.

Hints are highly appreciated :) Thanks in advance!

Kind regards,
Dirk
 

slspeek
New member
 
Posts: 2
Joined: Wed Oct 08, 2014 18:25
GitHub: slspeek
In-game: BasEnSteven

Re: Translation feature does not work on Linux

by slspeek » Wed Oct 08, 2014 18:53

As requested in the german thread, I did a bisect between 0.4.9 and 0.4.10.

Code: Select all
~/p/m/minetest ((96f285f...)|BISECTING) $ git bisect good
e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded is the first bad commit
commit e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded
Author: sapier <Sapier at GMX dot net>
Date:   Mon Jul 7 00:06:06 2014 +0200

    Fix regression in leveldb backend

:040000 040000 9ba91bfca522478eb9b5e7f0f3fc03c1ccc64b7f a60850c2893b4529af5026e59965e106dad00c60 M      src
 

User avatar
Linuxdirk
Member
 
Posts: 1972
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk
 

User avatar
RealBadAngel
Member
 
Posts: 557
Joined: Wed Jul 18, 2012 16:30

Re: Translation feature does not work on Linux

by RealBadAngel » Sat Jan 10, 2015 23:13

16:47:01: INFO[main]: minetest with SER_FMT_VER_HIGHEST_READ=26, VER=0.4.10 BUILD_TYPE=Release RUN_IN_PLACE=0 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=0 STATIC_SHAREDIR=/usr/share/minetest

https://github.com/minetest/minetest/bl ... E.txt#L148

EDIT: it should work out of the box. Maybe you could try the patch that allow change of language from menu.
 

mhanne
New member
 
Posts: 1
Joined: Sun Jan 11, 2015 09:50
GitHub: mhanne
IRC: mhanne
In-game: mhanne

Re: Translation feature does not work on Linux

by mhanne » Sun Jan 11, 2015 10:31

Hi,
recently started playing minetest with my son and we already had a lot of fun :)
Thanks to everyone involved!

I also had problems with translations on debian wheezy, what fixed it for me was:
1) add -DENABLE_GETTEXT=1 to cmake call since it wouldn't enable it automatically
2) add language = de to the configfile

Not sure if it's the same issue, since your log says gettext is already enabled,
but FWIW, the language setting has to be lowercase or it won't work.

Marius
 

User avatar
Linuxdirk
Member
 
Posts: 1972
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Translation feature does not work on Linux

by Linuxdirk » Fri Jan 16, 2015 18:53

Snippet from verbose start-up

Code: Select all
19:57:50: INFO[main]: minetest with SER_FMT_VER_HIGHEST_READ=26, VER=0.4.11 BUILD_TYPE=Release RUN_IN_PLACE=0 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=0 STATIC_SHAREDIR=/usr/share/minetest

19:57:50: INFO[main]: Message locale is now set to: LC_CTYPE=de_DE.utf8;LC_NUMERIC=C;LC_TIME=en_DK.utf8;LC_COLLATE=de_DE.utf8;LC_MONETARY=de_DE.utf8;LC_MESSAGES=de_DE.utf8;LC_PAPER=de_DE.utf8;LC_NAME=de_DE.utf8;LC_ADDRESS=de_DE.utf8;LC_TELEPHONE=de_DE.utf8;LC_MEASUREMENT=de_DE.utf8;LC_IDENTIFICATION=de_DE.utf8

My locale setting

Code: Select all
$ cat /etc/locale.gen
de_DE.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_US.UTF-8 UTF-8

$ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC=en_DK.utf8
LC_TIME=en_DK.utf8
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=

As said before: All applications that provide a translated interface are properly translated. All applications that use gettext for it are properly translated.

Code: Select all
$ gettext --version
gettext (GNU gettext-runtime) 0.19.3
Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.

The translation file gets installed to /usr/share/locale/de/LC_MESSAGES/minetest.mo and according to strings it contains the translated strings.
 


Return to Problems



Who is online

Users browsing this forum: No registered users and 2 guests