Problem

While building the translation UIs for configuration entities I found out that many configuration entity properties are improperly typed, the label and text types are not well used and therefore some configuration entities cannot have a translation UI generated, because they have no translatable schema properties. (This also means these will not be exported for translation on localize.drupal.org).

The properties I noticed so far:

- contact category labels and autoreply text
- menu label (and the description is mistyped ad text, while it is actually also a label now, not multiline)
- filter format label
- user role label
- shortcut set label

Fixing these would make config_translation properly expose translation UIs for these config entities as tabs on their configuration pages (and operations in their proper listing screens).

Proposal

Apply the label type properly to these. Check with http://drupal.org/project/config_translation that it properly works (should result in translation operations on these objects work).

Files: 
CommentFileSizeAuthor
#6 1947810-string-label-types-config-schema-fix-6.patch2.65 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,288 pass(es). View
#6 1947810-diff-3-6.txt1.43 KBvijaycs85
#3 1947810-string-label-types-config-schema-fix-1.patch3.58 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,242 pass(es). View

Comments

Gábor Hojtsy’s picture

Issue tags: +sprint

Putting this on D8MI sprint since it affects the translation UI for these *immensely* (now most of these have a translation UI with access denied since no translatable properties exist).

vijaycs85’s picture

Status: Active » Needs review
Issue tags: -sprint

Updating for all in description. One additional change is comment capitalization of module name in Shortcut module, which I think fine to go with this patch.

vijaycs85’s picture

FileSize
3.58 KB
PASSED: [[SimpleTest]]: [MySQL] 53,242 pass(es). View

Updating for all in description. One additional change is comment capitalization of module name in Shortcut module, which I think fine to go with this patch.

vijaycs85’s picture

Issue tags: +sprint

Crosspost... adding tag back

Gábor Hojtsy’s picture

Status: Needs review » Needs work
+++ b/core/modules/filter/config/schema/filter.schema.ymlundefined
@@ -31,7 +31,7 @@ filter.format.*:
       type: sequence
       label: 'Roles'
       sequence:
-        - type: string
+        - type: label
           label: 'Role'

I'd be shocked if the list of roles on filter formats would be labels. They are machine names I'm sure.

+++ b/core/modules/menu/config/schema/menu.schema.ymlundefined
@@ -5,10 +5,10 @@ menu.settings:
   label: 'Menu settings'
   mapping:
     main_links:
-      type: string
+      type: label
       label: 'Main links'
     secondary_links:
-      type: string
+      type: label
       label: 'Source for secondary links'
     override_parent_selector:
       type: boolean

These are also machine names, should keep being strings, right?

+++ b/core/modules/user/config/schema/user.schema.ymlundefined
@@ -5,7 +5,7 @@ user.settings:
     admin_role:
-      type: string
+      type: l
       label: 'Administrator role'

This is a machine name too, no? Also "l" would be bugos anyway.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
1.43 KB
2.65 KB
PASSED: [[SimpleTest]]: [MySQL] 53,288 pass(es). View

Updating as per #5.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
38.7 KB
64.49 KB

Yay, this patch fixes translatability all across the modules it affects. Contact, roles, menus, etc. Example screenshots for contact with the http://drupal.org/project/config_translation module:

Screenshot_3_21_13_8_57_AM.png

and

Screenshot_3_21_13_8_58_AM.png

Prior to this patch these did not work since there were no translatable types used. The effect is the same for shortcut sets, user roles, text formats and so on. Good stuff!

Gábor Hojtsy’s picture

Add more tags relevant to the issue.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Gábor Hojtsy’s picture

Issue tags: -sprint

Thanks, this unlocked manual user interface based translations for a lot of stuff! Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.