Form mode label translation is overriding interface translation with same label

Created on 16 April 2024, 12 months ago
Updated 4 September 2024, 7 months ago

I have a custom form mode for user registrations called "Register". The form mode label is translated into French "S'inscrire".
These are exported to config correctly.
The main config file contains the full form mode manager config, and thus also the "label: Register".
The French config file contains, as expected, only the translated label: label: "S'inscrire"

I also have a custom twig file that shows user info, login links, logout links, dashboard links and so on...
It contains this piece of twig code:

<a href="{{ path('user.register') }}" title="{{ "Register"|t }}">{{ "Register"|t }}</a>

The string "Register" is translated via Drupal interface translation to "CrΓ©er un compte" in French.

If I deploy my project to live, a config import is done and the translation for the form mode manager label is imported correctly.
But, my custom interface translation for the twig string is overridden with the form mode manager config translation...

I have managed to "fix" my issue by renaming/retranslating the form mode manager label. This is acceptable within this project.
But I did not expect that importing config translations would override interface translations...
Is this expected behaviour?

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium weseze

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @weseze
  • πŸ‡§πŸ‡ͺBelgium weseze
  • πŸ‡§πŸ‡ͺBelgium weseze

    Just ran into this issue again.
    Form mode name "Shipping", translations for it exported to config.
    After deploying to staging, the interface translations for "Shipping", used by commerce_shipping module, were overwriten by the config imports from form_mode_manager.

    This is really really annoying. How can I help get this fixed?

  • πŸ‡§πŸ‡ͺBelgium weseze

    The reverse issue also exist.
    If I make an interface translation (locally) for one of the labels of the form modes and do a config export, the label for the form mode gets exported from the interface translation... very weird.

Production build 0.71.5 2024