Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
layout_discovery.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Oct 2018 at 07:17 UTC
Updated:
22 Nov 2018 at 09:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostI think it should be broader issue to allow define translatable properties in annotations
Comment #3
andypost\Drupal\Core\Layout\Annotation\Layoutdefines label & description as@ingroup plugin_translatablebut actually it makes it translatable as https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/transla... supposedComment #4
andypostLet's see how many tests will fail
Comment #5
andypostAlso region names needs wrapper somehow
Comment #7
andypostA bit cleaner patch
Comment #8
andypostFix test
Comment #9
andypostLooking deeper it looks like
\Drupal\Core\Plugin\Discovery\YamlDiscoveryDecoratorshould be able to detect properties that are translatableAlso reflection of properties annotations could bring overhead of yaml discovery
Comment #10
tim.plunkettFirst of all, this needs tests.
Second, this should (ideally) work.
Comment #12
andypostThere's no BC break according https://www.drupal.org/core/d8-bc-policy#public-properties because
\Drupal\Core\Layout\LayoutDefinitionhas no interfaceComment #15
andypostFix #10 s/title/label and extended tests
Comment #17
johnzzon#15 worked for me!
Comment #18
tim.plunkettThanks @andypost!
I believe breakpoint.module suffers from the same oversight, another issue should be opened for that module and any others using \Drupal\Core\Plugin\Discovery\YamlDiscovery
Comment #19
johnzzonComment #20
andypostFiled follow-up #3009291: Fix remaining untranslatable properties from YAML discovery
Comment #21
andypostAt least region names should have own translation context
I did not add "context_key" argument to
addTranslatableProperty()because it used in a strange way in\Drupal\Core\Plugin\Discovery\YamlDiscovery::getDefinitions()Comment #23
andypostAnd fixed test
Comment #24
andrewmacpherson commentedThis is an accessibility must-have. We'll need to use layout/region label/description to describe various aspects of the layout builder UI to screen reader users.
Comment #25
tim.plunkettNot sure what this has to do with accessibility, but I'll take your word for it :)
Comment #27
larowlanCommitted 1b186cf and pushed to 8.7.x. Thanks!
C/p as 090bbaea43 and pushed to 8.6.x