[TYPO3-core] RFC #8270: Bugfix: Hardcoded labels in title-attributes in backends right upper corner icons
Oliver Hader
oliver at typo3.org
Tue Apr 29 10:58:04 CEST 2008
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
--
Oliver Hader
TYPO3 Core Team
More information about the TYPO3-team-core
mailing list