Closed wolfgangmm closed 4 years ago
wow, yes - i kind of felt the shadowDom issue but couldn't really put my fingers on it. That's one reason to think twice before using shadowDom - but because it's there by default doesn't mean you should use it for each and every component.
:tada: This PR is included in version 1.2.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
pb-page
sends apb-i18n-update
event when translations become available. This event was used to set the singleton translation function for the lit-html parts as well as triggerpb-i18n
to update. However, the latter requires that the translation function is already set, and because there is no guarantee in which sequence event listeners are processed, the function may still have been undefined when the event reachedpb-i18n
. Solution:pb-page
now explicitely sets the translation function singleton before it triggers the event. This way - whoever receives the event next - can be sure there's a translation function already set.The PR also addresses an issue with
pb-i18n
translations being used in the options passed topb-select
:paper-dropdown-menu
uses the text content of each item to display the current selection. But sincepb-i18n
kept the translated text in its shadow DOM, the light DOM text content was always the original, untranslated value. Solution: changepb-i18n
to not use shadow DOM. It is unnecessary for an element only containing text.