Skip to content

Fix to issue #13 #17

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kathrin84
Copy link
Contributor

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

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
@jhoopes
Copy link
Owner

jhoopes commented Jul 3, 2015

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.

@Kathrin84
Copy link
Contributor Author

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.
You can use my work as a basis if you want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants