[TYPO3-core] RFC #8270: Bugfix: Hardcoded labels in title-attributes in backends right upper corner icons

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Thu May 29 15:01:02 CEST 2008


Stefano Kowalke schrieb:
> Oliver Hader wrote:
> 
>> Hi Stefano,
>>
>> Stefano Kowalke schrieb:
>>> This is an SVN patch request.
>>>
>>> Type: Bugfix
>>>
>>> Bugtracker references:
>>> http://bugs.typo3.org/view.php?id=8270
>>>
>>> Branches:
>>> 4.2, Trunk
>>>
>>> Problem:
>>> Title attributes from three icons (Shortcut, Clear Cache, Search) in
>>> backends upper right corner are hardcoded and not be able to translate.
>>>
>>> Solution:
>>> Solution for "Search":
>>> Replace the hardcoded label in
>>> typo3_src-4.2.0/typo3/classes/class.backendsearchmenu.php
>>> with
>>> $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.search');
>>>
>>> Solution for "Clear Cache":
>>> Replace the hardcoded label in
>>> typo3_src-4.2.0/typo3/classes/class.clearcachemenu.php
>>> with
>>>
> $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCache_clearCache');
>>> Solution for "Shortcut":
>>> Add a new line to
>>> typo3_src-4.2.0/typo3/sysext/lang/locallang_core.xml like
>>> <label index="labels.shortcut">Shortcut</label>
>>>     
>>> Replace the hardcoded label in
>>> typo3_src-4.2.0/typo3/classes/class.shortcutmenu.php
>>> with
>>> $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcut');
>> +1 on reading and testing if the following remarks were taken into account
>>
>> Some remarks :
>> * use locallang_core.xml instead of locallang_core.php
>> * $GLOBALS['LANG']->sL() has a second boolean parameter ($hsc) which
>> will use the htmlspecialchars and makes that call in your changes obsolete
>> * concerning the htmlspecialchars discussion: yes, it's required, AFAIK
>> a quote character '"' is allowed as label in the XML file
>>
>> olly
> 
> Hi, 
> 
> i changed the code like described above and I found 3+ hardcoded strings in 
> typo3_src-4.2.0/typo3/classes/class.shortcutmenu.php

I've committed the changes to class.backendsearchmenu.php and 
class.clearcachemenu.php to TYPO3_4-2 (I didn't want to introduce new 
labels), all of the changes were committed to trunk.

Masi


More information about the TYPO3-team-core mailing list