Fix to issue #13 - #17
Conversation
Changed found hard coded string to strings that can be used with language pack. For the word „seconds“ I used the string from Moodle core so that no additional entry in the language php file is needed. Kind regards, Kathrin
|
Hi Kathrine, Thank you for your willingness to help with fixing hard coded strings in my js and elsewhere. However, I can't accept this pull request as is. The method used for getting the string through js is not the recommended way, nor would I add the string_for_js function at the top of the renderer file, as this would then load it for every page that the renderer.php file is loaded in the Moodle page stack. While, it is simply one function call, it's better to do lazy loading for the strings for performance. If you are ok waiting, I can work with what you've provided and get this functionality into the code sometime next week. Otherwise feel free to modify what you've got to use the provided Moodle functions and more correct placement of function calls. |
|
If you think that there's a better way to implement the function to avoid hard coded strings, feel free to add this to your code. I just wanted to help. |
Changed found hard coded string to strings that can be used with
language pack.
For the word „seconds“ I used the string from Moodle core so that no
additional entry in the language php file is needed.
Kind regards,
Kathrin