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

Add internationalisation logic to lookup translation from key #2801

Closed
4 tasks
Tracked by #1708
vanitabarrett opened this issue Aug 22, 2022 · 0 comments · Fixed by #2814
Closed
4 tasks
Tracked by #1708

Add internationalisation logic to lookup translation from key #2801

vanitabarrett opened this issue Aug 22, 2022 · 0 comments · Fixed by #2814

Comments

@vanitabarrett
Copy link
Contributor

What

Write the JavaScript logic needed for the most minimal internationalisation use case, i.e: replacing a default English string with a new string in a different language. The logic will need to be able to:

  • take a translations object
  • take a translation ‘key’ and look up the relevant string in the translations object

This should not cover more complex translations, e.g: pluralisation or string interpolation.

Why

So we can begin to allow hardcoded strings in our component JS to be translated
So we have a solution for translating hardcoded strings in future component JS

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Internationalisation logic written that takes a JavaScript object of translations
  • Ability to lookup a key within that translations object, and return a string
  • Nicely handles instances where the key cannot be found in the translations object
  • Unit tests written for the above
@vanitabarrett vanitabarrett added awaiting triage Needs triaging by team javascript localisation javascript squad and removed awaiting triage Needs triaging by team labels Aug 22, 2022
@vanitabarrett vanitabarrett added this to Backlog 🗄 in Design System Sprint Board via automation Aug 22, 2022
@kellylee-gds kellylee-gds moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in Design System Sprint Board Aug 24, 2022
@querkmachine querkmachine self-assigned this Aug 26, 2022
@querkmachine querkmachine moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in Design System Sprint Board Aug 26, 2022
@querkmachine querkmachine moved this from In progress 📝 to Needs review 🔍 in Design System Sprint Board Aug 30, 2022
@querkmachine querkmachine moved this from Needs review 🔍 to Ready to release 🚀 in Design System Sprint Board Aug 30, 2022
@36degrees 36degrees added this to the [NEXT] milestone Sep 12, 2022
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in Design System Sprint Board Nov 14, 2022
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.

3 participants