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

Set up internationalization infrastructure and update dependencies along the way #126

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

julienrf
Copy link
Member

@julienrf julienrf commented Feb 20, 2024

  • Update our internal dependencies
  • Set up an internationalization infrastructure based on the inlang stack
  • Add French translation
  • Document how to contribute translations
  • Rename back “XC flying potential” to “thermal quality”
  • Fix a couple of memory leak issues

@julienrf
Copy link
Member Author

Deployed on https://soarwrf1.soaringmeteo.org/v2, here is a screencast:

Screencast.from.20-02-2024.17.56.23.webm

@julienrf
Copy link
Member Author

The messages are loaded on-demand depending on the user selected language.

Currently, loading the website requires downloading 5 JavaScript files totaling 494 kB (162 kB compressed).

With this change, loading the website requires downloading 6 JavaScript files totaling 519 kB (172 kB compressed). Each language file weighs about 20 kB (7 kB compressed).

@Boran
Copy link
Contributor

Boran commented Feb 21, 2024

Excellent, I looked at the Screencast, the doc in the pull request. I cannot really say much about the code, looks clean

One thing, is the default English, or could it be inherited from the browser? People who have a French navigator probably want the site in FR.

When it is merged. I cam add a text or too in German, and ask some of out German speaking donors to contribute?

@julienrf
Copy link
Member Author

One thing, is the default English, or could it be inherited from the browser? People who have a French navigator probably want the site in FR.

When I looked at that a couple of weeks ago I thought it was a bit complicated and unreliable to auto-detect the user's preferred language, but I had another look this morning and I think something is doable, I will give it a try!

@julienrf
Copy link
Member Author

I updated the PR based on your feedback: the menu option names in French are not capitalized anymore, and we detect the user lang based on their browser configuration. I’ve redeployed it on soarwrf1.

Screenshot 2024-02-22 at 14-33-23 SoaringMeteo

@julienrf julienrf merged commit 6fd3a80 into main Feb 23, 2024
1 check passed
@julienrf julienrf deleted the internationalization branch February 23, 2024 19:20
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.

WRF domains resolution is not explicit
2 participants