Changing hard-coded strings into string variables

Changing hard-coded strings into string variables

by Germán Valero -
Number of replies: 0
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I want to use the EXAM plugin (https://moodle.org/plugins/mod_exam );  the code is hosted at https://github.com/vidyamantra/moodle-mod_exam/

BUT I need to translate it into mexican Spanish while retaining the English language strings for other users.

I already forked it and added es and es-mx languages in https://github.com/germanvaleroelizondo/moodle-mod_exam

BUT there are a few hard-wired strings in lines 29 to 37 in https://github.com/vidyamantra/moodle-mod_exam/blob/master/js/slickQuiz.js

(function($){
$.slickQuiz = function(element, options) {
var plugin = this,
$element = $(element),
_element = '#' + $element.attr('id'),

defaults = {
checkAnswerText: 'Check My Answer!',
nextQuestionText: 'Next »',
backButtonText: '« Back',
tryAgainText: '',
questionCountText: 'Question %current of %total',
preventUnansweredText: 'You must select at least one answer.',
questionTemplateText: '%count. %text',
scoreTemplateText: '%score / %total',
nameTemplateText: '<span>Quiz: </span>%name',


The plugin authors have not answered issue posted in february in  https://github.com/vidyamantra/moodle-mod_exam/issues/5

Can someone please help me as to how to do that?

Average of ratings: -