Internationalization for mods

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

Internationalization for mods

by Wuzzy » Sat Aug 30, 2014 14:30

Yeah, this is one big thing which is missing in Minetest: Internationalization (I18N) for mods. Mods are now such an essential part of Minetest that if those are not translatable, a huge chunk of Minetest (including the default subgame, Minetest Game) is de facto only available in English.

There were a few attempts to implement I18N for mods by using mods but I think this not a good solution in my opinion for serveral reasons:
  • Because they are mods, it depends on the server wheather translations are provided at all
  • Because they are mods, there is no clean standard way to translate mods
  • The mods are more or less a bit obscure and not everyone even knows about them
Also, as far I can tell, none of the translation mods supports even basic format strings. So it is not even possible to insert variable strings. The mods only allow for fixed strings, which makes only the most basic translation tasks possible. But even if one of the translation mods fixed that problem, there would be still the inherent problems of mods.

What would be really needed is translation support directly from the core. Some support from the Lua API would be great. So that modders don’t have to worry about dependencies, they can simply use the Lua API to mark strings as translatable. And server operators don’t have to explicitly enable I18N support by providing a mod.

Now I am not exactly sure how to implement something like that. I would be in favor of a gettext-based solution, because Minetest already uses gettext. But I wouldn’t oppose other solutions if they work.

Any further ideas or comments on this?
Last edited by Wuzzy on Sat Mar 25, 2017 20:55, edited 1 time in total.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Internationalization for mods

by sfan5 » Sat Aug 30, 2014 14:41

Translations done server-side?
No.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

Re: Internationalization for mods

by Wuzzy » Sat Aug 30, 2014 18:54

Mods are on the server side. As well as the relevant strings, of course. Therefore, it is not far-fetched to do it on the server side, at least partly. If the translations or the original strings would be on the client, the client would have to have somehow obtained prior knowledge of the mod, which would make mods not purely server-side anymore.

I do not understand the reason behind your position. And since you do not provide any rationale for your position, I can simply dismiss it.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Internationalization for mods

by sfan5 » Sat Aug 30, 2014 19:20

So you want everyone to use Greek because the server owner decided he wanted Greek?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Internationalization for mods

by Krock » Sat Aug 30, 2014 19:23

Languages are client stuff, translations like

default:stick Stick
default:wood Planks

would be much better than using the translation mod.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: Internationalization for mods

by Wuzzy » Sun Aug 31, 2014 05:09

sfan5 wrote:So you want everyone to use Greek because the server owner decided he wanted Greek?

No, of course not!
What I want is that each client gets the strings in the language it wants.

Maybe I should provide a rough concept:
Mods have to provide the translation files (if any) by themselves. So translation files reside in the mod folder.
Now here’s how I think the client can get the translated strings: On connection, the client tells the server the desired language, probably as early as possible. After that, when the server needs to transmit a string from a mod, the server first translates it to the language of the client (if a translation is available, this would be a simple look-up operation, if not, the default string is chosen), then sends the translated string.
So the idea is that the server sends the strings in the language of the respective clients, not in the server’s language.
This would require a small protocol change, but the only change would be the client telling the server the language, so I hope this is not too dramatic.

Well, that’s my basic idea. I hope it makes more sense now. I am not so sure about the details.
I wonder if this would be even a workable solution at all, because I am not really sure.


@Krock: You are missing the point here. If it were just about translating node descriptions, the existing mods would kinda suffice. It would still be not the prettiest solution but it would work. But mods can have strings everywhere, not only in the node descriptions. Formspecs are another big thing (for example). And besides, your solution would again require clients to have prior knowledge of the server’s mods. The client would have to magically know the translation of strings from mods the client does not even know yet, because it all comes from mods. It just doesn’t make much sense to me.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Internationalization for mods

by sfan5 » Sun Aug 31, 2014 08:25

Wuzzy wrote:
sfan5 wrote:So you want everyone to use Greek because the server owner decided he wanted Greek?

No, of course not!
What I want is that each client gets the strings in the language it wants.
[...]

That sounds like a viable option.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: Internationalization for mods

by Minetestforfun » Sun Aug 31, 2014 18:01

@Wuzzy
Very interresting idea, for now, i manually trad english mods to french in my server, my english isn't very good, so i often make mistakes... :/
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Internationalization for mods

by kaeza » Sun Aug 31, 2014 20:24

One way would be to broadcast the .mo/.po files as "media", and then let the client handle translation.

Also, this bit has been discussed before: translating item names or is no problem; you just take "Stick" and translate to whatever you want. The issue is how to translate (and send) things like server messages, formspec strings, and the like.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Internationalization for mods

by rubenwardy » Sun Aug 31, 2014 20:55

All my food mods use kaeza's intlib. My mods supply a locale/de.txt files, etc. The duggested method would be much better than forcing all players to use the same language. And very little effort for me to then support.
 

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

Re: Internationalization for mods

by Wuzzy » Mon Feb 09, 2015 03:04

I have just opened an issue about this:
https://github.com/minetest/minetest/issues/2270
 

User avatar
afflatus
Member
 
Posts: 302
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

Re: Internationalization for mods

by afflatus » Wed Apr 13, 2016 20:34

Good thread.
Let's try to get clear about what needs to happen in the engine, server-side and client-side.
I'd love to make my sub-game properly translatable.
Grailtest is sleeping ...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 39 guests

cron