#61830Localization of file references broken
Description
The LocalizationUtility from Extbase is using $GLOBALS[‘TSFE’]->sL to translate translateFileReference passed to it, but this is no longer available and thus these translations fail. Removing the FE special case and using $GLOBALS[‘LANG’] instead.
Before:
static protected function translateFileReference($key) {
if (TYPO3_MODE === 'FE') {
$value = $GLOBALS['TSFE']->sL($key);
return $value !== FALSE ? $value : NULL;
} elseif (is_object($GLOBALS['LANG'])) {
$value = $GLOBALS['LANG']->sL($key);
return $value !== '' ? $value : NULL;
} else {
return $key;
}
}
after:
static protected function translateFileReference($key) {
if (is_object($GLOBALS['LANG'])) {
$value = $GLOBALS['LANG']->sL($key);
return $value !== '' ? $value : NULL;
} else {
return $key;
}
}Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.