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 ability to pass translation strings into character count component via JS #2805

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

Add ability to pass translation strings into character count component via JS #2805

vanitabarrett opened this issue Aug 22, 2022 · 0 comments · Fixed by #2887
Assignees
Milestone

Comments

@vanitabarrett
Copy link
Contributor

What

Add ability for users to pass a translation object in via JavaScript (at the point of initialisation). This is an alternative method to passing translation strings via the Nunjucks macros (data-attributes).

Note: this may already have been covered by all the previous internationalisation tickets. Even if we don’t need to write additional code to get this working, we should ensure it’s tested.

Why

Some users may prefer to pass translation strings via JavaScript, or it may be better suited to their service.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • It’s possible to provide translations to the character count component via JavaScript
  • The character count component has tests which cover the ability to translate via JavaScript
  • The character count component still works if no/only some translations are passed (falls back to defaults)
  • Data attribute translations take priority over JS translations, if both provided
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