Problem/Motivation
The default configuration causes translations to be overwritten.
I had a very puzzling experience after installing this module and trying to customize the labeling of the flags, partially because I was completely unaware of a feature of Drupal core. It boiled the problem down to this:
This module comes with a few default flag configurations, one of which has as its label "Content". I wanted to change this to something like "Subscribe to content", but my site is configured to show the Dutch language, so all content gets saved as Dutch, wherever it is translatable. "Subscribe to content" is "Abonneren op inhoud" in Dutch. After applying this change, "Abonneren op inhoud" would show up everywhere it would normally say "Inhoud", which as you've probably guessed, is the translation for "Content",
Someone more familiar with the Drupal config translation may already be guessing where this is going, but I was completely unaware of this mechanism until now. Apparently, when you are changing a translatable string in a config item that is derived from a default content item (from a module's config/install directory), the locale module will load that default content, pull the translatable strings out, and assume that whatever you are supplying now is an update to the *interface translation* of that string.
Steps to reproduce
- Have a site with at least one extra language in addition to English
- Go an configure the content flag created by this module
- Change the label. Doesn't really matter what, just make sure you are saving the config item in another language than English
- Notice how the default translation for "Content" is changed
Proposed resolution
Change the labels of the default shipped flags for this module to "Subscribe to content", "Subscribe to terms" and "Subscribe to users".
Remaining tasks
- Create MR
- Review
- Merge
User interface changes
The labels of the default flags will change.
API changes
None.
Data model changes
None.
Comments
Comment #2
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commentedI believe this is a duplicate of #3272527: Overly generic labels of default flags cause problems for translated sites
Comment #3
eelkeblokHm, yes, I suppose you are right, although that issue does not seem to have a root cause. Also, I disagree this is a support request. Le's close this, though, as the other ticket has more history.