Moved copyright question labels inside the common interface texts.

HFJ-1746
pull/4/head
Thomas Marstrander 2016-04-15 12:49:09 +02:00
parent 333d3f4161
commit 0e50523853
9 changed files with 44 additions and 34 deletions

View File

@ -80,7 +80,8 @@ H5P.QuestionSet = function (options, contentId) {
nextButton: 'Next question', nextButton: 'Next question',
finishButton: 'Finish', finishButton: 'Finish',
textualProgress: 'Question: @current of @total questions', textualProgress: 'Question: @current of @total questions',
jumpToQuestion: 'Jump to question %d' jumpToQuestion: 'Jump to question %d',
questionLabel: 'Question'
}, },
endGame: { endGame: {
showResultPage: true, showResultPage: true,
@ -94,8 +95,7 @@ H5P.QuestionSet = function (options, contentId) {
solutionButtonText: 'Show solution', solutionButtonText: 'Show solution',
retryButtonText: 'Retry', retryButtonText: 'Retry',
showAnimations: false showAnimations: false
}, }
questionLabel: 'Question'
}; };
var template = new EJS({text: texttemplate}); var template = new EJS({text: texttemplate});
@ -574,7 +574,7 @@ H5P.QuestionSet = function (options, contentId) {
} }
// Determine label // Determine label
var label = (params.questionLabel + ' ' + (i + 1)); var label = (params.texts.questionLabel + ' ' + (i + 1));
if (qParams.contentName !== undefined) { if (qParams.contentName !== undefined) {
label += ': ' + qParams.contentName; label += ': ' + qParams.contentName;
} }

View File

@ -79,6 +79,10 @@
"label": "Label for jumping to a certain question", "label": "Label for jumping to a certain question",
"description": "You must use the placeholder '%d' instead of the question number.", "description": "You must use the placeholder '%d' instead of the question number.",
"default": "Jump to question %d" "default": "Jump to question %d"
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
}, },
@ -170,10 +174,6 @@
] ]
} }
] ]
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
} }

View File

@ -84,6 +84,10 @@
"label": "Label for jumping to a certain question", "label": "Label for jumping to a certain question",
"description": "You must use the placeholder '%d' instead of the question number.", "description": "You must use the placeholder '%d' instead of the question number.",
"default": "Jump to question %d" "default": "Jump to question %d"
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
}, },
@ -185,10 +189,6 @@
] ]
} }
] ]
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
} }

View File

@ -79,6 +79,10 @@
"label": "Label for jumping to a certain question", "label": "Label for jumping to a certain question",
"description": "You must use the placeholder '%d' instead of the question number.", "description": "You must use the placeholder '%d' instead of the question number.",
"default": "Jump to question %d" "default": "Jump to question %d"
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
}, },
@ -170,10 +174,6 @@
] ]
} }
] ]
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
} }

View File

@ -79,6 +79,10 @@
"label": "Label for jumping to a certain question", "label": "Label for jumping to a certain question",
"description": "You must use the placeholder '%d' instead of the question number.", "description": "You must use the placeholder '%d' instead of the question number.",
"default": "Jump to question %d" "default": "Jump to question %d"
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
}, },
@ -170,10 +174,6 @@
] ]
} }
] ]
},
{
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
} }

View File

@ -81,6 +81,10 @@
"label": "Merkelapp ved hopping til spørsmål", "label": "Merkelapp ved hopping til spørsmål",
"description": "Du må bruke plassholderen '%d' istedenfor spørsmålsnummeret.", "description": "Du må bruke plassholderen '%d' istedenfor spørsmålsnummeret.",
"default": "Hopp til spørsmål %d" "default": "Hopp til spørsmål %d"
},
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
} }
] ]
}, },
@ -182,10 +186,6 @@
] ]
} }
] ]
},
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
} }
] ]
} }

View File

@ -81,6 +81,10 @@
"label": "Merkelapp ved hopping til spørsmål", "label": "Merkelapp ved hopping til spørsmål",
"description": "Du må bruke plassholderen '%d' istedenfor spørsmålstalet.", "description": "Du må bruke plassholderen '%d' istedenfor spørsmålstalet.",
"default": "Hopp til spørsmål %d" "default": "Hopp til spørsmål %d"
},
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
} }
] ]
}, },
@ -182,10 +186,6 @@
] ]
} }
] ]
},
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
} }
] ]
} }

View File

@ -159,6 +159,12 @@
"label": "Label for jumping to a certain question", "label": "Label for jumping to a certain question",
"description": "You must use the placeholder '%d' instead of the question number.", "description": "You must use the placeholder '%d' instead of the question number.",
"default": "Jump to question %d" "default": "Jump to question %d"
},
{
"name": "questionLabel",
"type": "text",
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]
}, },
@ -345,11 +351,5 @@
] ]
} }
] ]
},
{
"name": "questionLabel",
"type": "text",
"label": "Copyright dialog question label",
"default": "Question"
} }
] ]

View File

@ -41,6 +41,16 @@ H5PUpgrades['H5P.QuestionSet'] = (function ($) {
delete parameters.override.overrideShowSolutionButton; delete parameters.override.overrideShowSolutionButton;
delete parameters.override.overrideRetry; delete parameters.override.overrideRetry;
// Move copyright dialog question label
if (parameters.questionLabel) {
parameters.texts = parameters.texts || {};
parameters.texts.questionLabel = parameters.questionLabel;
}
// Remove old copyright dialog question label
delete parameters.questionLabel;
finished(null, parameters); finished(null, parameters);
} }
} }