You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple components with one or more <i18n> blocks, and I noticed what I think is a scoping issue (or at least not clear from the documentation).
What I see:
I load a component (ComponentA). All its translations in i18n blocks are added to the root i18n object. It has a "title" translation.
I load a second component (ComponentB). All its translations in i18n blocks are added to the root i18n object. It also has a "title" translation. Existing translations are overwritten.
ComponentA now displays the title from ComponentB.
What I expected:
I load a component (ComponentA). All its translations in i18n blocks are added to a scoped section in the root i18n object. It has a "title" translation.
I load a second component (ComponentB). All its translations in i18n blocks are added to a scoped section in the root i18n object. It also has a "title" translation, but it won't overwrite the "title" translation of ComponentA since both i18n blocks are scoped.
ComponentA and ComponentB display their own titles.
Possible solutions (feature request):
Scope i18n blocks in components by default (breaking change)
Support <i18n scoped> (my preferred solution)
In any case, I feel the documentation could be more explicit on the current behavior.
The text was updated successfully, but these errors were encountered:
I have multiple components with one or more
<i18n>
blocks, and I noticed what I think is a scoping issue (or at least not clear from the documentation).What I see:
What I expected:
Possible solutions (feature request):
<i18n scoped>
(my preferred solution)In any case, I feel the documentation could be more explicit on the current behavior.
The text was updated successfully, but these errors were encountered: