SmallJoker / simple_protection

Minetest fixed-grid quadratic area protection mod with graphical area "minimap"
11 stars 6 forks source link

bug in the translation #3

Closed BrunoMine closed 8 years ago

BrunoMine commented 8 years ago

I am getting several errors in the translated strings, I do not understand. Because you used $ unlike using @n.

bug_translation bug_translation2

SmallJoker commented 8 years ago

The dollar sign is reserved as placeholder to insert non-translated text

https://github.com/SmallJoker/simple_protection/blob/master/locale/template.txt#L1 This is equal to the string.format expression %s.

BrunoMine commented 8 years ago

You must use @1, @2, @n for it.

You did not explain how I can solve the problem. This has been corrected?

SmallJoker commented 8 years ago

The dollar sign $ describes untranslated text -> nicknames. Put the sign where usually the nickname would appear. The translations with @1 and so on work as usual. Keep a look at the german translation if you are not sure what I meant with that.

BrunoMine commented 8 years ago

The use of @n term can be used to concatenate any variable (including nicknames).

SmallJoker commented 8 years ago

Thank for pointing this out. No idea what I thought while adding the intllib support - somehow I assumed that the @n replacements are translated too, which is wrong. I replaced that ugly dolar sign with the regular replacement markers now.