Interface translations override config translations on update

Created on 17 March 2021, almost 4 years ago
Updated 11 February 2025, 13 days ago

Problem/Motivation

When executing locale updates, or more specifically \Drupal\locale\LocaleConfigManager::updateConfigTranslations(), any existing config translations are overridden by interface translations if the source string is the same

Steps to reproduce

  1. Make sure you have an interface translation for a string that also occurs in the default language of a config object.
  2. Translate your config object string to something different than the interface translation
  3. Run \Drupal\locale\LocaleConfigManager::updateConfigTranslations() and see that your config translation is lost / overridden
๐Ÿ› Bug report
Status

Active

Version

9.4

Component

language system

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium L_VanDamme

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • achap ๐Ÿ‡ฆ๐Ÿ‡บ

    I think this should be re-opened. A number of people in the referenced ticket are still experiencing the issue described even after the fix. It is happening to me in the following scenario on Drupal 10.3

    * I have some country names translated in locale E.g. United States = ใ‚ขใƒกใƒชใ‚ซ in Japanese.
    * We display country names in a language selector. That information is stored in simple config.
    * Feedback from client was that country names should be displayed in their own language in the language selector. Translations should still exist in other contexts though.
    * Put United States for the translation of United States in the Japanese config for the language selector. You could even delete the whole config file.
    * Re-import locale like so: drush locale:import --type customized --override customized ja /app/translations/ja.po
    * Export your config. You will notice that the config has been overridden with ใ‚ขใƒกใƒชใ‚ซ

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    Drupal 9 is EOL. Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies โ†’ .

    It would help to have one issue for the discussion. Can you comment on the other issue that this is open? And update the Issue summary with the most recent steps to reproduce. Thanks

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    I can confirm this is still happening, as reported by @achap and it's a critical issue for multilanguage sites.
    Technically it might make sense to postpone this on โœจ Configuration langcode is forced to site default language Needs work but that would also mean that issue should be seen as a critical fix.

Production build 0.71.5 2024