Fixed bug #8270: hardcoded labels in title attributes of icons in top bar of BE inter...
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 29 May 2008 12:52:23 +0000 (12:52 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 29 May 2008 12:52:23 +0000 (12:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3737 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/classes/class.backendsearchmenu.php
typo3/classes/class.clearcachemenu.php
typo3/classes/class.shortcutmenu.php
typo3/sysext/lang/locallang_core.xml

index 3e2d456..2169dd8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+
+2008-05-29  Martin Kutschker  <masi@typo3.org>
+
+       * Fixed bug #8270: hardcoded labels in title attributes of icons in top bar of BE interface (thanx to Stefano Kowalko)
+
 2008-05-28  Ernesto Baschny  <ernst@cron-it.de>
 
        * Fixed bug #8522: Datetime shifts on copy and localize (timezone related)
index 10e1c9c..e24b199 100644 (file)
@@ -69,10 +69,11 @@ class BackendSearchMenu implements backend_toolbarItem {
         * @return      string          workspace selector as HTML select
         */
        public function render() {
+               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.search',1);
                $this->addJavascriptToBackend();
                $searchMenu = array();
 
-               $searchMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/magnifier.png', 'width="16" height="16"').' title="Search" alt="" /></a>';
+               $searchMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/magnifier.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" /></a>';
 
                $searchMenu[] = '<div class="toolbar-item-menu" style="display: none;">';
                $searchMenu[] = '<input type="text" id="search-query" name="search-query" value="" />';
index 7465f2a..db22c12 100644 (file)
@@ -57,34 +57,34 @@ class ClearCacheMenu implements backend_toolbarItem {
 
                        // Clear cache for ALL tables!
                if($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.all')) {
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_all');
+                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_all',1);
                        $this->cacheActions[] = array(
                                'id'    => 'all',
                                'title' => $title,
                                'href'  => $this->backPath.'tce_db.php?vC='.$GLOBALS['BE_USER']->veriCode().'&cacheCmd=all',
-                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning_red.png', 'width="16" height="16"').' title="'.htmlspecialchars($title).'" alt="" />'
+                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning_red.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
                        );
                }
 
                        // Clear cache for either ALL pages
                if($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.pages')) {
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_pages');
+                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_pages',1);
                        $this->cacheActions[] = array(
                                'id'    => 'pages',
                                'title' => $title,
                                'href'  => $this->backPath.'tce_db.php?vC='.$GLOBALS['BE_USER']->veriCode().'&cacheCmd=pages',
-                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning.png', 'width="16" height="16"').' title="'.htmlspecialchars($title).'" alt="" />'
+                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
                        );
                }
 
                        // Clearing of cache-files in typo3conf/ + menu
                if($GLOBALS['BE_USER']->isAdmin() && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_allTypo3Conf');
+                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_allTypo3Conf',1);
                        $this->cacheActions[] = array(
                                'id'    => 'temp_CACHED',
                                'title' => $title,
                                'href'  => $this->backPath.'tce_db.php?vC='.$GLOBALS['BE_USER']->veriCode().'&cacheCmd=temp_CACHED',
-                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning_green.png', 'width="16" height="16"').' title="'.htmlspecialchars($title).'" alt="" />'
+                               'icon'  => '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning_green.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
                        );
                }
 
@@ -109,10 +109,11 @@ class ClearCacheMenu implements backend_toolbarItem {
         * @return      string          workspace selector as HTML select
         */
        public function render() {
+               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCache_clearCache',1);
                $this->addJavascriptToBackend();
                $cacheMenu = array();
 
-               $cacheMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning.png', 'width="16" height="16"').' title="Clear Cache" alt="" /></a>';
+               $cacheMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/lightning.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" /></a>';
 
                $cacheMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
 
index e797004..cd56b0f 100644 (file)
@@ -114,11 +114,12 @@ class ShortcutMenu implements backend_toolbarItem {
         * @return      string          workspace selector as HTML select
         */
        public function render() {
+               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcut',1);
                $this->addJavascriptToBackend();
 
                $shortcutMenu = array();
 
-               $shortcutMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/toolbar_shortcut.png', 'width="16" height="16"').' title="Shortcuts" alt="" /></a>';
+               $shortcutMenu[] = '<a href="#" class="toolbar-item"><img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/toolbar_shortcut.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" /></a>';
                $shortcutMenu[] = '<div class="toolbar-item-menu" style="display: none;">';
                $shortcutMenu[] = $this->renderMenu();
                $shortcutMenu[] = '</div>';
@@ -133,9 +134,13 @@ class ShortcutMenu implements backend_toolbarItem {
         */
        public function renderMenu() {
 
-               $groupIcon  = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/sysf.gif', 'width="18" height="16"').' title="Shortcut Group" alt="" />';
-               $editIcon   = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2.gif', 'width="11" height="12"').' title="Edit Shortcut" alt=""';
-               $deleteIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/garbage.gif', 'width="11" height="12"').' title="Delete Shortcut" alt="" />';
+               $shortcutGroup  = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcutGroup',1);
+               $shortcutEdit   = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcutEdit',1);
+               $shortcutDelete = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcutDelete',1);
+                               
+               $groupIcon  = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/sysf.gif', 'width="18" height="16"').' title="'.$shortcutGroup.'" alt="'.$shortcutGroup.'" />';
+               $editIcon   = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2.gif', 'width="11" height="12"').' title="'.$shortcutEdit.'" alt="'.$shortcutEdit.'"';
+               $deleteIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/garbage.gif', 'width="11" height="12"').' title="'.$shortcutDelete.'" alt="'.$shortcutDelete.'" />';
 
                $shortcutMenu[] = '<table border="0" cellspacing="0" cellpadding="0" class="shortcut-list">';
 
@@ -192,7 +197,8 @@ class ShortcutMenu implements backend_toolbarItem {
 
                if(count($shortcutMenu) == 1) {
                                //no shortcuts added yet, show a small help message how to add shortcuts
-                       $icon  = '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="shortcut icon" alt="" />';
+                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.shortcut',1);
+                       $icon  = '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$title.'" alt="'.$title.'" />';
                        $label = str_replace('%icon%', $icon, $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:shortcutDescription'));
 
                        $shortcutMenu[] = '<tr><td style="padding:1px 2px; color: #838383;">'.$label.'</td></tr>';
index c086929..8be6eae 100755 (executable)
@@ -28,6 +28,10 @@ Do you want to continue WITHOUT saving?</label>
                        <label index="labels._CONTROL_">Control</label>
                        <label index="labels._PATH_">Path</label>
                        <label index="labels._LOCALIZATION_">Localization</label>
+                       <label index="labels.shortcut">Shortcut</label>         
+                       <label index="labels.shortcutGroup">Shortcut Group</label>      
+                       <label index="labels.shortcutEdit">Edit Shortcut</label>        
+                       <label index="labels.shortcutDelete">Delete Shortcut</label>            
                        <label index="labels.setFields">Set fields</label>
                        <label index="labels.search">Search</label>
                        <label index="labels.author">Author:</label>