Skip to content
New issue

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

var replacement not working with "returnObjectTrees" option #69

Closed
Loda opened this issue Jan 22, 2013 · 3 comments
Closed

var replacement not working with "returnObjectTrees" option #69

Loda opened this issue Jan 22, 2013 · 3 comments

Comments

@Loda
Copy link

Loda commented Jan 22, 2013

always replace with value from FIRST call.

app.get('/debug', function(req, res) {

    var ret = "";
    var eol = "<br>"; var eol2 = eol + eol;
    var replace_A = {user:"user A", lng:'EN', returnObjectTrees:true};
    var replace_B = {user:"user B", lng:'ES', returnObjectTrees:true};
    var replace_C = {returnObjectTrees:true};
    var node = "email.content";
    //"content": {"t02": "Hi __user__!", .... },

    ret += "DEMO i18next returnObjectTrees always use 1st replaceValue" + eol;
    ret += "node : " + node + eol2;

    ret += "replace_A : " + JSON.stringify(replace_A) + eol;
    ret += "A : " + JSON.stringify(i18next.t(node,replace_A)) + eol2; // "hi user A"

    ret += "replace_B : " + JSON.stringify(replace_B) + eol;
    ret += "B : " + JSON.stringify(i18next.t(node,replace_B)) + eol2; // "hi user A"

    ret += "replace_C : " + JSON.stringify(replace_C) + eol2; 
    ret += "C: " + JSON.stringify(i18next.t(node,replace_C)) + eol2; // "hi user A"

    res.send(ret);
});
@jamuhl
Copy link
Member

jamuhl commented Jan 22, 2013

Strange issue...will have a look asap.

@jamuhl
Copy link
Member

jamuhl commented Feb 11, 2013

will be fixed in version 1.5.11 published end of this week.

@jamuhl jamuhl closed this as completed Feb 11, 2013
@Loda
Copy link
Author

Loda commented Feb 12, 2013

thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants