-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add translation strings to code #2
Comments
Hey @nadavkav :) I've created an issue for it here: https://h5ptechnology.atlassian.net/browse/HFP-1875 PR's are accepted too 👍 |
Hi @timothyylim , |
That makes sense to me, I've had the same problem with a new reporting template I've worked on recently. I kind of hacked it by passing the strings as html attributes: @thomasmars, is one who understands this 'sub plugin' the most. Let's wait for his opinion first :) |
Great :-) |
To me it feels like we should implement a similar translation system to what H5P core is using, thus making use of the get_string() functionality in Moodle and define the strings at the 'h5p' component level. E.g. reporting would have an interface for a translation function, then the H5P moodle plugin would implement the reporting module interface and thus also the translation function by using get_string(), or the H5P moodle plugin could pass in a dictionary to the reporting module containing all the strings that the reporting module needed. The reporting module is a submodule that is used in other contexts than Moodle, so the translation system must be decoupled from Moodle and the subplugin system that Moodle has. However it could be wrapped in a Moodle submodule, but this would result in the H5P Moodle plugin having a Moodle reporting submodule, which then again would wrap the reporting module. The addition of the Moodle submodule layer seems unnecessary, but if there are compelling arguments for structuring it like this we should look closer at it. |
I agree, since this reporting module is shared with other non Moodle systems, it should be exposing an interface for translation, as other sub modules should. |
I've updated the issue Timothy created in the jira issue tracker. Thanks for the input. |
Hello H5P Team,
Please see if you can add new translation tokens (and strings) the the following hardcoded text labels in the report code, as we wish to translate them.
see links:
h5p-php-report/type-processors/matching-processor.class.php
Lines 351 to 353 in 78233cf
Best,
Nadav
The text was updated successfully, but these errors were encountered: