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

Allow Character count hint text to be internationalised #1929

Closed
mgladdish opened this issue Aug 26, 2020 · 3 comments
Closed

Allow Character count hint text to be internationalised #1929

mgladdish opened this issue Aug 26, 2020 · 3 comments

Comments

@mgladdish
Copy link

As far as I can see, the "you have x words remaining" hint text under the TextArea on a CharacterCount is done via javscript. Unfortunately this javascript has hard-coded English text.

Ideally we should be able to parameterise all text presented to users, which would also (in our application) allow the text to be presented in any language.

Instead, to support switching languages at runtime, we're going to have to re-do the provided javascript that overwrites the content of the hint. Even the JS implementation itself is really unfriendly to be overridden as it assumes a given sentence structure rather than, say, using a StringFormat-type approach.

I presume that supporting all languages is beyond this project's remit, but surely being able to the provided assets for services in Welsh is a must-have?

@hannalaakso hannalaakso transferred this issue from alphagov/govuk-design-system Aug 26, 2020
@hannalaakso
Copy link
Member

@mgladdish Thanks for flagging this 👍 I'm closing your issue as it's a duplicate of #1681, however if there is anything you wanted to raise that isn't captured on that issue please add a comment to it.

@mgladdish
Copy link
Author

Thanks. I did search the open issues (honest!) but didn't see that duplicate.

@hannalaakso
Copy link
Member

No problem! 🙂 The issue was opened in https://github.com/alphagov/govuk-design-system so you probably searched there. https://github.com/alphagov/govuk-frontend contains the code for the styles and components that you see on the Design System website so we transferred your issue here.

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

No branches or pull requests

2 participants