[TYPO3-translators] Trimming of the translation values

Yolf yolf.typo3 at orange.fr
Wed Apr 22 23:54:09 CEST 2009


Dmitry Dulepov a écrit :
> 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...
> 
Thanks for the help.


More information about the TYPO3-translators mailing list