[TYPO3-translators] Trimming of the translation values

Dmitry Dulepov dmitry.dulepov at gmail.com
Wed Apr 22 23:28:39 CEST 2009


Hi!

Yolf wrote:
> It's not the case I was thinking about.
> An example is :
> An error was detected in the extension: myExtensionName.
> The localisation tag is : "An error was detected in the extension: "
> followed by $this->extKey for example.

That's exactly the case of formatting. If I understand correctly, the code should take care of that extra space. And the whole thing should look like: "An error was detected in extension: %s". This allows to translate it properly with all necessary spaces :) Parameters must be always included into the translated phrase, not concatenated to it.

The problem is that most developers do not know about it :(

> Another example is when you have a default tag that may be changed by
> typoscript in your ext.
> X test (the localization tag is "X " and the message comes from a variable)
> .test could be a possible writting (tag becomes ".")
> -test also (tag becomes "-")
> test also (tag becomes "")

Again a developer need to use formatters in this case. Never concatenate translation with its value! The position of the value in the string depends on the string in different languages.

llxmltranslate is correct here. It assumes that developers know how to prepare strings for localization. Probably the assumption was too optimistic...

-- 
Dmitry Dulepov
In TYPO3 blog: http://dmitry-dulepov.com/article/have-fun-with-the-typoscript-error-hunt.html
LinkedIn: http://www.linkedin.com/in/dmitrydulepov
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs


More information about the TYPO3-translators mailing list