\Drupal\locale\LocaleConfigManager::updateConfigTranslations() should not remove non-existing EN translations

Created on 4 September 2019, almost 6 years ago
Updated 30 January 2023, over 2 years ago

Problem/Motivation

That method attempts to keep all config translation as well as the active configuration in sync with interface translation.

The problem is when you have EN enabled but not as the default language. That logic treats it as any other language, but it's different in a number of ways, for example that even though you can enable local EN translation, localize.drupal.org will never provide any translations for it.

Also, locale/interface translation is always EN => EN, and it implicitly assumes that is the case case for config as well, so it thinks that if there is no EN-specific translation for e.g. "Page", then it can clean up the config override as well and it will fall back to the hardcoded version. But there is no hardcoded version and your active config is e.g. DE and you need to have that EN version of it.

Proposed resolution

Completely skip locale => config sync for EN. That will change the behavior of EN overrides compared to other languages a bit. There you can e.g. translate prev/next labels to your language in one view, and then that will sync that into interface translation and then you can force it to sync that back into all your other views. That's fairly unpredictable though as it only happens in specific scenarios (enabling a module, importing translations or doing a full translation sync from localize.drupal.org)

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
LocaleΒ  β†’

Last updated 4 days ago

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.71.5 2024