Fixed
Project:
Forms Steps
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2019 at 09:48 UTC
Updated:
18 Sep 2026 at 16:48 UTC
Jump to comment: Most recent
E.g. in
"/src/Form/FormsStepsAlter.php", "setButtonLabel()" is using t function for labels.
The correct way is to do configuration translations marking config as translatable, see https://www.drupal.org/docs/8/api/configuration-api/configuration-schema... for more info.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
j1mb0b commentedUntil there is a decision to use configuration translations, I am presented with a blocking issue when using this module in Drupal Version 9.4.3. I am unable to use action buttons (e.g. Submit / Previous) when overriding labels.
Rather than passing variables directly to t(), use placeholders instead. After this change, my multi-step forms action buttons behave correctly.
Comment #5
mpauloI'm doing a small test on setting the labels as a translatable config, and reviewing the already committed changes.
Comment #6
mpauloI added a new MR to switch the config mapping of the labels, from the string type, to the label type, which is a shorthand to a translatable string (see docs).
From testing, I figured the config storage is aware of the site language, so passing the config value itself to the translation method wouldn't be necessary to get its localized version.
If this is the way to go, creating some tests and evaluating the need for update hooks could be the next steps.
Comment #8
mpauloMoving MR !7 to NR.
Comment #9
alexanderj commentedHi, i will review it.
Comment #10
alexanderj commentedI reviewed your changes and in my opinion I believe that your solution is in accordance with what was requested, on the question of adding tests, I don't know if the ideal would be to add it together with your MR or Create a separate Issue. so I'm going to change to RTBC, if you need additional ones in this MR, you can move to NW again.
Comment #12
nicoloye commentedIt's been a while, sorry for the delay. Merging.