Problem/Motivation
As experienced in #3206197: Change text on "settings" button, but with a much wider and critical scope I now found out that, the current config translation implementation mechanism in COOKiES affects global Drupal core localization translations and overrides all terms which are equal in core localization!
For example, when changing and translating group "Video" to "Media" in admin/structure/cookies_service_group afterwards in admin/config/regional/translate you see that the localization translation is globally changed!
I experienced this as I wondered why suddenly my Media Type "Video" was called "Media" *shocked*.
I didn't yet understand how exactly translations are processed in this project and perhaps that could be explained high level by the maintainer, but it seems incorrect.
I rated this as critical as it has a very large effect on the whole project and is completely unexpected in the scope of the project configuration.
Steps to reproduce
See above
Proposed resolution
Fix configuration / translation implementation.
Remaining tasks
- Review translation logic
- Check if this is a core issue effect or wrong API use
- Write tests
- Fix the implementation
- Release
User interface changes
None
API changes
None
Data model changes
Unclear
Comments
Comment #2
anybodyComment #3
jfeltkampOk, I checked my code in the deep what took some hours.
Now I'm pretty sure that the issue comes from core. I referenced the issues we should keep in focus.
The translated config is mixed up with UI translations in both directions.
Comment #4
anybodyThank you - any ideas how we could mitigate the risk in the meantime or work around that? Quite critical problem...
Comment #5
jfeltkampI'll set this postponed and keep watching the related issues.
Comment #6
nimoatwoodwayI think I have the same problem:
My default language is german.
When I adjust my config, e.g.
cookies.texts.ymltoEvery time I install a module or run
drush locale:check && drush locale:updatethe config get changed to this:English config file
language/en/cookies.texts.yml:Changes to this:
Already tried to completely remove the module and it's config and reinstalled it but no improvement.
What I do not understand, we have about 30 other contrib modules where this behaviour does not accour.
My current workaround, since english is not active at moment: Give the english config the german translation. My
/en/cookies.texts.ymllooks like this at moment:Does anyone have a better idea? Or we just have to wait before this get fixed in core?
Hopefully this helps anyone.
Comment #7
ericdsd commentedIt is indeed caused by a core issue, that also impacts other modules, as wbeform or views depending on the config.
Installing a module that contains installation default config (config/install folder), generates the issue.
During installation, importing those installation config behaves like a drush config:import that would consider that all active configs have the same language as the module you're installing (english). This make non-english sites or sites with english as secondary language to mess up untranslated configs, this is specifically the case with cookie module that highly relies on translated configs.
Comment #8
anybody@ericdsd: Could you please link the issue you're referring to? Or is it one of the issues marked as related?
Comment #9
jfeltkampI think this issue is the correct one.
https://www.drupal.org/project/drupal/issues/2806009
Status: Needs work
Comment #10
ericdsd commentedSorry i didn't see your comment earlier,
i talk about several related issues
https://www.drupal.org/project/drupal/issues/2806009
https://www.drupal.org/project/drupal/issues/2905295
Comment #11
anybody