Skip to content

Fix to issue #13 - #17

Open
Kathrin84 wants to merge 1 commit into
jhoopes:masterfrom
Kathrin84:change_hardcoded_strings
Open

Fix to issue #13#17
Kathrin84 wants to merge 1 commit into
jhoopes:masterfrom
Kathrin84:change_hardcoded_strings

Conversation

@Kathrin84

Copy link
Copy Markdown
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

jhoopes commented Jul 3, 2015

Copy link
Copy Markdown
Owner

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
Copy Markdown
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