-
Notifications
You must be signed in to change notification settings - Fork 6
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
Bug: Hard coded strings during installation #3
Comments
@michael-milette is there an easy way for you to explain how we can replace these strings, I might take a shot at this myself. |
Hi @gemguardian , Thank you for your offer to help out with this issue. I have not looked into why these strings are stored in the database during the installation. I suspect the original authors simply did not know how to use language strings when they first wrote the plugin. What I think would need to be done is, for each of the hard coded strings in db/install.php:
Once this is done, a nice-to-have feature would be to identify the recipients preferred language to deliver messages in their language instead of the senders language, if they are different in a multi-language Moodle environment. I think that should do it but, like I said, I have not yet assessed exactly what would need to be done so there could be a little more. Once this is done, you should be able to easily customize and/or translate these strings using the Language String editor that is built into Moodle. If you contribute your changes back to me and it all works well, the changes will be included in future releases of block_cmanager. Once that is published on Moodle.org, new translations can be submitted through Moodle's AMOS translations site. Note: I am currently working on an update of the plugin this summer which cleans up a lot of the code and will make it compatible with Moodle 4+. I would be happy to include your changes relating to these language strings. By sharing your changes and getting them integrated, you won't need to keep patching the plugin each time you upgrade it in the future. Please let me know if you intend to work on this. Best regards, Michael |
@michael-milette Thank you for taking me through the process. I already learned how to add strings to the lang/en/block_cmanager.php, so just did my first merge to you with this fix. It's busy but I will see if I can work on the other strings. I have not done this before :) And of course I will shared the changes with you :) |
There are hard-coded language strings that are set during the installation. These strings, found in the db/install.php file, should be replaced with strings from the language pack.
The text was updated successfully, but these errors were encountered: