Fixed bug #11659: Hardcoded labels in backend.php and alt_menu.php
authorFrancois Suter <francois.suter@typo3.org>
Tue, 18 Aug 2009 12:49:48 +0000 (12:49 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Tue, 18 Aug 2009 12:49:48 +0000 (12:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5799 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_menu.php
typo3/backend.php
typo3/sysext/lang/locallang_misc.xml

index e68de63..7f648b9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Follow-up to #11373, #11379, #11408: Removed unnecessary use of second parameter in calls to $GLOBALS['LANG']->getLL()
        * Code cleanup #11745: Class tx_tstemplateinfo misses phpdoc declaration and SVN Id keyword placeholder
+       * Fixed bug #11659: Hardcoded labels in backend.php and alt_menu.php (Thanks to Christopher Stelmaszyk)
 
 2009-08-14  Rupert Germann  <rupi@gmx.li>
 
index 0be0f76..a502437 100644 (file)
@@ -180,11 +180,13 @@ class SC_alt_menu {
 
                        // superuser mode
                if($BE_USER->user['ses_backuserid']) {
-                       $username = '<p id="username" class="typo3-red-background">[SU: '.htmlspecialchars($BE_USER->user['username']).']</p>';
+                       $username = '<p id="username" class="typo3-red-background">[' .
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:switchtousershort') . ' ' .
+                               htmlspecialchars($BE_USER->user['username']) . ']</p>';
                } else {
-                       $username = '<p id="username">['.htmlspecialchars($BE_USER->user['username']).']</p>';
+                       $username = '<p id="username">[' . htmlspecialchars($BE_USER->user['username']) . ']</p>';
                }
-                       // Printing bottons (logout button)
+                       // Printing buttons (logout button)
                $this->content.='
 
 
index bd45368..0327270 100644 (file)
@@ -281,7 +281,7 @@ class TYPO3backend {
        }
 
        /**
-        * gets the label of the currently loged in BE user
+        * Gets the label of the BE user currently logged in
         *
         * @return      string          html code snippet displaying the currently logged in user
         */
@@ -312,8 +312,9 @@ class TYPO3backend {
                        // superuser mode
                if($BE_USER->user['ses_backuserid']) {
                        $username   = ' su-user">'.$icon.
-                       '<span title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:switchtouser').'">SU: </span>'.
-                       '<span>'.htmlspecialchars($label).'</span>';
+                       '<span title="' . $GLOBALS['LANG']->getLL('switchtouser') . '">' .
+                       $GLOBALS['LANG']->getLL('switchtousershort') . ' </span>' .
+                       '<span>' . htmlspecialchars($label) . '</span>';
                }
 
                return '<div id="username" class="toolbar-item no-separator'.$username.'</div>';
index 705940c..2429d8e 100755 (executable)
@@ -71,6 +71,7 @@
                        <label index="synchronizeWithOriginalLanguage">Synchronize with original language</label>
                        <label index="pageTree_filter">Filter</label>
                        <label index="switchtouser">Switch to User</label>
+                       <label index="switchtousershort">SU:</label>
                </languageKey>
        </data>
 </T3locallang>