Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291936

Entity view/form mode formatter/widget settings have no translation UI

$
0
0

Problem/Motivation

Add missing configuration translation interface.

There are several pieces of information from the Entity/Field system, which may include translatable strings, but which prior to this patch are not translatable using the Config Translation UI:

a) Field settings. For instance, on a Number field, there are translatable settings for the Prefix and Suffix in the settings config. But if you go to the Translate page for the field, all you can translate is the Label and Help for the field, not the prefix/suffix.

===> This is because the schema is wrong. See #2546356: Numeric field prefix/suffix settings should be translatable. Fields are translatable along with their settings, supposedly anyway.

b) Entity view displays - field formatter settings. For instance, on #2449597: Number formatters: Make it possible to configure format_plural on the formatter level we are adding the ability to numbers to have formatPlural() type formatting, but there is no way to translate the "1 item/@count items" strings. These are stored on the entity view display config items.

c) Entity form displays - widget settings. For instance, many text fields have widget options to enter Placeholder text, and obviously this would need to be translated. These are stored on the entity form display config items.

d) Base field overrides, which seem to include labels.
==> will do this on a separate issue

The technical reason is, at least for the entity view/form display formatter/widget settings, that there is not an edit form for these things -- the config schema indicates they should be translatable, but there's no way to edit them so config translation module doesn't put up a UI for translating them either. They are settings that appear as part of the Manage Form or Manage Display pages in Field UI, but the individual fields do not have their own settings forms.

Comment #5 also looked at other config items to see if they were translatable and #8 discussed them; more issues will be open.

How to test

  1. Use core version applicable to the patch and apply the patch
  2. Configure Article node type with a boolean field, displayed in Default view mode using custom texts
  3. Enable Configuration Translation module (/admin/modules)
  4. Add at least one language (/admin/config/regional/language)
  5. Go to configuration translation page (/admin/config/regional/config-translation)
  6. Click on List button for Content view display
  7. Click on Translate button for Default view mode for Articlecontent type
  8. See what is on the configuration translation form for the ArticleDefaultview mode
  9. @todo - Add more steps for translating specific configuration

Proposed resolution

Commit patch 153 to 9.1.x , 9.0.x, 8.9.x

Remaining tasks

None

User interface changes

You'll are able to fully translate your site. Can't now.

API changes

No

Data model changes

No


Viewing all articles
Browse latest Browse all 291936

Trending Articles