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/ . |
Arnei
left a comment
There was a problem hiding this comment.
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 |
Arnei
left a comment
There was a problem hiding this comment.
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.
