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

In trans component, the trans result is wrong in some case #28

Closed
bigBear713 opened this issue May 11, 2023 · 2 comments · Fixed by #32
Closed

In trans component, the trans result is wrong in some case #28

bigBear713 opened this issue May 11, 2023 · 2 comments · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@bigBear713
Copy link
Owner

** version **: v15.1.0

When the translation string and options like this:

// translation.json
{
   "sentence": "This is {{p1}} and {{p2}}"
}

const options={
    params:{
        "p1":"{{p2}}",
        "p2": '123'
    }
};

The expected result is: This is {{p2}} and 123, and the trans result is right when using nbTrans pipe.
But It is wrong when using component and the wrong result is: This is 123 and 123

@bigBear713 bigBear713 added the bug Something isn't working label May 11, 2023
@bigBear713
Copy link
Owner Author

Because the trans string was translated once at the beginning in the component

@bigBear713 bigBear713 linked a pull request May 14, 2023 that will close this issue
@bigBear713
Copy link
Owner Author

The bug has been fixed in v16.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant