[TASK] Streamline inline language file references 14/48914/3
authorBenni Mack <benni@typo3.org>
Tue, 12 Jul 2016 07:53:34 +0000 (09:53 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 12 Jul 2016 08:14:24 +0000 (10:14 +0200)
The inline langauge file inclusion can be done with EXT: syntax,
which is mostly used in the TYPO3 Core, but not in all of the places.

The patch streamlines the occurences within the TYPO3 Core
to use the EXT: syntax directly.

Resolves: #77052
Releases: master
Change-Id: Ifa5336968a8e4978d473f2d2a5685a35ae865799
Reviewed-on: https://review.typo3.org/48914
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php

index 589cb6e..97f2eac 100644 (file)
@@ -233,7 +233,7 @@ class FormResultCompiler
         $pageRenderer->loadExtJS();
         // Load tree stuff here
         $pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/tree.js');
-        $pageRenderer->addInlineLanguageLabelFile(ExtensionManagementUtility::extPath('lang') . 'locallang_csh_corebe.xlf', 'tcatree');
+        $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_csh_corebe.xlf', 'tcatree');
         $pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/notifications.js');
         if (ExtensionManagementUtility::isLoaded('rtehtmlarea')) {
             // This js addition is hackish ... it will always load this file even if not RTE
@@ -285,10 +285,7 @@ class FormResultCompiler
 
         $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileListLocalisation');
 
-        $pageRenderer->addInlineLanguageLabelFile(
-            \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('lang') . 'locallang_core.xlf',
-            'file_upload'
-        );
+        $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_core.xlf', 'file_upload');
         if (!empty($this->additionalInlineLanguageLabelFiles)) {
             foreach ($this->additionalInlineLanguageLabelFiles as $additionalInlineLanguageLabelFile) {
                 $pageRenderer->addInlineLanguageLabelFile($additionalInlineLanguageLabelFile);
index c5985b6..baa319d 100644 (file)
@@ -28,7 +28,6 @@ use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Resource\Utility\ListUtility;
 use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\File\ExtendedFileUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
@@ -397,20 +396,14 @@ class FileListController extends ActionController
                 }
                 ');
             $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileDelete');
-            $pageRenderer->addInlineLanguageLabelFile(
-                ExtensionManagementUtility::extPath('lang') . 'locallang_alt_doc.xlf',
-                'buttons'
-            );
+            $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_alt_doc.xlf', 'buttons');
 
             // Include DragUploader only if we have write access
             if ($this->folderObject->getStorage()->checkUserActionPermission('add', 'File')
                 && $this->folderObject->checkActionPermission('write')
             ) {
                 $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DragUploader');
-                $pageRenderer->addInlineLanguageLabelFile(
-                    ExtensionManagementUtility::extPath('lang') . 'locallang_core.xlf',
-                    'file_upload'
-                );
+                $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_core.xlf', 'file_upload');
                 $pageRenderer->addInlineLanguageLabelArray([
                     'permissions.read' => $this->getLanguageService()->getLL('read'),
                     'permissions.write' => $this->getLanguageService()->getLL('write'),
@@ -507,10 +500,7 @@ class FileListController extends ActionController
         ]);
 
         $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileDelete');
-        $pageRenderer->addInlineLanguageLabelFile(
-            ExtensionManagementUtility::extPath('lang') . 'locallang_alt_doc.xlf',
-            'buttons'
-        );
+        $pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_alt_doc.xlf', 'buttons');
     }
 
     /**
index 29b385d..fce3c05 100644 (file)
@@ -182,9 +182,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         $this->initialize();
 
         // Localization
-        $this->getPageRenderer()->addInlineLanguageLabelFile(
-            ExtensionManagementUtility::extPath('linkvalidator', 'Resources/Private/Language/Module/locallang.xlf')
-        );
+        $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf');
 
         if ($this->modTS['showCheckLinkTab'] == 1) {
             $this->updateListHtml = '<input class="btn btn-default" type="submit" name="updateLinkList" id="updateLinkList" value="' . $this->getLanguageService()->getLL('label_update') . '"/>';