Problem/Motivation
The type of views_field.mapping.alter.mapping.text is text and text is translatable. The value is a Twig inline template and is passed to Twig engine, see PluginBase::viewsTokenReplace(). But Twig has its own way to translate strings inside a template by using the t/trans filter and such a template should not be translatable.
If the view was shipped as module config, Locale will expose it in the translation UI. Other modules will send such strings to automated translation and would break the view on other languages.
Steps to reproduce
See the MR's test.
Proposed resolution
Set the schema from text to string
Remaining tasks
Decide how to handle the potential BC break: e.g., existing views set static text there, expecting to be translated
User interface changes
Introduced terminology
N/A
API changes
None.
Data model changes
Release notes snippet
Issue fork drupal-3637680
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
claudiu.cristeaComment #4
claudiu.cristeaI've added a test to prove the issue.
Comment #5
claudiu.cristeaFor now, 'path' is excluded because of #3008138: The link url in views must be translatable. We may want a followup for path
Comment #6
gábor hojtsyWe discussed this issue in slack too. Looks good to me.
I think this needs a change record and release notes. Not much else we can do about it IMHO.