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

Expand internationalisation logic to add string interpolation feature #2700

Closed
2 tasks done
Tracked by #1708
vanitabarrett opened this issue Jul 15, 2022 · 0 comments · Fixed by #2822
Closed
2 tasks done
Tracked by #1708

Expand internationalisation logic to add string interpolation feature #2700

vanitabarrett opened this issue Jul 15, 2022 · 0 comments · Fixed by #2822
Assignees
Milestone

Comments

@vanitabarrett
Copy link
Contributor

vanitabarrett commented Jul 15, 2022

What

In some components, we'll need to be able to insert a dynamic string or value inside a translated string, e.g: "You have [x] characters remaining". We need to give users a way to pass us a string and indicate where the value should go, e.g: You have %{count} character remaining

Expand the existing internationalisation logic to handle this kind of string interpolation.

Why

We cannot hardcode where in the string that value will sit, because it will be different for different languages.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Internationalisation logic has been expanded to handle string interpolation
  • Unit tests added for new string interpolation logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants