redash icon indicating copy to clipboard operation
redash copied to clipboard

add i18n support

Open gaecoli opened this issue 1 year ago • 10 comments

What type of PR is this?

  • [ ] Refactor
  • [x] Feature
  • [ ] Bug Fix
  • [ ] New Query Runner (Data Source)
  • [ ] New Alert Destination
  • [ ] Other

Description

How is this tested?

  • [ ] Unit tests (pytest, jest)
  • [ ] E2E Tests (Cypress)
  • [ ] Manually
  • [ ] N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

gaecoli avatar Apr 26 '23 03:04 gaecoli

I add i18n module but i need help to translate English, Chinese and French so on. So i need help language json file.

gaecoli avatar Apr 26 '23 03:04 gaecoli

If someone support language file, the language pack switching function on the UI should be added later, and the js-cookie package should be used to record the language pack used last time.

gaecoli avatar Apr 26 '23 04:04 gaecoli

I can translate to Portuguese :) Is it gonna be possible to integrate to services like https://hosted.weblate.org/projects/nekox/#languages?

lucasfcnunes avatar Apr 29 '23 12:04 lucasfcnunes

I can translate to Portuguese :) Is it gonna be possible to integrate to services like https://hosted.weblate.org/projects/nekox/#languages?

Yes

gaecoli avatar May 05 '23 07:05 gaecoli

Btw @gaecoli how are you doing the string extraction? Is it manually in this PR for now and still needs to be configured?

gabrieldutra avatar May 09 '23 13:05 gabrieldutra

Btw @gaecoli how are you doing the string extraction? Is it manually in this PR for now and still needs to be configured?

There is no good idea for this, for me it can only be added manually.

gaecoli avatar May 10 '23 01:05 gaecoli

There is no good idea for this, for me it can only be added manually.

Sure, adding something like https://www.i18next.com/how-to/extracting-translations#2-using-an-extraction-tool to either automate the English strings extraction, or to have yarn i18n:extract and yarn i18n:check scripts (the later to be executed on CI)

I haven't used react-i18next myself, so I don't really know if that's required

gabrieldutra avatar May 11 '23 12:05 gabrieldutra

@gabrieldutra Hello, I would like to ask, what should I do after I modify the source code, so that I can achieve the same code style as the original? Which front-end commands should I run?

gaecoli avatar Jun 07 '23 09:06 gaecoli

I could help translating to Chinese. How could I contribute? Another open source project Sentry (https://github.com/getsentry/sentry) also written in Python & React uses transifex (https://explore.transifex.com/getsentry/sentry/) to translate.

myonlylonely avatar Aug 18 '23 14:08 myonlylonely

@gaecoli hey, any interest in continuing this PR? I think we need to split zh.json into the simplified/traditional Chinese format, as well as disabling i18n by default for now until we have more translations in (which we should open a separate issue for, I think).

We also need to merge master in + resolve conflicts in the yarn lock file.

guidopetri avatar Oct 28 '23 22:10 guidopetri