[TASK] Fix hardcoded titles in FlexFormContainerContainer 38/43238/7
authorMathias Brodala <mbrodala@pagemachine.de>
Sat, 12 Sep 2015 12:54:12 +0000 (14:54 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Sat, 12 Sep 2015 17:42:33 +0000 (19:42 +0200)
Resolves: #69719
Releases: master
Change-Id: I45528248bf52bf516b925f0dd65deb072f9c3e53
Reviewed-on: http://review.typo3.org/43238
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Form/Container/FlexFormContainerContainer.php
typo3/sysext/lang/locallang_core.xlf

index 5e87908..130cd83 100644 (file)
@@ -14,11 +14,11 @@ namespace TYPO3\CMS\Backend\Form\Container;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Lang\LanguageService;
 
 /**
  * Flex form container implementation
@@ -68,10 +68,8 @@ class FlexFormContainerContainer extends AbstractContainer {
                $userHasAccessToDefaultLanguage = $this->getBackendUserAuthentication()->checkLanguageAccess(0);
                if ($userHasAccessToDefaultLanguage) {
                        $moveAndDeleteContent[] = '<div class="pull-right">';
-                       // @todo: hardcoded title ...
-                       $moveAndDeleteContent[] = '<span title="Drag to Move" class="t3-js-sortable-handle">' . $iconFactory->getIcon('actions-move-move', Icon::SIZE_SMALL) . '</span>';
-                       // @todo: hardcoded title ...
-                       $moveAndDeleteContent[] = '<span title="Delete" class="t3-js-delete">' . $iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</span>';
+                       $moveAndDeleteContent[] = '<span title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:sortable.dragmove', TRUE) . '" class="t3-js-sortable-handle">' . $iconFactory->getIcon('actions-move-move', Icon::SIZE_SMALL) . '</span>';
+                       $moveAndDeleteContent[] = '<span title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" class="t3-js-delete">' . $iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</span>';
                        $moveAndDeleteContent[] = '</div>';
                }
 
@@ -119,4 +117,11 @@ class FlexFormContainerContainer extends AbstractContainer {
                return $GLOBALS['BE_USER'];
        }
 
+       /**
+        * @return LanguageService
+        */
+       protected function getLanguageService() {
+               return $GLOBALS['LANG'];
+       }
+
 }
index 56b9e7f..d24eccb 100644 (file)
@@ -1009,6 +1009,9 @@ Would you like to save now in order to refresh the display?</source>
                        <trans-unit id="cm.allowedFileExtensions">
                                <source>Allowed file extensions:</source>
                        </trans-unit>
+                       <trans-unit id="sortable.dragmove">
+                               <source>Drag to move</source>
+                       </trans-unit>
                        <trans-unit id="tree.defaultPageTitle">
                                <source>[Default Title]</source>
                        </trans-unit>