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

Update translations #1026

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Update translations #1026

merged 3 commits into from
Sep 6, 2024

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Sep 4, 2024

Description

In this PR, I have run the following scripts, yarn extract & yarn onesky:download, which have updated the translation files.
I've also ran yarn onesky upload to update OneSky with our latest phrases.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@dr-bizz dr-bizz requested a review from canac September 4, 2024 13:47
Copy link

github-actions bot commented Sep 4, 2024

Bundle sizes [mpdx-react]

Compared against c2b3d21

Dynamic import Size (gzipped) Diff
../src/components/Contacts/ContactFlow/DynamicContactFlow.tsx -> ./ContactFlow 60.42 KB +1.58 KB
../src/components/EditDonationModal/DynamicEditDonationModal.tsx -> ./EditDonationModal 76.67 KB +1.05 KB
../src/components/Tool/Appeal/Flow/DynamicContactFlow.tsx -> ./ContactFlow 60.42 KB +1.58 KB
../src/components/Tool/Appeal/Modals/UpdateDonationsModal/DynamicUpdateDonationsModal.tsx -> ./UpdateDonationsModal 104.92 KB added

Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add any of these new languages to src/lib/data/languages.ts?

@dr-bizz
Copy link
Contributor Author

dr-bizz commented Sep 4, 2024

That's a good point. I will check

@dr-bizz dr-bizz requested a review from canac September 6, 2024 12:35
src/lib/i18n.ts Outdated
@@ -10,7 +10,18 @@ i18next
.init({
nsSeparator: false,
keySeparator: false,
fallbackLng: 'en',
// Since these languages have different translation folder names
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't look wrong, but I don't think it's necessary. Even without this configuration, if the user's language is fr-fr, i18next still seems to normalize the casing and requests fr-FR/translations.json. Have you checked that it is broken without this configuration?

This configuration still seems useful to keep though since it does more than just fix the casing: 'fr-ca': ['fr-CA', 'fr-FR', 'en'],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I did, but let me double check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I think I tested it without restarting my local, which affected it.

Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and works well!

fr-CA is a little strange because the translation files seem to only contain English entries. I assume that's an issue inside of OneSky.

@dr-bizz
Copy link
Contributor Author

dr-bizz commented Sep 6, 2024

Looks great and works well!

fr-CA is a little strange because the translation files seem to only contain English entries. I assume that's an issue inside of OneSky.

Yes it is, so the fallback isn't working, but once we work out OneSky it will work.

@dr-bizz dr-bizz merged commit 5a639b1 into main Sep 6, 2024
18 checks passed
@dr-bizz dr-bizz deleted the update-translations branch September 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants