Problem/Motivation
Steps to reproduce:
- Make sure you have
schema_article_typeset to "Article" - Reinstall your site with a locale different than English (e.g. German)
- Assert that
schema_article_typehas translated value i.e. "Artikel"
This happens due to metatag.metatag_tag.schema_article_type having text as a type value. That tells Drupal this is a translatable string and by default Drupal imports config translations as soon as you add a new language.
In my opinion schema_article_type/@type is not something that is different per translation.
Proposed resolution
Change the metatag.metatag_tag.schema_article_type type to string in order to make this key untransltable.
Check for the other similar cases.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3107764-2.patch | 11.41 KB | mbovan |
Comments
Comment #2
mbovan commentedThis fixes the issue for all
schema_*_typekeys.Comment #3
berdirI think there are more config schema strings that can be moved, most should be label and not text, as they don't need to multi-label elements, and others might also not need to be translated, like the published date (that needs to be a defined format, not something that varies between languages).
But this is the most obvious one and causes invalid metadata due to the default translation.
Comment #5
karens commentedThis is due to my confusion about the difference between string and text. Thanks!