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

Localise the HTML reporter interface #1117

Closed
platinumazure opened this issue Mar 20, 2017 · 8 comments
Closed

Localise the HTML reporter interface #1117

platinumazure opened this issue Mar 20, 2017 · 8 comments
Labels
Component: HTML Reporter Status: Declined Type: Enhancement New idea or feature request. Type: Meta Seek input from maintainers and contributors.

Comments

@platinumazure
Copy link
Contributor

(Ditching the issue template since this is more of a meta-issue.)

Is there any interest in internationalizing and possibly localizing QUnit for other locales?

I definitely don't think this should be higher priority than any current initiatives, but I just wanted to see if it might be something that could go on the project roadmap.

Possible steps for this:

  • Integrate Globalize.js or similar, ensuring it builds for HTML and Node runners
  • i18n for HTML runner, Node runner (done in incremental PRs)
  • Establish contribution and review process for l10n contributions for different languages
@leobalter
Copy link
Member

I believe this is out of our scope for QUnit, as long we have a good exposed API.

The js-reporter integration should allow us to have localized versions for the reporters.


We can also discuss localizing the api docs, that would be great too.

@trentmwillis
Copy link
Member

How far can folks get by just letting the browser translate? I agree that localization is great (especially from an accessibility standpoint), but the overhead of properly supporting it is quite great.

@leobalter
Copy link
Member

How far can folks get by just letting the browser translate?

pretty bad, I can speak on my own experience.

Something I believe we might work on is bringing translations to the api docs, that's where it most shines with users and I believe the current jekyll/markdown PR will help a lot there.

@Krinkle Krinkle added the Type: Meta Seek input from maintainers and contributors. label Apr 18, 2017
@viniciussbs
Copy link

The js-reporter integration should allow us to have localized versions for the reporters.

Could you point me to some resource about how to achieve that?

@trentmwillis
Copy link
Member

@viniciussbs sorry for the delay. I think @leobalter's idea would be to add additional reporters in this repo: https://github.com/js-reporters/js-reporters that have their output localized.

@viniciussbs
Copy link

That makes sense. Thanks!

@Krinkle Krinkle changed the title i18n/l10n? Localise the HTML reporter interface Aug 24, 2020
@Krinkle
Copy link
Member

Krinkle commented Aug 24, 2020

Rough idea or strawman proposal:

  • Format: Move localised strings to a JSON file per language using the Banana format.
  • Contribution: Use translatewiki.net for taking contributing and reviewing translations. They will semi-automatically push pull requests for us to merge.
  • Linting: banana-checker.
  • Processing: (TODO) Decide which JS library to use for processing localisation strings (pluralisation, number formatting, message placeholders, etc.). Possibly Globalize, or Banana. Or perhaps native Intl in browsers captures the bare minimum we need for pluralisation and number formatting? That'd be neat. For QUnit I think we can afford to only support the latest browsers for new features. (Acknowleding that it's unfortuate that localisation is going to be a "new" feature.)

@Krinkle Krinkle added Type: Enhancement New idea or feature request. help welcome and removed Type: Meta Seek input from maintainers and contributors. labels Apr 17, 2022
@Krinkle Krinkle added Type: Meta Seek input from maintainers and contributors. and removed help welcome labels May 29, 2023
@Krinkle
Copy link
Member

Krinkle commented May 29, 2023

I remain open to this in the long-term, however I can't prioritise it enough to work on it myself, and there hasn't been much interest over the years from the community.

What I propose is that we focus on making the HTML Reporter as small and separate as possible (#1118). This would open the door for anyone in the wider community to create localised versions of it through a plugin. The plugin would essentially consist of a copy of the then-small reporters/html.js file, creating localised versions of it in some way, and offering them up for others to use. E.g. you would include qunit.js + qunit-reporter-html-i18n/nl.js, where nl.js would define and initialise the Dutch (nl) version of the reporter.

I'll close this for now, but if someone is interested in picking this up and encountering an obstacle of sorts, feel free to file an issue here or chat with us anytime!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: HTML Reporter Status: Declined Type: Enhancement New idea or feature request. Type: Meta Seek input from maintainers and contributors.
Development

No branches or pull requests

5 participants