h5p / moodle-mod_hvp

H5P Plugin for Moodle
GNU General Public License v3.0
131 stars 169 forks source link

Remove lang folders for other languages #213

Closed tobiasreischmann closed 5 years ago

tobiasreischmann commented 6 years ago

Only the en lang folder belongs into the code of a plugin. The rest is maintained at lang.moodle.org. The lang-string there are better maintained anyway. Some of the non-en-lang packages in the code contain just copy/pasted english strings.

thomasmars commented 6 years ago

Thanks. I've created https://h5ptechnology.atlassian.net/browse/HFP-2167 to remove the unused language files.

germanvaleroelizondo commented 5 years ago

Please see https://docs.moodle.org/dev/Plugin_contribution_checklist#Strings

The (often incomplete) translations inside this plugin code here interfere with the use of this plugin in Moodle.

You can easily check https://moodle.org/plugins/translations.php?plugin=mod_hvp in the 'Translations' tab, and realize that there ARE many translations for the language strings of this plugin already hosted in AMOS.

So, it is very important and rather urgent to remove all language strings other than English from the code here in GitHub, and update the plugin code hosted in the Moodle plugins database at https://moodle.org/plugins/translations.php?plugin=mod_hvp

This should be a very quick fix and it will allow all Moodle translators at AMOS to make a better job of translating this very nice and useful plugin for languages other than English.

thomasmars commented 5 years ago

Hi, why is it urgent to remove all language strings ? If I have understood it correctly, to change language you must download the language pack externally from Moodle, which means you get all the strings as translates through AMOS, so the external translations will always be used, and never the local translations? We will remove the language files, since they are not in use anyway, but I don't see the urgency in it. Please elaborate if you disagree.

germanvaleroelizondo commented 5 years ago

Hi,

Firstly, I must thak you all for this great software and its Moodle integration. It seems to be very helpful for many Moodlers worldwide in many languages.

I wrote 'urgent' because this issue was described on 17 Aug 2018, and the fix was meant to be made in 3 Sep 2018 :(

The problem arises when a Moodle user has a language that has both AMOS and here in-the-Moodle-plugin-code translated language strings. Such user will see the strings that you host here, but he will complain to the Moodle forums, where the Moodle AMOS language pack maintainers will check AMOS translations and answer that the plugin is correctly translated (it is in AMOS), but the Moodle user sees incomplete translation.

We have recenetly had one such case reported in https://moodle.org/mod/forum/discuss.php?d=388854

In this particular case, it has not been easy to diagnose the cause of the issue, as there are incomplete translations in 3 places: AMOS (es) language pack, some of your (es) and most of the missing (es_mx) strings here in your GitHub code for many (other) modules.

This case is special because the involved user language is Mexican Spanish (es_mx) which is 100% translated for Moodle core and your HVP Moodle plugin, but there are very few es_mx translations inside your many H5P modules, If the user changes his Moodle language preference to intenational Spanish (es) he will get more translated strings for most of your plugins, except for the Moodle plugin (which is only half translated).

I am the Moodle AMOS maintainer for the es_mx language pack. I have already submitted contributios for your Moodle plugin to the international Spanish (es) language pack, but they seem to be in summer holidays currently :).

I hope to check all the (es) strings inside your H5P modules here in GitHub and contribute pull requests in order to get a 100% translated (es) strings (one module at a time). When that is made, I will duplicate (es) strings into an (es_mx) strings folder and made the few changes that differ in both language packs:).

I hope to fork and make pull requests for the first module soon.

germanvaleroelizondo commented 5 years ago

I have made 2 pull requests: One for removing all languages othen than English for the Moodle plugin and another for creating a Mexican Spanish for one module.

Is that OK? Shall I continue with the other modules?

thomasmars commented 5 years ago

I think all the translations that are in Moodle must be transfered to AMOS, before we can delete the files, to ensure that the work that has been done in the local language files are transferred to the Moodle language packs first.

germanvaleroelizondo commented 5 years ago

The French (fr) translation is 100% complete in AMOS. The German (de) is 100% complete in AMOS. The Portugues (pt) is 100% complete in AMOS.

The remaining languages were not yet fully translated in AMOS.

I have sent the remaining missing translations to AMOS and I am reporting back here:

(he) accepted by lang packmaintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29461 (pt_br) accepted by lang pack maintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29463 (fi) accepted by lang pack maintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29465 (tr) accepted by lang pack maintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29464 (no) accepted by lang pack maintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29462

(ca) sent to lang pack maintainers. See https://lang.moodle.org/local/amos/contrib.php?id=29460 (es) sent to lang pack maintainers, who seem to be having a summer holiday. See https://lang.moodle.org/local/amos/contrib.php?id=29450 to https://lang.moodle.org/local/amos/contrib.php?id=29456

nadavkav commented 5 years ago

Thank you @germanvaleroelizondo for taking the time to fix this. I merged all the Hebrew translation strings you sent via: https://lang.moodle.org/local/amos/contrib.php?id=29461 As I maintain the Hebrew translation strings at Moodle.

germanvaleroelizondo commented 5 years ago

Does anyone know how long it usually takes for translations contributed into (several) H5P modules to come into effect ?

I have made several contributions to Spanish and Mexican Spanish language translations in quite a few modules and I would like to know when can I see them working inside a Moodle course.

germanvaleroelizondo commented 5 years ago

According to Moodle documentation at https://docs.moodle.org/dev/Translating_plugins#Strings_priority ,

The strings defined in an installed parent language pack maintained at AMOS have priority over the strings enclosed inside the pluginname/lang/xx/yy.php folder (where xx is a language code other than the en folder) from a downloaded and installed plugin ZIP file.

So, you could now safely remove the six following languages from the Moodle plugin here in GitHub (and later in the Moodle plugins database):

(fr) French (de) German (pt) Portugues (he) Hebrew (pt_br) Brazilian Portuguese (fi) Finnish.

nadavkav commented 5 years ago

Moodle translations that are "approved" by the specific language team leader on AMOS are available within 30min for all Moodle systems worldwide, and usually updated once every 24h via Moodle OS level cron on each Moodle server.

And just to make it clear... All H5P libraries ("components" / "plugins") have their own separate translation infrastructure which is not related to the H5P Moodle plugin, and I am not sure what is the frequency of merging and distributing the contributed translation pull request that I see on each library's repository on github. H5P team, can you give more information about this process?

germanvaleroelizondo commented 5 years ago

@nadavkav

Can you please check the Moodle DEV Documentation at

https://docs.moodle.org/dev/Translating_plugins#H5P_plugin

and add/remove/change as necessary ?

nadavkav commented 5 years ago

FYI, since March 2019 I was added by Sebastian Rettig (@sr258) to his special private initiative of translating H5P libraries website: https://deutsche-h5p-uebersetzungscommunity.tk/projects/h5p/#languages The website is pulling all the translation of all the languages from all H5P github libraries repositories. it allows an easy UI for translating any language, and it pushes back into H5P's github account all the translated strings as pull requests. Still I am not sure what is the frequency in which H5P team is merging it into their libraries, and when are those new versions available for update by the various H5P plugins worldwide.

And one more thing... I think H5P should setup their own official translation service based on https://weblate.org/en/ As it was proved very useful by Sebastian Rettig (@sr258) ( @icc , @falcon-git )

thomasmars commented 5 years ago

Translations that are contributed direclty to H5P repositories are released when the content type is released on H5P.org, so the sites get them when they update the content type through the content type hub. I agree, a continuous translation service for H5Ps would be very nice :)

nadavkav commented 5 years ago

@thomasmars When are the content types released on H5P.org? Can we have some level of automation added to this process, which decouple the code updates of the libraries from its translations, and increase the frequency of updates?

sr258 commented 5 years ago

Recently, the H5P team have been really quick in accepting pull requests that are translations! They were usually accepted within a working day of submitting them.

While Weblate is an awesome tool, running it to manage the localization of the whole H5P project will still require resources (time): If normal contributors can only submit suggestions, there must be maintainers for every language that can review the suggestions.

A downside of Weblate also is that pull requests (or pushes to the main repository if Weblate has direct write access) always include all translations of a library and not just a specific one. So if one language team is working on a library and another has finished their translation for the same library and push their changes, the work-in-progress on the other language is submitted too.

So effectively the work of managing the pull requests on GitHub will shift into Weblate. I think these challenges can be addressed and it would be worth it, as Weblate greatly simplifies the translation process and contributes to better consistency among modules. It would require trust in language maintainers, though and some discipline in using Weblate.

germanvaleroelizondo commented 5 years ago

@sr258 @thomasmars

Recently,I have made many translations and the following pull requests, but they have not been processed yet:

https://github.com/h5p/h5p-greeting-card/pull/14 https://github.com/h5p/h5p-column/pull/29 https://github.com/h5p/h5p-continuous-text/pull/12 https://github.com/h5p/h5p-course-presentation/pull/95 https://github.com/h5p/h5p-exportable-text-area/pull/11 https://github.com/h5p/h5p-go-to-question/pull/12 https://github.com/h5p/h5p-greeting-card/pull/14 https://github.com/h5p/h5p-editor-image-hotspot-question/pull/12 https://github.com/h5p/h5p-true-false/pull/36 https://github.com/h5p/h5p-guess-the-answer/pull/11 https://github.com/h5p/h5p-editor-summary-textual-editor/pull/6 https://github.com/h5p/h5p-memory-game/pull/49 https://github.com/h5p/h5p-appear-in/pull/9 https://github.com/h5p/h5p-boardgame/pull/8 https://github.com/h5p/h5p-chart/pull/22 https://github.com/h5p/h5p-editor-three-image/pull/4 https://github.com/h5p/h5p-advanced-text/pull/10 https://github.com/h5p/h5p-multi-choice/pull/69 https://github.com/h5p/h5p-open-ended-question/pull/12 https://github.com/h5p/h5p-editor-range-list/pull/8 https://github.com/h5p/h5p-editor-php-library/pull/88 https://github.com/h5p/h5p-timeline/pull/30 https://github.com/h5p/h5p-drag-n-bar/pull/17 https://github.com/h5p/h5p-editor-wizard/pull/7

These will be a considerable addition for Spanish-speaking users of H5P when they are added to the code.

Thanks in advance for your help.

thomasmars commented 5 years ago

Excellent job, thanks

germanvaleroelizondo commented 5 years ago

I did make a few dumb mistakes (extra trailing lines at end of some files and wrong name for another file) that have been identified and fixed :(

But otherwise I hope these additions will make many mexican users of h5p happier.

germanvaleroelizondo commented 5 years ago

Any idea of when can the Spanish users of h5p under Moodle be able to see these language changes into effect?

I will be looking forward to seeing these changes at work and post about it in the Moodle forums:)

thomasmars commented 5 years ago

The changes are already in effect for Moodle, the language packages are taken from the Moodle translation system already, that is https://lang.moodle.org/?. For the content types it will be in effect when the respective content types are released.

germanvaleroelizondo commented 5 years ago

I have already updated AMOS ( https://lang.moodle.org ) es_mx strings for the H5P Moodle plugin :) Moodle language pack submissions are automatically updated every half hour at AMOS. Most Moodle sites can automatically update their language strings every day by a (default) cron service (if one is working).

It is exactly the dates when the many different H5P content types are to be released that I am interested in.

I think there are no set dates for the whole H5P package, but an average time frame ( days/weeks/months ?) would give an idea of when to expect a great change for Spanish users :)

germanvaleroelizondo commented 5 years ago

The Moodle H5P plugin (https://moodle.org/plugins/mod_hvp ) is currently installed in at least 10704 sites.

And Spain (n=8180) and Mexico (n=5224) are currently the second and third countries with most registered Moodle sites according to https://moodle.net/stats/

thomasmars commented 5 years ago

@fnoks may be able to answer you better on when the languages for content types will go out, but typically we won't release a content type just to update languages. We will typically release the content types when a significant feature or bug fix will go out because of the overhead associated with releasing a new version of a content type.

germanvaleroelizondo commented 5 years ago

I just found "When we get new translation-files from the community, we will create a new release of the H5P content type containing the new/updated translation, and publish it here on h5p.org." in https://h5p.org/node/935?page=1

BUT it seems not to be the case nowadays...