- Issue created by @Chris64
In a label '
instead of ':
Views : filtrer par une vue d'entité référencée
french translation of
Views: Filter by an entity reference view
There is a double Html::escape and &
is changed in &
.
1) The first in lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
in function fieldSettingsForm
,
foreach (array_keys($selection_plugins) as $selection_group_id) {
// We only display base plugins (e.g. 'default', 'views', ...) and not
// entity type specific plugins (e.g. 'default:node', 'default:user',
// ...).
if (array_key_exists($selection_group_id, $selection_plugins[$selection_group_id])) {
$handlers_options[$selection_group_id] = Html::escape($selection_plugins[$selection_group_id][$selection_group_id]['label']);
}
elseif (array_key_exists($selection_group_id . ':' . $this->getSetting('target_type'), $selection_plugins[$selection_group_id])) {
$selection_group_plugin = $selection_group_id . ':' . $this->getSetting('target_type');
$handlers_options[$selection_group_plugin] = Html::escape($selection_plugins[$selection_group_id][$selection_group_plugin]['base_plugin_label']);
}
}
With two lines with Html::escape.
2) The second in lib/Drupal/Core/Template/TwigExtension.php
in function escapeFilter
,
if (isset($return)) {
if ($autoescape && $return instanceof MarkupInterface) {
return $return;
}
// Drupal only supports the HTML escaping strategy, so provide a
// fallback for other strategies.
if ($strategy == 'html') {
return Html::escape($return);
}
It's not a translation problem since the change of the original label produce the same problem.
- Use an other language like french.
- Create a field of type Entity Reference Revisions.
- Edit the field.
- Into the form Reference type>Reference method see the translation of
Views: Filter by an entity reference view
In fact, put an apostrophe ' in a translation of a label of this form.
Other similarly case:
- Add the module paragraph.
You should have a new enter in the form: Default
.
- Put a ' in its translation.
Active
9.5
Last updated