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
If the dot format and the nested format are mixed, a translation key in dot format is ignored if there is a nested block with a prefix of the translation key.
swallows all "i18n.fruits" translations. Only the key "i18n.fruits.cherry" is translated.
Expected behavior
If the dot format and the nested format are combined, the translation keys should be merged.
How do you think that we should fix this?
In the getValue method of the TranslateDefaultParser the target variable is set to the nested object whose key is a prefix of the translation key. Thus the keys of the previous target (initially the complete json file) are ignored. One option here would be to merge the matching keys of the previous target.
Current behavior
If the dot format and the nested format are mixed, a translation key in dot format is ignored if there is a nested block with a prefix of the translation key.
In this example
the nested block
swallows all
"i18n.fruits"
translations. Only the key"i18n.fruits.cherry"
is translated.Expected behavior
If the dot format and the nested format are combined, the translation keys should be merged.
How do you think that we should fix this?
In the
getValue
method of theTranslateDefaultParser
the target variable is set to the nested object whose key is a prefix of the translation key. Thus the keys of the previous target (initially the complete json file) are ignored. One option here would be to merge the matching keys of the previous target.Here is a suggestion for the complete adapted
getValue
method (v15.0.0):The text was updated successfully, but these errors were encountered: