Skip to content
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

KL-1473 Add default correct message #37

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions image-hotspot-question.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ H5P.ImageHotspotQuestion = (function ($, Question) {
showFeedbackAsPopup: true,
l10n: {
retryText: 'Retry',
closeText: 'Close'
closeText: 'Close',
correctText: 'Correct!'
}
}
},
Expand Down Expand Up @@ -273,9 +274,12 @@ H5P.ImageHotspotQuestion = (function ($, Question) {
}
}

var feedbackText = (hotspot && hotspot.userSettings.feedbackText ? hotspot.userSettings.feedbackText : this.params.imageHotspotQuestion.hotspotSettings.noneSelectedFeedback);
if (!feedbackText) {
feedbackText = ' ';
let feedbackText;
if (!hotspot) {
feedbackText = this.params.imageHotspotQuestion.hotspotSettings.noneSelectedFeedback || ' ';
}
else {
feedbackText = hotspot.userSettings.feedbackText || this.params.imageHotspotQuestion.hotspotSettings.l10n.correctText;
}

// Send these settings into setFeedback to turn feedback into a popup.
Expand Down
4 changes: 4 additions & 0 deletions language/.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Sluit knoppieteks",
"default": "Sluit"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "نص زر الاغلاق",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Текст за бутона за затваряне",
"default": "Затвори"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Text del botó de tancar",
"default": "Tanca"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Text tlačítka zavřít",
"default": "Zavřít"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Prøv igen. Dette fjerner alle svar og starter opgaven forfra. "
}
]
}
}
4 changes: 4 additions & 0 deletions language/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Beschriftung des \"Schließen\"-Buttons",
"default": "Schließen"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Ετικέτα κουμπιού κλεισίματος",
"default": "Κλείσιμο"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Texto del botón Cerrar",
"default": "Cerrar"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Texto del botón Cerrar",
"default": "Cerrar"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Sulge nupu tekst",
"default": "Sulge"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Itxi botoiaren testua",
"default": "Itxi"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Sulje painikkeen teksti",
"default": "Sulje"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Texte du bouton Fermer",
"default": "Fermer"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "תוית כפתור סגירה",
"default": "סגירה"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Testo del pulsante \"Chiudi\"",
"default": "Chiudi"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "បិទ"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "닫기 버튼 텍스트",
"default": "닫기"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Tekst \"Afsluiten\"-knop",
"default": "Afsluiten"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/nn.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Lukk"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion language/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Close button text",
"default": "Close"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand All @@ -77,4 +81,4 @@
"default": "Retry the task. Reset all responses and start the task over again."
}
]
}
}
4 changes: 4 additions & 0 deletions language/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Texto do botão Fechar",
"default": "Fechar"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions language/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
{
"label": "Texto do botão de fechar",
"default": "Fechar"
},
{
"label": "Default message for correct hotspots",
"default": "Correct!"
}
]
}
Expand Down
Loading