Don't translate interpolation keys


(Neil Lalonde) #1

This is a friendly reminder that variables in the english strings should not be translated since they will break the translations and break the build.

This is currently a problem in the Urdu translations. One example:

Anyone on the Urdu team, can you please spread the word?


(Neil Lalonde) #2

(Quim Gil) #3

Is there a way to declare these variables as such, so Transifex doesn’t even allow their translation?


(Neil Lalonde) #4

That would be ideal. I don’t know of a way to do that in Transifex.


(Gerhard Schlager) #5

Unless you enable “raw editor mode”, Transifex detects %{placeholder}, but unfortunately not {{placeholder}}. I have no idea why we use different placeholder formats. :thinking:

image


(Régis Hanol) #6

Maybe we should enforce this? Or automatically replace with the format recognized by Transifex?


(Gerhard Schlager) #7

And please do not replace the percent sign ( % ) with a translated version such as ٪

Transifex allows you to insert the placeholder into your translation by clicking on the placeholder (e. g. %{count} in the following example.

image


The Urdu translations currently have that problem.


(Gerhard Schlager) #8

Transifex has this nice little feature called Translation Checks – we just didn’t know about it.

Well, I configured it today, so there shouldn’t be any problems with missing or translated interpolation keys anymore. You will see an error message when you try to save an invalid translation.

image


(Gerhard Schlager) #9