Could we please remove strtolower? It makes translated strings looking wrong

admin.inc (Line 2011)

$form['#title'] .= t('Add @type', array('@type' => strtolower($types[$type]['title'])));

Comments

merlinofchaos’s picture

Um, but then we get incorrect capitalization on the string. I don't understand how this 'looks wrong'.

hass’s picture

No, the strtolower capitalize wrong... it lowercases all strings that have capitalized the first letter uppercase and this makes the word wrong in other languages. For e.g. the string "Defaults: Add @type" is "Defaults: Add Node" in English. In German this looks like "Standard: Beitrag hinzufügen" and strtolower produces "Standard: beitrag hinzufügen" what is simply wrong (capitalization). "Beitrag" will never ever been written lowercase in German.

In general - translated strings should never been altered on output level... or they may become wrong...

merlinofchaos’s picture

You realize that you're telling me to make it wrong in English so that it can be right in German.

In order to make this right in both languages I'm basically going to have to make it a separate string. I'm waffling over whether or not the work involved is worthwhile.

merlinofchaos’s picture

Status: Active » Fixed

Ok, that wasn't so bad.

hass’s picture

Thank you. This are very typical context sensitive translation issue... I'm not saying you should make english wrong - it's more - we should never alter placeholder values in such a way or they may become wrong. Not only the German would be wrong without the above patch :-) - nearly every language except English is wrong. To fill placeholders with values from a different context is very problematic. However, thank you for fixing this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.