Commit c888c59c authored by Thomas Dennis's avatar Thomas Dennis

Added pictures of fluffy bunnies and other adorable creatures.

parent 8cc2f752
......@@ -8,6 +8,9 @@ The flag icons are from the FamFamFam Flag Icons set, which can be found here:
All other images are from [Wikimedia Commons](http://commons.wikimedia.org). The
license used for each image varies; see the links below for further details:
Fruit
-----
+ apple.png - <http://commons.wikimedia.org/wiki/File:Anna_Apple.jpg>
+ banana.png - <http://commons.wikimedia.org/wiki/File:Bananen_Frucht.jpg>
+ orange.png - <http://commons.wikimedia.org/wiki/File:Citrus_sinensis.jpg>
......@@ -16,3 +19,10 @@ license used for each image varies; see the links below for further details:
+ pineapple.png - <http://commons.wikimedia.org/wiki/File:Ananas~May_2008-1.jpg>
+ strawberry.png - <http://commons.wikimedia.org/wiki/File:FraiseFruitPhoto.jpg>
+ watermelon.png - <http://commons.wikimedia.org/wiki/File:Watermelon.svg>
Animals
-------
+ cat.png - <http://commons.wikimedia.org/wiki/File:Gato_%282%29_REFON.jpg>
+ dog.png - <http://commons.wikimedia.org/wiki/File:Femelle_border_collie_de_l%27%C3%A9levage_de_Grimmaupr%C3%A8s.JPG>
+ rabbit.png - <http://commons.wikimedia.org/wiki/File:Coelho-5829.jpg>
......@@ -4,6 +4,7 @@ var LANGUAGE = {}; // NOTE: The other nouns_xx.js files add stuff to this.
// This defines the question set:
var CATEGORIES = {
"animal": ["cat", "dog", "rabbit"],
"fruit": ["apple", "banana", "orange", "peach", "pear", "pineapple", "strawberry", "watermelon"]
};
......@@ -26,7 +27,8 @@ function setLanguage(lang)
for (var category in CATEGORIES)
{
// If multiple translations are available, just use the first one.
document.getElementById(category).innerHTML = LANGUAGE[lang].dictionary[category][0];
var words = LANGUAGE[lang].dictionary[category];
document.getElementById(category).innerHTML = words ? words[0] : "???";
}
}
......@@ -111,7 +113,9 @@ function check(lang)
{
var answer = document.getElementById(c + "_" + CATEGORIES[c][i] + "_answer");
if (LANGUAGE[lang].dictionary[CATEGORIES[c][i]].indexOf(answer.value) >= 0)
var words = LANGUAGE[lang].dictionary[CATEGORIES[c][i]];
if (words && words.indexOf(answer.value) >= 0)
{
++score;
answer.className = "right_answer";
......@@ -119,7 +123,7 @@ function check(lang)
else { answer.className = "wrong_answer"; }
var info = document.getElementById(c + "_" + CATEGORIES[c][i] + "_info");
info.innerHTML = LANGUAGE[lang].dictionary[CATEGORIES[c][i]].join(", ");
info.innerHTML = words ? words.join(", ") : "(translation missing)";
}
}
......
......@@ -2,18 +2,10 @@
LANGUAGE["de"] = {
title: "Nomen",
intro: "(translation missing)",
intro: "???",
name: "Deutsch",
dictionary: {
"apple": ["(translation missing)"],
"banana": ["(translation missing)"],
"fruit": ["obst"],
"orange": ["(translation missing)"],
"peach": ["(translation missing)"],
"pear": ["(translation missing)"],
"pineapple": ["(translation missing)"],
"strawberry": ["(translation missing)"],
"watermelon": ["(translation missing)"]
"fruit": ["obst"]
}
};
......@@ -6,14 +6,21 @@ LANGUAGE["en"] = {
name: "English",
dictionary: {
"animal": ["animal"],
"fruit": ["fruit"],
"cat": ["cat", "feline"],
"dog": ["dog", "canine"],
"rabbit": ["rabbit", "bunny"],
"apple": ["apple"],
"banana": ["banana"],
"fruit": ["fruit"],
"orange": ["orange", "tangerine", "satsuma"],
"peach": ["peach", "nectarine"],
"pear": ["pear"],
"pineapple": ["pineapple"],
"strawberry": ["strawberry"],
"watermelon": ["watermelon"]
}
};
......@@ -6,9 +6,14 @@ LANGUAGE["jp"] = {
name: "日本語",
dictionary: {
"fruit": ["", "", "", "mi"],
"cat": ["", "ねこ", "ネコ", "neko"],
"dog": ["", "いぬ", "イヌ", "inu"],
"rabbit": ["", "うさぎ", "ウサギ", "usagi"],
"apple": ["林檎", "りんご", "リンゴ", "ringo"],
"banana": ["甘蕉", "ばなな", "バナナ", "banana"],
"fruit": ["", "", "", "mi"],
"orange": ["蜜柑", "みかん", "ミカン", "mikan"],
"peach": ["", "もも", "モモ", "momo"],
"pear": ["", "なし", "ナシ", "nashi"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment