Page 1 of 1

[Mod] Translate Item Definitions [vortoj]

PostPosted: Wed Feb 05, 2014 19:23
by Casimir
A Mod that translates the item description into the language defined in the settings.

Translated:
DE (German)
FR (French)
IT (Italian)
JA (Japanese)
TP (Toki Pona)
TR (Turkish)

git: https://github.com/CasimirKaPazi/vortoj

download:
.zip
.tar.gz

license of code: GPLv3 or later
depends: nothing
(Softdepends on all supported mods so it gets loaded after them.)

I started with the German translation, but then it became boring, so I decided that you do the rest.

PostPosted: Thu Feb 06, 2014 08:48
by AMMOnym
Nice mod. Will be awesome if u make this : may be than u choose any tool (sword) and u can rename it to any description (Excalibur...)

PostPosted: Tue Feb 11, 2014 19:09
by Casimir
Now with French translation. Thanks to Olivier Migeot.

PostPosted: Tue Feb 11, 2014 20:32
by AMMOnym
I made a slovak translation for ur mod. Can u explain me how to use this mod becouse i dont know how to choose leanguage.

PostPosted: Tue Feb 11, 2014 23:27
by Casimir
If it does not work, try to edit minetest.conf. It should have a line "language = SK".
Sadly Minetest can not display most of the words. It just displays <invalid multibyte sting>.

PostPosted: Wed Feb 12, 2014 05:35
by AMMOnym
When i edit the minetest.conf and i tried start world with this mod i got error.

PostPosted: Wed Feb 12, 2014 15:25
by Casimir
You need to use a newer version of minetest. The mod uses override_item, which was added after 0.4.9.

PostPosted: Wed Feb 12, 2014 15:33
by AMMOnym
Casimir wrote:You need to use a newer version of minetest. The mod uses override_item, which was added after 0.4.9.
OHh thank you

PostPosted: Wed Feb 12, 2014 22:32
by ShadowNinja
You might find that the intllib mod is helpfull for this. ( https://forum.minetest.net/viewtopic.php?id=4929 )
I rewrote your mod using it:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
for name, translation in pairs(intllib.get_strings() or {}) do
    if minetest.registered_items[name] and translation ~= "" then
        minetest.override_item(name, {description = translation})
    end
end

( http://pastebin.ubuntu.com/6922568/ )
Just put translation files in locale/ with the name of the language with a .txt suffix, eg, ES.lua becomes locale/es.txt.
The translation files use a minetest.conf-like syntax. (See https://github.com/minetest-technic/technic/blob/master/technic/locale/es.txt )
You'll also have to add intllib to depends.txt of course.

PostPosted: Wed Mar 05, 2014 22:36
by Limada
Hi Casimir,

If I understand your mod, it´s exactly what I was looking for. Translating the description one time and than no need to touch the files when I have to reinstall or update the mods, if there is no change made with the description. Is this correct? (my english and computer knowledge is poor)

But I can´t get your mod working. I installed minetest 0.4.9 (for windows, where it has still a bug whith closing the game), put the modfolder in the usual moddirectory, checked the mod in modlist, but there is no translation in the game. And when I write "language = de" in the minetest.config I get an error message.
What do I wrong?

PostPosted: Mon Mar 10, 2014 22:24
by Casimir
You need a minetest version newer than "stable" 0.4.9. In General Discussion you will find several builds for windows.
The mod does not change any file on you system. Also the descriptions only get translated when the mod is enabled. If that is what you wanted to know.
So you see how great Minetest is?

Dein Minetest sollte neuer sein als die sogenannte "stabile" Version 0.4.9. In General Discussion gibt es mehrere Builds für Windows.
Die Mod verändert keine Dateien, das ist alles nur temporär so lange sie eingeschaltet ist. Wenn es das ist was du wissen wolltest.
Das heißt der offizielle Download von Minetest funktioniert praktisch nicht?

PostPosted: Tue Mar 11, 2014 04:28
by 4aiman
Casimir wrote:If it does not work, try to edit minetest.conf. It should have a line "language = SK".
Sadly Minetest can not display most of the words. It just displays <invalid multibyte sting>.

xyz has fixed this issue although it wasn't merged with upstream. Currently you may want to play with codepagesand mod files coding. See herefor any details.
PS: w/o knowing of this mod I did my own with only Russian. Any volunteer may use some translated strings from it.

PostPosted: Sat Mar 22, 2014 10:57
by nman3600
Screenshots please

PostPosted: Sat Mar 22, 2014 11:15
by 4aiman
Screenshots of what? What's your native language?
Have you read the discussion @ github I've provided a link to?
Anyway, it'll look like this:
Image

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Thu Jan 15, 2015 22:04
by Casimir
I started with a toki pona translation. It is very hard to express things like "bucket of lava" in toki pona but it is fun to find a solution: "poki telo li jo e telo kiwen seli" This is actually a sentence "container liquid has liquid stone fire".

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Mon Aug 24, 2015 22:45
by Wuzzy
I have updated the German translation for Minetest Game 0.4.13, grab it here:
http://lpaste.net/raw/139584

Also, the depends.txt file should be updated for Minetest Game 0.4.13 (boats, xpanes, tnt, …).

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Tue Aug 25, 2015 08:59
by DS-minetest
Wuzzy wrote:I have updated the German translation for Minetest Game 0.4.13, grab it here:
http://lpaste.net/raw/139584

Also, the depends.txt file should be updated for Minetest Game 0.4.13 (boats, xpanes, tnt, …).

you made some translating mistakes:
pine means "Kiefer" in german and screwdriver means "Schraubenzieher" in german

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Tue Aug 25, 2015 15:29
by Wuzzy
Fixed the pine stuff.
http://lpaste.net/raw/139584

About “screwdriver”: Both “Schraubenzieher” and “Schraubendreher” are correct and mean the same thing in German.
http://www.dict.cc/?s=screwdriver
https://de.wikipedia.org/wiki/Schraubendreher

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Tue Aug 25, 2015 15:37
by Martno
This mod is awesome.
Although I have a little problem. I made a hungarian translation, and it works fine with 0.4.12 version of the game, even the accented characters are displayed (e.g.: á é í ó ö ő ú ü ű - I don't know if any other "special" characters from other languages are working or not). But in the 0.4.13 version, accented characters are missing from item definitions (there are spaces instead of these characters)
Is that a mod problem, or something with the game itself?

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Tue Aug 25, 2015 18:28
by Casimir
@ Wuzzy
Thank you. I added it.

@ Martno
This seems to be a problem of Minetest itself. Sometimes it works for some languages, sometimes it does not. I don't know how to fix it. But currently people are working on adding full utf-8 support to the engine. I hope that we will then be able to support all languages well.

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Tue Aug 25, 2015 19:34
by Martno
Casimir wrote:I hope that we will then be able to support all languages well.


Ok, thanks for the answer. I hope that too.

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Wed Aug 26, 2015 12:38
by Martno
Ignore this reply, I deleted

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Fri Sep 18, 2015 10:27
by Martno
I'm making a sample_language.lua file for this mod, to support Minetest 0.4.13 and LOTS of Mods. So people can translate mods too.
This work is a lot of copying and pasting, I don't have any coding/modding skills. Because of this, I ran into some difficulties.
1. Stairs, slabs, panels... etc
2. Mods which override default items descriptions

1. Some mods registers the stairs (and stuff) with different item strings if Stairsplus (from Moreblocks) is enabled or disabled. Something like this:
Stairsplus: modname:stair_blockname, modname:slab_blockname ... etc
Stairs: stairs:stair_blockname, stairs:slab_blockname.
So in these cases I think my sample_language.lua file has to contain every stairs, slabs twice, in both forms, because I want the translation to work with or without stairsplus enabled.
Not very big problem, it's just the work is really time consuming already.

2. Some mods (like Technic) overrides the descriptions of some default items, blocks. The item string remains the same, but the description changes. I'm not able to give a different description in case technic is enabled, so the description remains the same.
It's not a problem to me, but it's possible that some players would rather see iron pickaxe, axe, shovel... etc in the description, instead of the default steel pickaxe, axe, shovel... etc. Or Wooden Chest instead of default Chest, if Technic is enabled.
I don't know if this overriding thing can cause more serious problems in case of other mods (I didn't find any yet).

I hope I explained it clear enough (my English is not the best).

So if there is any possible solution or workaround, that would be great.

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Mon Sep 21, 2015 00:25
by Casimir
1. A nice solution would be to have a piece of code that handles aliases and similar nodes. For collecting the node names one could write a small mod or other program to do this. Such a program could also print out generic translations. I previously wrote a small mod to print out all item strings. That might be a starting point.

2. Changing steel to iron is a strange thing to do. If someone wants to add iron then the best thing would be to make a new item for it. If mods do things that I think should not be done in a mod, I tend to not support them. It saves a lot of work.

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Mon Sep 21, 2015 13:34
by MineYoshi
can you add spanish traduction??

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Fri Sep 25, 2015 16:03
by Glory!
Great idea, sir.
I like the concept of internationalizing minetest.

also, toki pona li pona!

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Thu Nov 26, 2015 15:00
by mahmutelmas06
Local letters are now shown in game. For example ş, ı, ü, ö ...
But in another mod they are ok viewtopic.php?f=9&t=13552

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Sat Nov 28, 2015 17:48
by Casimir
It works for me. What OS are you using, what version of minetest? How do the letters look in game?

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Sat Nov 28, 2015 20:23
by mahmutelmas06
There is only spaces where letters should be.
For example word is "Dünya" but what i see is "D nya"
Minetest version is latest build by stfan
Os is Windows 10 64bit

Re: [Mod] Translate Item Definitions [vortoj]

PostPosted: Thu Mar 24, 2016 21:02
by im-poke
Should i ad Dutch? My native lang?