cerpus / Edlib

Edlib is an application for creating, sharing, storing and using rich interactive learning resources.
https://docs.edlib.com
GNU General Public License v3.0
40 stars 7 forks source link

Update language files for H5P libraries #2589

Closed tmkarlsen closed 10 months ago

tmkarlsen commented 10 months ago

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.
chrieinv commented 10 months ago

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 (#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.

chrieinv commented 10 months ago

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.