Bug #98647
closedtranslate viewhelper always shows default with extensionName and key/id
100%
Description
When using the translate viewhelper with parameters extensionName, key/id and default, instead of the translation the default value is shown, ie:
{f:translate(key: 'someKey', extensionName: 'SomeExtensionName', default: 'defaultValue')}
Actual result: defaultValue
Expected result: translation of id 'someKey' in current language
Default should only be a fallback if id 'someKey' is not defined in current and default language.
In file EXT:cms-fluid/Classes/ViewHelpers/TranslateViewHelper.php line 159-171, extensionName and key/id are transformed to 'LLL:EXT:' syntax only if default is empty.
In line 174, $value is set to id because of the missing 'LLL:'.
In line 175-179, $value is set to default.
Possible solution: Remove the check for empty default from line 159.
Updated by Oliver Bartsch over 1 year ago
- Related to Task #96473: Allow ServerRequestInterface in ext:fluid added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78789
Updated by Oliver Bartsch over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0eb81b577a41fe2e4520a7763d1ccdf03d5dc986.