-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: added fr-FR #20
Conversation
@jzu - thank you for these translations! We'll be reviewing this change and will provide an update once we've done so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzu - please take a look at the formatting failures regarding the translation files here: https://github.com/ava-labs/core-extension/actions/runs/10279108667/job/28528137098?pr=20
You can verify this locally by running yarn scanner
. Thank you!
"For your security, please create a name and password.": "Pour votre sécurité, veuillez créer un nom et un mot de passe.", | ||
"Forgot Password?": "Mot de passe oublié ?", | ||
"Forum": "Forum", | ||
"French": "Français", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should just need to add this as "French": "French",
to the english translation file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but are you sure? yarn scanner
still displays a truckload of errors (same number of lines) even after adding "French": "French",
to en/translation.json
. Same, after adding "French": "Französisch",
to de-DE/translation.json
. By the way, I was wondering about it, and with this setup a new language should be added in all existing translation files (I can do it for de, es, ru, but zh, hi, ko, ja? no way). Plus it doesn't scale: imagine 30 languages, and adding a 31st. A small redesign of this part seems in order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are correct, adding new languages will have this issue. In the past we did not have this problem since the number of supported languages was constant. We will re-consider and update the process here. Thank you for the suggestion.
In the meantime, can you please run yarn scanner
and commit the changed translation files with the new item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All translation.js
files are now updated, but I still get a humongous amount of error messages when running yarn scanner
, beginning with:
i18next-scanner: Unable to parse Trans component:
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
(...8600+ lines...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok. Cloned upstream on another machine (without fr-FR), and yarn scanner
gives the exact same errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Yes those errors you see are the scanner not being able to parse some of the typescript files. It's not ideal however despite what it looks like, it does it's job.
Description
Added the French language. The
…/fr-FR/translation.json
file has ~95% French sentences. I have tested a few menu entries, and they seem to work, but inconsistencies could appear (e.g. "Click on X", and X has a different label) even though I tried to avoid it.Changes
Added a
translation.json
, and editedmodels.ts
,useLanguages.ts
, andlocalization/init.ts
in order to have French appear in the UI.Testing
Tested in Chrome / Developer mode
Checklist for the author
Tick each of them when done or if not applicable.