Bug #61830
closedLocalization of file references broken
0%
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; } }
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32950
Updated by Markus Klein about 10 years ago
What am I missing? Why should $GLOBALS['TSFE']->sL() not be available?
Updated by Franz Koch about 10 years ago
argh, sorry, my bad. I should have slept instead of working until 5am. I was working on an eID script that triggers Extbase and even though I had set the language to "de" labels with file references did not get translated. Then I went in for a debug session (half asleep) and tested and searched bullshit which made me think ->sL is not available/working anymore. And after removing the 'FE' path from the TranslationUtility and using $GLOBALS['LANG'] the labels where correctly translated.
So there seems to be some other issue in my eID bootstrap - sorry for the noise.
Can somebody please close this thing?
Updated by Markus Klein about 10 years ago
- Status changed from Under Review to Closed
- Target version deleted (
next-patchlevel)