-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add lazy loading of lang files #1310
Conversation
This pull request is deployed at test.editor.opencast.org/1310/2024-04-04_07-29-29/ . |
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.
Works. Can't really confirm whether this fixes the issue with languages not loading sometimes as I cannot consistently reproduce it, but at the very least it does not break anything obvious :D
That being said, does renaming the locales break our crowdin workflow?
I missed that the locales.json is generated automatically; this also resolves the issues of populating the array. I will change that. |
This pull request is deployed at test.editor.opencast.org/1310/2024-04-04_11-21-29/ . |
I changed how the crowdin translation array/map is generated by replacing the |
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.
Can't really test this, but in general this looks solid to me (if maybe a little convoluted, but that's more i18ns fault than anything).
This pull request is deployed at test.editor.opencast.org/1310/2024-04-08_18-20-40/ . |
I changed the script path to use the absolute path with $GITHUB_WORKFLOW because the action uses a working directory. |
This pull request has conflicts ☹ |
ed33b4e
to
9c476b5
Compare
This pull request is deployed at test.editor.opencast.org/1310/2024-04-16_14-20-21/ . |
Only the currently used language is loaded instead of all language files from the beginning. A new lazy loading backend loads the lang files as a dynamic import.
9c476b5
to
5e93875
Compare
This pull request is deployed at test.editor.opencast.org/1310/2024-04-26_11-47-56/ . |
Discussed and approved, change sounds reasonable -> merging. |
Only the currently used language is loaded instead of all language files from the beginning. A new lazy loading backend loads the lang files as a dynamic import.
This should fix the bug that sometimes the language keys are missing.