From 9187c52eaf96e6bceb9e3742e81d11fd04a0b795 Mon Sep 17 00:00:00 2001 From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de> Date: Tue, 29 Jan 2019 11:27:00 +0100 Subject: [PATCH] [BUGFIX] Make compatibility to 8LTS on locallang paths --- Classes/Controller/BackendController.php | 8 +++++++- Resources/Private/Layouts/Backend.html | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index ed2080d..f379f2c 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -219,12 +219,18 @@ class BackendController extends ActionController { /** @var IconFactory $iconFactory */ $iconFactory = GeneralUtility::makeInstance(IconFactory::class); + if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) { + $locallangPath = 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:'; + } else { + $locallangPath = 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:'; + } + // Refresh $refreshButton = $buttonBar->makeLinkButton() ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI')) ->setTitle( LocalizationUtility::translate( - 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.reload' + $locallangPath . 'labels.reload' ) ) ->setIcon($iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL)); diff --git a/Resources/Private/Layouts/Backend.html b/Resources/Private/Layouts/Backend.html index f7ba56b..64e0cc2 100644 --- a/Resources/Private/Layouts/Backend.html +++ b/Resources/Private/Layouts/Backend.html @@ -19,7 +19,16 @@ </f:for> </div> <div class="module-docheader-bar-column-right"> - <span class="typo3-docheader-pagePath"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw></span> + <span class="typo3-docheader-pagePath"> + <f:if condition="{typo3Version} < 9000000"> + <f:then> + <f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw> + </f:then> + <f:else> + <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw> + </f:else> + </f:if> + </span> <f:format.raw>{docHeader.metaInformation.recordInformation}</f:format.raw> </div> </div> -- GitLab