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 language files for H5P libraries #2589

Closed
tmkarlsen opened this issue Nov 1, 2023 · 2 comments · Fixed by #2619
Closed

Update language files for H5P libraries #2589

tmkarlsen opened this issue Nov 1, 2023 · 2 comments · Fixed by #2619
Assignees
Labels
enhancement New feature or request NDLA NDLA Edlib needs triage All issues that need to be triaged by repository admins

Comments

@tmkarlsen
Copy link
Member

tmkarlsen commented Nov 1, 2023

In many cases, updating the language files in the H5P open-source project takes too long to return
The problem is that these small language fixes are easily done and should be quick to update, but it takes time for the whole circle to complete.

Suggested solutions

  1. Being able to upload and actively overwrite an existing/installed H5P library
  2. Being able to upload and overwrite language files for installed H5P libraries
  3. Update the copy of the language files that are stored in the database

Described solution
Description of accepted solution 3

  1. Translations made in Weblate are downloadable and can be uploaded as a JSON file in CA-admin. The save process will consist of a validation before the database is updated.
  2. Admins can also edit translations directly within a text field in CA-admin. The save process will consist of a validation before the database is updated.
@tmkarlsen tmkarlsen added enhancement New feature or request needs triage All issues that need to be triaged by repository admins labels Nov 1, 2023
@chrieinv
Copy link
Contributor

chrieinv commented Nov 1, 2023

Both are temporary "solutions" to updating language files for a content type. In both cases the translations will only last until the next patch-update.

  1. This could be useful for other purposes, e.g. fixing a content type that's broken (H5P resource breaks during update #1647). Installation should be to a new folder, and the old deleted instead of overwriting existing files
  2. This would be a strange feature to have, especially since the change is not permanent

We should discourage installing modified versions of content types and libraries, the modified library will be redistributed if download of the content is allowed. See issue #1375.

@tmkarlsen tmkarlsen added NDLA NDLA Edlib Needs estimation This issue needs an estimated (add comment) labels Nov 1, 2023
@tmkarlsen tmkarlsen removed the Needs estimation This issue needs an estimated (add comment) label Nov 14, 2023
@chrieinv
Copy link
Contributor

When a library is installed, the content of the translation files are stored in the database. When H5P Editor requests a translation it is retrieved from the database.
In the Admin interface it will be possible to edit the translations stored in the database, the translations are stored as a JSON string. The translations will be local, meaning that they will not be included when exporting. Changes to the translations stored in the database may be overwritten when a new patch-version of a library is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NDLA NDLA Edlib needs triage All issues that need to be triaged by repository admins
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants