cleanup
This commit is contained in:
parent
b3984ccd54
commit
6e986bf1f5
@ -35,7 +35,7 @@ class Database {
|
||||
}
|
||||
|
||||
prepare() {
|
||||
if (!this.db) {
|
||||
if (this.db) {
|
||||
return Promise.reject('database already initialized');
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class Translator {
|
||||
}
|
||||
|
||||
return this.findTermsDeinflected(text, titles, cache).then(deinfLiteral => {
|
||||
const textHiragana = wanakana._katakanaToHiragana(text);
|
||||
const textHiragana = jpKatakanaToHiragana(text);
|
||||
if (text === textHiragana) {
|
||||
return deinfLiteral;
|
||||
} else {
|
||||
|
@ -43,6 +43,10 @@ function jpIsKana(c) {
|
||||
return wanakana.isKana(c);
|
||||
}
|
||||
|
||||
function jpKatakanaToHiragana(text) {
|
||||
return wanakana._katakanaToHiragana(text);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Commands
|
||||
|
Loading…
Reference in New Issue
Block a user