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

Dynamically import translations as json files and fixing tests #400

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

r59q
Copy link
Collaborator

@r59q r59q commented Nov 29, 2023

This is the PR associated with the proposal #398

We suggest moving to svelte-i18n for translations (MIT licence). This will enable:

  • A move to a JSON file for each language along with a standard approach to supporting parameters in strings that >platforms like Crowdin understand (ICU message syntax)
  • Bundle splitting so each additional language doesn’t bloat the app size
  • Low impact on the existing code - only initialization code and one translation usage needs to change

This is still a draft, a change to the test suite is needed before merging

Update

It is however ready to be merged, but to the top-level await some of the tests have to be temporarily skipped in the suite, unfortunately. See #407 for more info. practically speaking, the test coverage of these tests have not been changed for a while (microbit-interfacing). So hopefully the down-time of these tests won't result in any issues before we can fix them.

microbit-robert and others added 2 commits November 28, 2023 11:39
This allows us to add translations to the app without increasing bundle
size
Dynamically import translations as json files
@r59q r59q changed the title Dynamically import translations as json files Dynamically import translations as json files and fixing tests Nov 29, 2023
@r59q r59q mentioned this pull request Dec 4, 2023
@r59q r59q marked this pull request as ready for review December 4, 2023 22:10
@r59q r59q requested a review from Karlo-Emilo December 4, 2023 22:21
@Karlo-Emilo Karlo-Emilo merged commit 5f7c11e into main Dec 5, 2023
3 checks passed
@Karlo-Emilo Karlo-Emilo deleted the json-translations branch December 5, 2023 07:43
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.

None yet

3 participants