cinny icon indicating copy to clipboard operation
cinny copied to clipboard

Add translation support using i18next

Open aceArt-GmbH opened this issue 2 years ago • 10 comments

Description

Minimal version of #681. Allows follow up PRs which add languages, translate components, language switcher or translator platform.

Fixes #164

Following https://locize.com/blog/react-i18next/

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings

aceArt-GmbH avatar Dec 08 '23 11:12 aceArt-GmbH

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Dec 08 '23 11:12 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

aceArt-GmbH avatar Dec 08 '23 11:12 aceArt-GmbH

@ajbura @kfiven can I get some feedback on this PR? :)

aceArt-GmbH avatar Dec 18 '23 10:12 aceArt-GmbH

@aceArt-GmbH is possible with this to translate ? i would like to provide Portuguese ( PT-PT ) translation

Hakira-Shymuy avatar Dec 18 '23 23:12 Hakira-Shymuy

@aceArt-GmbH is possible with this to translate ? i would like to provide Portuguese ( PT-PT ) translation

This is the initial part needed for translation. There are followup PRs (#1590, #1591, ...) which actually translate the keys in Cinny. So you could prepare a Portuguese translation, but as none of this is merged yet, you might have to redo some translations

aceArt-GmbH avatar Dec 19 '23 07:12 aceArt-GmbH

Hey, We were planing to add translation after next release because Cinny is undergoing major TS refactor. So if you are added translation please keep it to only.ts files as much as possible, because other stuff is going to change repeatedly.

ajbura avatar Dec 22 '23 11:12 ajbura

this PR is only the general setup, so it should be fine for merge. It would allow the refactored files to be translated

The other PRs already contain translations of js files. Merging them wouldn't hurt, as the work is already done anyways. And you can copy the keys on refactor

aceArt-GmbH avatar Dec 24 '23 13:12 aceArt-GmbH

We could include a cache bust via queryStringParams: { v: cons.version },

aceArt-GmbH avatar Jan 23 '24 14:01 aceArt-GmbH

Preview: https://1576--pr-cinny.netlify.app ⚠️ Exercise caution. Use test accounts. ⚠️

github-actions[bot] avatar Feb 19 '24 07:02 github-actions[bot]

Rebased and updated dependencies. So this is once again mergable

aceArt-GmbH avatar Feb 19 '24 07:02 aceArt-GmbH

Everything looks good to me.

I think we should also add language switcher in user settings so people can switch language of their choice without depending on system-language.

If you are fine with it, I would leave this to someone else and a separate PR

aceArt-GmbH avatar Aug 05 '24 08:08 aceArt-GmbH

Ok I will probably add it in another PR. Sorry for the review stuck so long behind refactor.

Thanks for working on this!

ajbura avatar Aug 14 '24 13:08 ajbura