[Mod] Translate Item Definitions [vortoj]

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

[Mod] Translate Item Definitions [vortoj]

by Casimir » Wed Feb 05, 2014 19:23

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.
Last edited by Casimir on Mon Sep 21, 2015 00:11, edited 3 times in total.
 

User avatar
AMMOnym
Member
 
Posts: 682
Joined: Tue Sep 10, 2013 14:18
Location: Slovakia
IRC: AMMOnym
In-game: AMMOnym

by AMMOnym » Thu Feb 06, 2014 08:48

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...)
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Tue Feb 11, 2014 19:09

Now with French translation. Thanks to Olivier Migeot.
 

User avatar
AMMOnym
Member
 
Posts: 682
Joined: Tue Sep 10, 2013 14:18
Location: Slovakia
IRC: AMMOnym
In-game: AMMOnym

by AMMOnym » Tue Feb 11, 2014 20:32

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.
Attachments

[The extension lua has been deactivated and can no longer be displayed.]

 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Tue Feb 11, 2014 23:27

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>.
 

User avatar
AMMOnym
Member
 
Posts: 682
Joined: Tue Sep 10, 2013 14:18
Location: Slovakia
IRC: AMMOnym
In-game: AMMOnym

by AMMOnym » Wed Feb 12, 2014 05:35

When i edit the minetest.conf and i tried start world with this mod i got error.
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Wed Feb 12, 2014 15:25

You need to use a newer version of minetest. The mod uses override_item, which was added after 0.4.9.
 

User avatar
AMMOnym
Member
 
Posts: 682
Joined: Tue Sep 10, 2013 14:18
Location: Slovakia
IRC: AMMOnym
In-game: AMMOnym

by AMMOnym » Wed Feb 12, 2014 15:33

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
 

User avatar
ShadowNinja
Developer
 
Posts: 199
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

by ShadowNinja » Wed Feb 12, 2014 22:32

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:
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.
The best way to contact me is usually IRC (InchraNet, freenode).
 

Limada
New member
 
Posts: 4
Joined: Sun Feb 09, 2014 23:27
Location: Germany

by Limada » Wed Mar 05, 2014 22:36

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?
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Mon Mar 10, 2014 22:24

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?
Last edited by Casimir on Mon Mar 10, 2014 22:25, edited 1 time in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Tue Mar 11, 2014 04:28

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.
 

User avatar
nman3600
Member
 
Posts: 168
Joined: Fri Feb 07, 2014 17:06
GitHub: nman3600
IRC: nman3600
In-game: nman3600

by nman3600 » Sat Mar 22, 2014 10:57

Screenshots please
There is just no angry way to say 'Bubbles'
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sat Mar 22, 2014 11:15

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
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

Re: [Mod] Translate Item Definitions [vortoj]

by Casimir » Thu Jan 15, 2015 22:04

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".
 

User avatar
Wuzzy
Member
 
Posts: 3241
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Translate Item Definitions [vortoj]

by Wuzzy » Mon Aug 24, 2015 22:45

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, …).
 

User avatar
DS-minetest
Member
 
Posts: 1022
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Translate Item Definitions [vortoj]

by DS-minetest » Tue Aug 25, 2015 08:59

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
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Wuzzy
Member
 
Posts: 3241
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Translate Item Definitions [vortoj]

by Wuzzy » Tue Aug 25, 2015 15:29

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
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Translate Item Definitions [vortoj]

by Martno » Tue Aug 25, 2015 15:37

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?
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

Re: [Mod] Translate Item Definitions [vortoj]

by Casimir » Tue Aug 25, 2015 18:28

@ 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.
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Translate Item Definitions [vortoj]

by Martno » Tue Aug 25, 2015 19:34

Casimir wrote:I hope that we will then be able to support all languages well.


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

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Translate Item Definitions [vortoj]

by Martno » Fri Sep 18, 2015 10:27

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.
 

User avatar
Casimir
Member
 
Posts: 1154
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

Re: [Mod] Translate Item Definitions [vortoj]

by Casimir » Mon Sep 21, 2015 00:25

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.
 

User avatar
MineYoshi
Member
 
Posts: 5357
Joined: Wed Jul 08, 2015 13:20

Re: [Mod] Translate Item Definitions [vortoj]

by MineYoshi » Mon Sep 21, 2015 13:34

can you add spanish traduction??
nire patata zurea da, kide :-)
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: Exabot [Bot] and 8 guests