From c198a0f91942b8016b272c8a5fad609c1ff18ef1 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 13 Apr 2016 17:28:44 -0700 Subject: [PATCH] Bugfix --- ext/bg/js/dictionary.js | 4 ++-- util/data/edict | 3 +++ util/data/enamdict | 3 +++ util/data/kanjidic | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 util/data/edict create mode 100644 util/data/enamdict create mode 100644 util/data/kanjidic diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js index 185aaee2..366692b0 100644 --- a/ext/bg/js/dictionary.js +++ b/ext/bg/js/dictionary.js @@ -32,13 +32,13 @@ class Dictionary { } findTerm(term) { - const results = []; + let results = []; for (const name in this.termDicts) { const dict = this.termDicts[name]; const indices = dict.indices[term] || []; - results.push( + results = results.concat( indices.map(index => { const [e, r, t, ...g] = dict.defs[index]; return {id: index, expression: e, reading: r, glossary: g.join('; '), tags: t.split(' ')}; diff --git a/util/data/edict b/util/data/edict new file mode 100644 index 00000000..35fc6bdd --- /dev/null +++ b/util/data/edict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51b9e6f5761f3a9c2d1f6c65df131ad3fa60738ffda06e1e0cfb07fdfe6acd89 +size 15655597 diff --git a/util/data/enamdict b/util/data/enamdict new file mode 100644 index 00000000..17004236 --- /dev/null +++ b/util/data/enamdict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd670f8c8a020aeb2b870d186d223702e91e0538cec04a784b1433363aff9f9 +size 26426507 diff --git a/util/data/kanjidic b/util/data/kanjidic new file mode 100644 index 00000000..dbfb510f --- /dev/null +++ b/util/data/kanjidic @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:494d5a6d750444907995eb3be7bbe7d817a20d3431ae0d8c944715690610b69c +size 1213904