Commit 880c1973 authored by Thomas Dennis's avatar Thomas Dennis

Update word lists + add kanji + descriptions.

parent 65b951f9
"use strict";
var ADJECTIVE_EI = {
about: "~ei adjectives",
about: "~ei adjective",
word_list:
[
"kirei"
{ "romaji": "ijiwaru", "kanji": "意地悪", "description": "mean" },
{ "romaji": "kirai", "kanji": "嫌い", "description": "distasteful" },
{ "romaji": "shizuka", "kanji": "静か", "description": "quiet" },
{ "romaji": "kiken", "kanji": "危険", "description": "dangerous" },
{ "romaji": "benri", "kanji": "便利", "description": "convenient" },
{ "romaji": "kirei", "kanji": "きれい", "description": "pretty" },
{ "romaji": "jouzu", "kanji": "上手", "description": "skillful" },
{ "romaji": "teinei", "kanji": "丁寧", "description": "polite" },
{ "romaji": "ganko", "kanji": "頑固", "description": "stubborn" },
{ "romaji": "shinsetsu", "kanji": "親切", "description": "kind" },
{ "romaji": "suki", "kanji": "好き", "description": "favorite" },
{ "romaji": "nigiyaka", "kanji": "にぎやか", "description": "lively" },
{ "romaji": "anzen", "kanji": "安全", "description": "safe" },
{ "romaji": "fuben", "kanji": "不便", "description": "inconvenient" },
{ "romaji": "genki", "kanji": "元気", "description": "healthy" },
{ "romaji": "yuumei", "kanji": "有名", "description": "famous" },
{ "romaji": "shoujiki", "kanji": "正直", "description": "honest" },
{ "romaji": "hade", "kanji": "派手", "description": "showy" }
],
conjugate: function(word, kwargs)
{
var expected_answer = word;
if (kwargs.formal)
{
if (kwargs.negative)
......@@ -39,7 +53,6 @@ var ADJECTIVE_EI = {
else { return word + " da"; }
}
}
}
};
"use strict";
var ADJECTIVE_I = {
about: "~i adjectives",
about: "~i adjective",
word_list:
[
"takai"
{ "romaji": "takai", "kanji": "高い", "description": "high/expensive" }
],
conjugate: function(word, kwargs)
{
var expected_answer = word;
if (kwargs.formal)
{
if (kwargs.negative)
......@@ -40,7 +37,6 @@ var ADJECTIVE_I = {
else { return word; }
}
}
}
};
......@@ -25,5 +25,10 @@
<a class="jslink" href="#" onclick="check()"><b>Check Results</b></a>
<a class="jslink" href="#" onclick="reset()">Reset</a>
</p>
<hr>
<small>
This page is part of the naniJSore project. Get the latest version from
<a href="https://gitorious.org/nanijsore/nanijsore">Gitorious.org</a>.
</small>
</body>
</html>
......@@ -25,8 +25,8 @@ function setup()
// This is the question title, such as "~u verbs".
var title = root.appendChild(document.createElement('h2'));
title.appendChild(document.createTextNode(QUESTION[n].dictionary.about));
title.id = QUESTION[n].html_id + "_title";
// This is the actual question text. It changes when a new word is chosen.
var caption = root.appendChild(document.createElement('p'));
caption.id = QUESTION[n].html_id + "_caption";
......@@ -89,12 +89,18 @@ function reset()
document.getElementById(QUESTION[n].html_id + "_info").innerHTML = "";
// Pick a new word and store it.
var word_number = Math.floor(Math.random() * QUESTION[n].dictionary.word_list.length);
QUESTION[n]["current_word"] = QUESTION[n].dictionary.word_list[word_number];
var tmp = Math.floor(Math.random() * QUESTION[n].dictionary.word_list.length);
var the_word = QUESTION[n].dictionary.word_list[tmp];
QUESTION[n]["current_word"] = the_word.romaji;
// Replace the question title.
var title = QUESTION[n].dictionary.about + ": " + the_word.kanji;
document.getElementById(QUESTION[n].html_id + "_title").innerHTML = title;
// Replace the question text.
var text = "Conjugate <b>" + QUESTION[n]["current_word"] + "</b> in the grid below.";
document.getElementById(QUESTION[n].html_id + '_caption').innerHTML = text;
var text = "Conjugate <b>" + QUESTION[n]["current_word"] + '</b> ("';
text += the_word.description + '") in the grid below.';
document.getElementById(QUESTION[n].html_id + "_caption").innerHTML = text;
}
......
"use strict";
var VERB_ERU = {
about: "~iru/eru verbs",
about: "~iru/eru verb",
word_list:
[
"taberu"
{ "romaji": "kiru", "kanji": "着る", "description": "to wear" },
{ "romaji": "miru", "kanji": "見る", "description": "to see" },
{ "romaji": "okiru", "kanji": "起きる", "description": "to get up" },
{ "romaji": "oriru", "kanji": "降りる", "description": "to get off" },
{ "romaji": "shinjiru", "kanji": "信じる", "description": "to believe" },
{ "romaji": "akeru", "kanji": "開ける", "description": "to open" },
{ "romaji": "ageru", "kanji": "あげる", "description": "to give" },
{ "romaji": "deru", "kanji": "出る", "description": "to go out" },
{ "romaji": "neru", "kanji": "寝る", "description": "to sleep" },
{ "romaji": "taberu", "kanji": "食べる", "description": "to eat" }
],
conjugate: function(word, kwargs)
......
"use strict";
var VERB_U = {
about: "~u verbs",
about: "~u verb",
word_list:
[
"au",
"kaku",
"kiku",
"isogu",
"oyogu",
"utau",
"matsu",
"kaeru",
"shinu",
"asobu",
"nomu",
"hanasu",
"dasu",
"yomu"
//{ "romaji": "au", "kanji": "?", "description": "?" },
{ "romaji": "kaku", "kanji": "書く", "description": "to write" },
{ "romaji": "kiku", "kanji": "聞く", "description": "to listen" },
//{ "romaji": "isogu", "kanji": "?", "description": "?" },
//{ "romaji": "oyogu", "kanji": "?", "description": "?" },
//{ "romaji": "utau", "kanji": "?", "description": "?" },
{ "romaji": "matsu", "kanji": "待つ", "description": "to wait" },
//{ "romaji": "kaeru", "kanji": "?", "description": "?" },
//{ "romaji": "shinu", "kanji": "?", "description": "?" },
//{ "romaji": "asobu", "kanji": "?", "description": "?" },
{ "romaji": "nomu", "kanji": "飲む", "description": "to drink" },
{ "romaji": "hanasu", "kanji": "話す", "description": "to speak" },
//{ "romaji": "dasu", "kanji": "?", "description": "?" },
{ "romaji": "yomu", "kanji": "読む", "description": "to read" }
],
conjugate: function(word, kwargs)
{
var expected_answer = word;
if (kwargs.formal)
{
if (kwargs.negative)
......@@ -69,7 +66,6 @@ var VERB_U = {
} else { return word; }
}
}
};
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