Bug #86202
closedpreviousButtonLabel and nextButtonLabel not translatable for a specific form
100%
Description
I tried several translation key combinations to translate the previousButtonLabel and nextButtonLabel only for a specific form definition, but it seems this is currently not possible.
What does work (sets label for every form):
<trans-unit id="element.SummaryPage.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit>
What doesn't work:
<trans-unit id="<form-identifier>.element.SummaryPage.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit> <trans-unit id="element.<form-identifier>.SummaryPage.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit> <trans-unit id="element.SummaryPage.<form-identifier>.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit> <trans-unit id="element.<form-identifier>.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit>
I would have expected to translate these the same as the submitButtonLabel:
<trans-unit id="element.<form-identifier>.renderingOptions.submitButtonLabel"> <source>Send message</source> </trans-unit>
(the order of this translation key seems odd anyway, as the form identifier is the second part here, contrary to prepending it to keys for field labels like <form-identifier>.element.<element-name>.properties.label
)
Is this a missing feature or do I use a wrong translation key?
Updated by Sebastian Klein about 6 years ago
Okay, it is possible to translate previousButtonLabel
and nextButtonLabel
for specific forms, as long as you use the identifiers of the included pages and summarypages:
<trans-unit id="<form-identifier>.element.<element-identifier>.renderingOptions.nextButtonLabel"> <source>next</source> </trans-unit> <trans-unit id="element.<element-identifier>.renderingOptions.previousButtonLabel"> <source>back</source> </trans-unit>
Still had no luck to successfully combine element-type and form-identifier. But this solution is flexible enough.