Search found 471 matches

Return to advanced search

Re: Client-side translations

Yes.
by Nore
Mon Aug 28, 2017 07:48
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

As I said earlier, the name you need to give corresponds to the lang code used by minetest with that specific locale. In your case, if will be "de". As for having a configuration option to set the language, as I said, *it already exists*.
by Nore
Mon Aug 28, 2017 07:24
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

By the way. Which standard for the language codes do you use? The languages codes used are exactly the same as the folder names in po/. For now, derived language detection needs to be exact. Thus, the server needs to provide "pt_BR.tr" or there will be no translation. It might be a good i...
by Nore
Mon Aug 28, 2017 05:33
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

For now, derived language detection needs to be exact. Thus, the server needs to provide "pt_BR.tr" or there will be no translation. It might be a good idea to change that, indeed.
by Nore
Sun Aug 27, 2017 20:59
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

Linuxdirk wrote:Is it possible to provide colorized strings as parameters for the variables?

Yes.
by Nore
Fri Aug 25, 2017 15:49
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

Linuxdirk wrote:Well then. Maybe at least make it so that newlines can be escaped and don't have to be real newlines. I guess that's the best we can get when it comes to client-side translations.

There is already a pull request doing that.
by Nore
Fri Aug 25, 2017 14:28
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

You expect 100% dedication from everyone else, yet fail to contribute or even put 10% in yourself. Here's a wrapping function that allows using named variables: https://repl.it/KZr4 It takes the string with named variables and a table with named entries and converts it so it can be used by S(). Thi...
by Nore
Fri Aug 25, 2017 14:21
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

But I see. It's only another rushed project by a core dev who wants to implement something the dev likes no matter how handy it is in real-life usage and that needs a mod wrapping it into something useful. If you think that, then you haven't tried to understand at all how client-side translations c...
by Nore
Fri Aug 25, 2017 13:02
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

I'm still waiting for you to show me how these translations can be different for each client according to their locale. Your code doesn't do that.
by Nore
Fri Aug 25, 2017 11:39
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

You can do that with numbered escape sequences. Minimal working example please. S("The value: @1", "the value") I already explained in a previous post *why* this was not possible without making the code quite a bit more complex. Translations ARE complex. What'the problem with wr...
by Nore
Fri Aug 25, 2017 11:30
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

What are your required use cases? a: Sending "The value: @foo" and a table {foo = "the value"} in,and getting the translated "Der Wert: the value" out. You can do that with numbered escape sequences. b: Sending "An Item made of +x from +y" in, and getting &qu...
by Nore
Fri Aug 25, 2017 11:19
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

Oh, I didn't notice that either. As for string concatenation: it is still useful, for formspecs for example (so that you can do a formspec with the text translated).
by Nore
Fri Aug 25, 2017 10:27
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

Var @1 and @2 should never crash even if only @1 is provided. @2 then should simply be returned as a literal @2. It is deliberate to produce an error in that case. If you want a literal @2, use @@2 instead. Concerning named variables, let me explain why it is much more problematic: We need the mess...
by Nore
Fri Aug 25, 2017 09:33
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

There is no way functions such as string length can be made to work as you would expect them to. Consider a simple string such as "Hello", once translated. What is its length? Is it 5? Is is 6? Is it 7? Is it yet another value? It all depends on the language you translate that string in. H...
by Nore
Fri Aug 25, 2017 07:02
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

Since the translations look differently on different clients, you can't expect anything on the strings. You need to treat them as black-box strings where the only things you can do on them is to use concatenation or things like minetest.colorize.
by Nore
Fri Aug 25, 2017 05:23
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: Client-side translations

If you never use arguments, yes, it will work. Besides, you could do the even simpler
Code: Select all
mymod_translate = minetest.get_translator(minetest.get_current_modname())
by Nore
Thu Aug 24, 2017 20:55
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Client-side translations

As a new feature in the 0.5 branch, we now have client-side translations! That means that you can have a mod on a server, with texts translated by each client according to their locale. Translations are documented here . Following is a quick tutorial on how to translate your mod: ⋅ Add the...
by Nore
Thu Aug 24, 2017 16:08
 
Forum: News
Topic: Client-side translations
Replies: 39
Views: 888

Re: [Mod] Technic [0.4.16-dev] [technic]

You need to rename the technic folder to just "technic" and not "technic-master".
by Nore
Wed Jun 07, 2017 01:34
 
Forum: Mod Releases
Topic: [Mod] Technic [0.4.16-dev] [technic]
Replies: 1421
Views: 367230

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

The whole mesecons system is intended more as supply electronics than electricity, that is, it is for logic circuits much more than electric stuff, so this will most probably never be changed to be like you say.
by Nore
Sat Mar 25, 2017 01:10
 
Forum: Mod Releases
Topic: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Replies: 1790
Views: 393699

Re: WorldPainter support?

The light is currently stored in param1 of each node, as two 4-bit fields: light on day and light on night, so coming from MC, you just need to set night light to artificial light, and day light to the maximum of sunlight and artificial light. Thanks. I have it working! Could you tell me exactly wh...
by Nore
Sun Feb 26, 2017 05:41
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906

Re: WorldPainter support?

I have another question for the developers: how is the lighting information stored in the map? It seems like the light propagates the same or similar in Minetest as it does in Minecraft, and I can already calculate the light for Minecraft so it would probably be easy to adapt, if I only knew how it...
by Nore
Sat Feb 25, 2017 20:23
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906

Re: WorldPainter support?

Hmm, I am surprised that it may even exist on disk. You can try to do as you say, but beware that it may have strange consequences, so try to avoid it if possible.
by Nore
Mon Feb 20, 2017 15:07
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906

Re: WorldPainter support?

"ignore" is used for unloaded blocks or nodes. You should never generate it.
by Nore
Sun Feb 19, 2017 17:28
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906

Re: WorldPainter support?

Default water level is z = 0. About generating new mapblocks, it happens when the player is close enough; I think it can be configured but I don't remember the default radius. Also, the map is generated in mapchunks of 5*5*5 mapblocks (that's the default; if you produce your own maps, it is advised ...
by Nore
Tue Feb 14, 2017 21:45
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906

Re: WorldPainter support?

I suggest you use the oldest version that supports all the features you want; version 25 may be a good choice since it is already quite old (at least a few years), while version 27 was introduced just a few days ago to fix lighting problems, so pre-v27 mapblocks may be slightly slower to load on new...
by Nore
Tue Feb 14, 2017 18:04
 
Forum: Minetest-related projects
Topic: WorldPainter support?
Replies: 128
Views: 4906
Next

Return to advanced search