Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

use proper locallang_core.xlf file for TYPO3 8.7 #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Classes/View/AdministrationModuleFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class AdministrationModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFun
*/
public function __construct()
{
$typo3VersionArray = VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version());
$this->typo3VersionMain = $typo3VersionArray['version_main'];
$GLOBALS['LANG']->includeLLfile('EXT:realurl/Resources/Private/Language/locallang_info_module.xml');
}

Expand All @@ -77,13 +79,18 @@ public function __construct()
*/
public function modMenu()
{
$languageFile = 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf';
if ($this->typo3VersionMain < 8) {
$languageFile = 'LLL:EXT:lang/locallang_core.xlf';
}

$modMenu = array(
'depth' => array(
0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_0'),
1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_1'),
2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_2'),
3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_3'),
99 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_infi'),
0 => $GLOBALS['LANG']->sL($languageFile . ':labels.depth_0'),
1 => $GLOBALS['LANG']->sL($languageFile . ':labels.depth_1'),
2 => $GLOBALS['LANG']->sL($languageFile . ':labels.depth_2'),
3 => $GLOBALS['LANG']->sL($languageFile . ':labels.depth_3'),
99 => $GLOBALS['LANG']->sL($languageFile . ':labels.depth_infi'),
),
'type' => array(
'pathcache' => 'ID-to-path mapping',
Expand All @@ -108,9 +115,6 @@ public function modMenu()
*/
public function main()
{
$typo3VersionArray = VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version());
$this->typo3VersionMain = $typo3VersionArray['version_main'];

if ($this->typo3VersionMain > 6) {
$this->iconFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconFactory');
}
Expand Down