Project

General

Profile

Actions

Bug #83387

closed

sysExt:form does not fully support arguments

Added by Simon Kerber over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2017-12-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
form translation argument
Complexity:
Is Regression:
Sprint Focus:

Description

$this->processTranslationChain($translationKeyChain, $language) should always take arguments.

Reproduce the bug:

Programmatically change the translation of an element (e.g. a label)

$page->setRenderingOption('translation', [
  'translationFile'=>'LLL:EXT:my_extension/Resources/Private/Language/forms.xlf',
  'arguments'=>['label'=>['LOREM']]
  ]);

Add translation in forms.xlf with %s
Example:

<trans-unit id="element.page-1.properties.label" approved="yes">
   <source>My Argument : %s</source>
</trans-unit>

Expected Result:
"My Argument : LOREM"

Actual result:
"My Argument : %s"

How to make the argument appear:

public function translateFormElementValue(RootRenderableInterface $element, array $propertyParts, FormRuntime $formRuntime) {
...
$this->processTranslationChain($translationKeyChain, $language, ['my Arguments Here'])
...
}

And the documentation is very misleading.

Actions

Also available in: Atom PDF