[TYPO3-core] RFC #8270: Bugfix: Hardcoded labels in title-attributes in backends right upper corner icons
Stefano Kowalke
blueduck at gmx.net
Tue Apr 29 23:25:13 CEST 2008
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
Shall I add these files to bugreport too?
Stefano
--
GPG-ID: 0x2B08936D
Key-Fingerprint: 7F31 BCF0 70C0 B3B1 1235 07E9 1777 D7A0 2B08 936D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8270_class.backendsearch.php.diff
Type: text/x-diff
Size: 975 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080429/5874b363/attachment-0004.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8270_class.clearcachemenu.php.diff
Type: text/x-diff
Size: 3494 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080429/5874b363/attachment-0005.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8270_class.shortcutmenu.php.diff
Type: text/x-diff
Size: 3108 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080429/5874b363/attachment-0006.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8270_locallang_core.xml.diff
Type: text/x-diff
Size: 738 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080429/5874b363/attachment-0007.diff
More information about the TYPO3-team-core
mailing list