From d94458d6565f67632c8f9249eb62ae639eb6b754 Mon Sep 17 00:00:00 2001 From: s2 Date: Sat, 6 Apr 2013 12:49:12 +0200 Subject: [PATCH] before localizing messages make them English --- app/js/index.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/app/js/index.js b/app/js/index.js index c974c3d..e8f691b 100644 --- a/app/js/index.js +++ b/app/js/index.js @@ -51,16 +51,16 @@ if (typeof(sw) == 'undefined') { }; var gameOver = function() { - var result = 'Sehr gut!'; + var result = 'AWESOME!'; - if (sw.wrongWords > 1 || sw.finaltime > 50) { - result = 'Du kannst das besser!'; + if (sw.wrongWords > 0 || sw.finaltime > 60) { + result = 'You can do better!'; }; - if (sw.wrongWords > 1 || sw.finaltime > 60) { - result = 'geht so...'; + if (sw.wrongWords > 0 || sw.finaltime > 80) { + result = 'meh...'; }; - if (sw.wrongWords >= 1 && sw.finaltime < 40) { - result = 'Du bist sehr schnell, aber du hast Fehler gemacht'; + if (sw.wrongWords > 0 && sw.finaltime <= 80) { + result = 'You are fast, but you made errors'; }; $("#main").empty().html('views/gameover.ejs', {result: result, time: sw.finaltime, wrong: sw.wrongWords, correct: sw.correctWords}); @@ -137,13 +137,9 @@ if (typeof(sw) == 'undefined') { setTimeout(function() { if(sw.gameover) { - setTimeout(function() { - gameOver(); - }, 1000); + gameOver(); } else { - setTimeout(function() { - startGame(wrongWord); - }, 1000); + startGame(wrongWord); } }, 1000); });