Skip to content
Snippets Groups Projects
Commit 2121230c authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Make compatibility to 8LTS on locallang paths

parent 224b1105
No related branches found
No related tags found
1 merge request!12Feature upgrade to9 lts
......@@ -34,6 +34,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Extbase\Mvc\Request;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
......@@ -89,12 +90,18 @@ class BackendService {
/** @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-refresh', Icon::SIZE_SMALL));
......
......@@ -9,8 +9,14 @@
</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>
<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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment