Bug #81011

EXT:form submitButtonLabel is not used

Added by Ben Robinson over 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Target version:
Start date:
2017-04-25
Due date:
% Done:

100%


Description

It is possible to enter a "Submit label" in the settings of a form which will be saved as submitButtonLabel in the YAML-file. But this value is not taken into account and the default value is always used.

backend.png View (42.9 KB) Ralf Zimmermann, 2017-06-30 09:02

frontend.png View (22.4 KB) Ralf Zimmermann, 2017-06-30 09:02


Related issues

Duplicated by TYPO3 Core - Bug #81572: Form does not use submitButtonLabel provided by the BE user in the form GUI Closed 2017-06-14
Duplicated by TYPO3 Core - Bug #82835: EXT:form submitButtonLabel not changable Closed 2017-10-20

History

#1 Updated by Riccardo De Contardi over 2 years ago

  • Target version deleted (8 LTS)

#2 Updated by Felix Nagel over 2 years ago

Try using a custom localization file, this worked for me:

<trans-unit id="element.myFormIdentifier.renderingOptions.submitButtonLabel">
    <source>Reset password</source>
</trans-unit>

Did you see the docs for the localization fallback order?

#3 Updated by Ben Robinson over 2 years ago

The editor should be able to change the submitButtonLabel in the Wizard without editing localization files. There's already an input field for this label in the wizard, but the value from this field is not used in the frontend.

I could not find information about a localization fallback order in https://docs.typo3.org/typo3cms/drafts/code.tritum.de/TYPO3.CMS/Form_Documentation/
How do you embed a custom localization file for a specific form?

#4 Updated by Bjoern Jacob about 2 years ago

  • Duplicated by Bug #81572: Form does not use submitButtonLabel provided by the BE user in the form GUI added

#5 Updated by Ralf Zimmermann about 2 years ago

I cannot confirm this.
With a fresh TYPO3 instance with TYPO3 9.0.0-dev and TYPO3 8.7.2 i can edit the submit button label within the form editor and its rendered within the frontend:

The submit button label from the form definition will be irgnored as soon as you using a custom localization file which contains a translation key for the submit button label.
Once a translation is found for the label, the value from the translation file is used instead of the value from the form definition.
You can read more about this here: https://docs.typo3.org/typo3cms/drafts/code.tritum.de/TYPO3.CMS/Form_Documentation/Concepts/Index.html#translation

#6 Updated by Ben Robinson about 2 years ago

I'm not using a custom localization. It's just the default localization of the extension that overrides the label.
I found out that the label from the form editor will be used as long as there is no website language configured.
With ...

page.config.language = de

... the label will always be "Absenden". This translation is not custom – it comes from /typo3conf/l10n/de/form/Resources/Private/Language/de.locallang.xlf

#7 Updated by Ralf Zimmermann about 2 years ago

  • Status changed from Needs Feedback to In Progress
  • Assignee changed from Ben Robinson to Ralf Zimmermann

Oh ok, i see...thanks for analysis

#8 Updated by Ralf Zimmermann about 2 years ago

  • Status changed from In Progress to Needs Feedback
  • Assignee changed from Ralf Zimmermann to Bjoern Jacob

Since we have made the frontend button labels editable in the form editor, it is a hindrance that these are contained in the localization files.
The default localization file "sysext/form/Resources/Private/Language/locallang.xlf" does not contain these translation keys but if you install a language like "German",
the following translation keys exists within "typo3conf/l10n/de/form/Resources/Private/Language/de.locallang.xlf"

            <trans-unit id="element.Form.renderingOptions.submitButtonLabel" xml:space="preserve" approved="yes">
                <source>Submit</source>
            <target state="translated">Absenden</target></trans-unit>
            <trans-unit id="element.Page.renderingOptions.nextButtonLabel" xml:space="preserve" approved="yes">
                <source>next Page</source>
            <target state="translated">nächste Seite</target></trans-unit>
            <trans-unit id="element.Page.renderingOptions.previousButtonLabel" xml:space="preserve" approved="yes">
                <source>previous Page</source>
            <target state="translated">vorherige Seite</target></trans-unit>
            <trans-unit id="element.SummaryPage.renderingOptions.nextButtonLabel" xml:space="preserve" approved="yes">
                <source>next Page</source>
            <target state="translated">nächste Seite</target></trans-unit>
            <trans-unit id="element.SummaryPage.renderingOptions.previousButtonLabel" xml:space="preserve" approved="yes">
                <source>previous Page</source>
            <target state="translated">vorherige Seite</target></trans-unit>

This make it impossible to set button labels through the form editor.
I do not know who i need to ask to remove these keys from the localizations.
Can you coordinate this?

These translation keys has to be removed within the typo3conf/l10n/de/form/Resources/Private/Language/de.locallang.xlf:

element.Form.renderingOptions.submitButtonLabel
element.Page.renderingOptions.nextButtonLabel
element.Page.renderingOptions.previousButtonLabel
element.SummaryPage.renderingOptions.nextButtonLabel
element.SummaryPage.renderingOptions.previousButtonLabel

To translate the default values for the form editor, we have to add and translate these keys within typo3conf/l10n/de/form/Resources/Private/Language/de.Database.xlf

formEditor.elements.SummaryPage.editor.previousButtonLabel.value
formEditor.elements.SummaryPage.editor.nextButtonLabel.value
formEditor.elements.Page.editor.nextButtonLabel.value
formEditor.elements.Page.editor.previousButtonLabel.value
formEditor.elements.Form.editor.submitButtonLabel.value

#9 Updated by Tobias Riesemann about 2 years ago

Are there any news about the Language-Label-Problem?

#10 Updated by Bjoern Jacob about 2 years ago

  • Sprint Focus set to Remote Sprint

I have to check this one again. AFAIC this should be fixed.

#11 Updated by Bjoern Jacob about 2 years ago

  • Assignee deleted (Bjoern Jacob)

IMHO this is not fixed. I have sent another request to the guys of the translation team.

#12 Updated by Bjoern Jacob about 2 years ago

  • Sprint Focus deleted (Remote Sprint)

#13 Updated by Tobias Riesemann almost 2 years ago

It seems that this problem is solved with TYPO3 CMS 8.7.8
In addition to the update i upgraded my own configurations in BaseSetup.yaml, FormEditorSetup.yaml.
After that the text-field for labeling the submit button in BE appeared.

#14 Updated by Riccardo De Contardi almost 2 years ago

@Tobias Riesemann Thank you for your feedback. Can we consider this issue solved, then?

#15 Updated by Samuel Heinz almost 2 years ago

Problem is still alive in TYPO3 8.7.8.
As soon as a translation file is located in "/typo3conf/l10n/" the backend settings for the submit label will be overwritten.

#16 Updated by Riccardo De Contardi almost 2 years ago

  • Project changed from TYPO3 Core to Translation Team
  • Category deleted (Form Framework)

I move this one to the "Translation Team" project as it should be just sufficient to remove some labels from the translation files (see comment 8) - feel free to revert to Core if this decision feels wrong.

#17 Updated by Xavier Perseguers almost 2 years ago

That really won't be fun to do since there's no way to do it from the UI but targeting at upcoming sprint.

#18 Updated by Xavier Perseguers almost 2 years ago

  • Target version set to Sprint November 2017

#19 Updated by Ralf Zimmermann almost 2 years ago

  • Related to Bug #82835: EXT:form submitButtonLabel not changable added

#20 Updated by Ralf Zimmermann almost 2 years ago

  • Related to deleted (Bug #82835: EXT:form submitButtonLabel not changable)

#21 Updated by Ralf Zimmermann almost 2 years ago

  • Duplicated by Bug #82835: EXT:form submitButtonLabel not changable added

#22 Updated by Maik Hagenbruch over 1 year ago

These translation keys has to be removed within the typo3conf/l10n/de/form/Resources/Private/Language/de.locallang.xlf:

element.Form.renderingOptions.submitButtonLabel
element.Page.renderingOptions.nextButtonLabel
element.Page.renderingOptions.previousButtonLabel
element.SummaryPage.renderingOptions.nextButtonLabel
element.SummaryPage.renderingOptions.previousButtonLabel

To prevent one from editing the .xlf file you may want to unset these values with typoscript:

plugin.tx_form._LOCAL_LANG.de.element {
Form {
renderingOptions.submitButtonLabel =
}
Page {
renderingOptions.nextButtonLabel =
renderingOptions.previousButtonLabel =
}
SummaryPage {
renderingOptions.nextButtonLabel =
renderingOptions.previousButtonLabel =
}
}

IMPORTANT: Do not flush the values with > this will lead to an exception when launching the form editor

#23 Updated by Xavier Perseguers about 1 year ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

No more activity on this ticket and looks like related to a Core question, not something directly related to the translation team.

Also available in: Atom PDF