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.

Command icon Show commands

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

StryKaizer created an issue. See original summary.

j1mb0b made their first commit to this issue’s fork.

j1mb0b’s picture

Until 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.

mpaulo’s picture

Assigned: Unassigned » mpaulo

I'm doing a small test on setting the labels as a translatable config, and reviewing the already committed changes.

mpaulo’s picture

Status: Active » Needs work

I 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.

mpaulo’s picture

Status: Needs work » Needs review

Moving MR !7 to NR.

alexanderj’s picture

Assigned: mpaulo » alexanderj

Hi, i will review it.

alexanderj’s picture

Assigned: alexanderj » Unassigned
Status: Needs review » Reviewed & tested by the community

I 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.

nicoloye made their first commit to this issue’s fork.

nicoloye’s picture

Status: Reviewed & tested by the community » Fixed

It's been a while, sorry for the delay. Merging.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • nicoloye committed 6cd9afee on 8.x-1.x authored by mpaulo
    fix: #3092441 Use config translation instead of t function for...