We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
translation.json {myKey: "alert for __property.name__"}
{myKey: "alert for __property.name__"}
my code looks something like this: this.alertHeader = this.i18n.tr('myKey', {property: this.property});
this.alertHeader = this.i18n.tr('myKey', {property: this.property});
i18n.tr makes this call this.i18next.t(key, (0, _utils.assignObjectToKeys)('', fullOptions))
this.i18next.t(key, (0, _utils.assignObjectToKeys)('', fullOptions))
which flattens out a hierarchy {property: {name:'prop1", type:'string', foo:{bar:1}}} so that would end up being:
{ property.name: 'prop1', property.type: 'string', property.foo.bar: 1 }
which looks like what you would want but the i18next expects the object and not a flattened list.
checkout i18next.js
function applyReplacement(str, replacementHash, nestedKey, options) { .... // Check for recursive matches of object <code here> ... }
The text was updated successfully, but these errors were encountered:
fix(tr): fixes object flattening
2fba7fb
removes unnecessary object flattening for i18next translation call fixes issues #43 and #28
this should be fixed with the latest release. Please reopen if you still experience issues
Sorry, something went wrong.
No branches or pull requests
translation.json
{myKey: "alert for __property.name__"}
my code looks something like this:
this.alertHeader = this.i18n.tr('myKey', {property: this.property});
i18n.tr makes this call
this.i18next.t(key, (0, _utils.assignObjectToKeys)('', fullOptions))
which flattens out a hierarchy {property: {name:'prop1", type:'string', foo:{bar:1}}} so that would end up being:
which looks like what you would want but the i18next expects the object and not a flattened list.
checkout i18next.js
The text was updated successfully, but these errors were encountered: