diff --git a/README.md b/README.md index fe96709..5b226e4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ H5P Memory Game Create your own memory games and test the memory of your site users with this simple yet beautiful HTML5 game. +[See it in action on H5P.org](https://h5p.org/memory-game) + ## License (The MIT License) diff --git a/language/fr.json b/language/fr.json index 96828bb..e00969e 100644 --- a/language/fr.json +++ b/language/fr.json @@ -2,7 +2,7 @@ "semantics": [ { "label": "Cartes", - "entity": "une carte", + "entity": "carte", "field": { "label": "Carte", "fields": [ @@ -17,19 +17,19 @@ } }, { - "label": "Localisation", + "label": "Interface", "fields": [ { - "label": "Texte pour une carte à retourner", - "default": "Retourner" + "label": "Texte pour le nombre de cartes retournées", + "default": "Cartes retournées :" }, { "label": "Texte pour le temps passé", - "default": "Durée écoulée" + "default": "Temps écoulé :" }, { - "label": "Texte de feedback", - "default": "Bon travail!" + "label": "Texte de l'appréciation finale", + "default": "Bien joué !" } ] } diff --git a/memory-game.js b/memory-game.js index 0f92b5e..845fe3b 100644 --- a/memory-game.js +++ b/memory-game.js @@ -36,12 +36,15 @@ H5P.MemoryGame = (function (EventDispatcher, $) { var finished = (removed === cards.length); var desc = card.getDescription(); + if (finished) { + self.triggerXAPIScored(1, 1, 'completed'); + } + if (desc !== undefined) { // Pause timer and show desciption. timer.stop(); popup.show(desc, card.getImage(), function () { if (finished) { - self.triggerXAPIScored(1, 1, 'completed'); // Game has finished $feedback.addClass('h5p-show'); } @@ -52,7 +55,6 @@ H5P.MemoryGame = (function (EventDispatcher, $) { }); } else if (finished) { - self.triggerXAPIScored(1, 1, 'completed'); // Game has finished timer.stop(); $feedback.addClass('h5p-show');