How to ensure that the most up to date file is translated?
Hi. I noticed that the Finnish language file (fi.json) of the Branching Scenario (https://github.com/h5p/h5p-branching-scenario/tree/master/language) seemed to have some differences compared to the English one (.en.json). To be more accurate, e.g. lines 170 and 171 in ".en.json" have the label and the default for replaying a video, but the "fi.json" has translations for these items in lines 166 and 167 in different slot of the "fields": [ ] table/list (not sure what it is called).
If I'm right that the translations are taken to H5P activity according to the order of the items in the .json file, this difference explains why we see some button texts in wrong places in the Finnish version (even they would have been translated correctly).
I was planinng to contribute and edit these errors, but I would like to ask first that how will I ensure that I'm taking the most up to date .json file as a template when I'm making the translation? Is maybe the .en.json for sure up-to-date to the "semantics.json", or should I use the https://translate-h5p.tk/ in stead?
I just want to make sure to avoid the problems that I'm trying to fix (same content in different rows between different language files).
Fri, 08/06/2021 - 18:59
Hi prikkila,First of all
First of all thank you for intention of updating the translation files.
I can't say for sure how often the "Translate H5P" is updated since it is created and managed from someone in the community not the H5P core team. What I am certain is that the files in the H5P github repo is the most up to date.
If someone from the "Translate H5P" team can enlighten us how often it is updated I think it will help in deciding since it is a lot easier to use than editing the language files directly.
Sat, 08/07/2021 - 17:13
I run translate-h5p.tk. I
I run translate-h5p.tk. I occasionaly update the language files from the on translate-h5p.tk (about weekly) and the editors do so too, so they shouldn't be dramatically out of date. If you have editor permissions on the site (you can simply apply with me at [email protected]), you can also update the repositories yourself before you work on a translation, so you have a fresh copy. As Weblate also works with Git under the hood, it merges changes made in the platform with changes made upstream if you commit and push to GitHub. If there's a conflict, I get notified and I fix these issues manually. So overall, Translate H5P is the easiest and probably least error-prone way of fixing the issue.
I can't influence whether semantics.json and .en.json are in sync and don't know if this is the case for the Branching Scenario at the moment. Weblate only works with the .en.json file as source strings, so if Joubel forgets to update the file, translate-h5p.tk will not see changes in semantics.json.
I've noticed this problem of missing strings in translation files myself. I think they happen if Joubel changes the structure of semantics.json but forgets to change the translation files accordingly. Normally, they insert the English source strings.
Mon, 08/09/2021 - 11:36
Hi all!I don't think that the
I don't think that the H5P core team (or other content type developers) are necessarily "forgetting" to update the .en.json file or to validate translation files, but they do that only once when issuing a new release. It's a master (development) branch after all that's not guaranteed to be stable, complete or consistent.
Mon, 08/09/2021 - 11:01
Hi, thanks a lot for your answers that clarified the situation. Great to know that the both methods seem to work in this case. I will figure out that will I do the changes in GitHub or in translate-h5p.tk. If in GitHub, I think I'll take a copy of the ".en.json" and move the translations from current "fi.json" to a new copy to make sure that all of the lines are in the same place then. And maybe also translate some parts that are still in English.