Search found 477 matches

Return to advanced search

Re: Client-side translations

The problem isn't memory usage per se, but rather that translations specific to a server should be unloaded once the server is left. The translations also need to be loaded when the server is joined, and I never found how to do that, unfortunately. (I'm not even sure it is possible with the gettext ...
by Nore
Fri Feb 02, 2018 22:55
 
Forum: News
Topic: Client-side translations
Replies: 59
Views: 5543

Re: Client-side translations

Well, basically, that would be as much work as parsing the po files. The question is, how to do this without rewriting gettext?
by Nore
Fri Feb 02, 2018 22:18
 
Forum: News
Topic: Client-side translations
Replies: 59
Views: 5543

Re: Client-side translations

One thing which bothers me the most at the moment: Why did you use a non-standard format for the translations instead of just Gettext / PO? I mean, is there really any reason for that? Honestly, this seems like a stupid decision. The format used was the same as intlib used, although now intlib uses...
by Nore
Fri Feb 02, 2018 17:01
 
Forum: News
Topic: Client-side translations
Replies: 59
Views: 5543

Re: Client-side translations

Unfortunately, it can't, for 2 reasons:
- the translated parts must be known statically
- it won't work with signs showing text with sign_lib or things like that (but it will work with infotexts), due to how sign_lib or other similar mods work.
by Nore
Sat Jan 27, 2018 07:48
 
Forum: News
Topic: Client-side translations
Replies: 59
Views: 5543

Re: [Server] Inside The Box [Puzzles]

Wuzzy wrote:Sofar, I wonder how you managed to make sure that you can't jump over fences, even with sneak-jumping.

Hint: sneak is completely disabled :).
by Nore
Sat Dec 02, 2017 07:54
 
Forum: Servers
Topic: [Server] Inside The Box [Puzzles]
Replies: 336
Views: 14699

Re: [Server] Inside The Box [Puzzles]

Server chat is connected to #insidethebox Do note, it's actually ##insidethebox . Every IRC channel starts with a #, so when it was specified with # in the name, it became ##insidethebox. Don't know if that was intentional or not. IRC channels are usually specified with a '#' in the same, even thou...
by Nore
Fri Nov 17, 2017 09:35
 
Forum: Servers
Topic: [Server] Inside The Box [Puzzles]
Replies: 336
Views: 14699

Re: Client-side translations

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

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 59
Views: 5543

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: 1446
Views: 408140

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: 1794
Views: 432415
Next

Return to advanced search