This commit is contained in:
syuilo 2018-09-01 12:10:24 +09:00
parent fc6d491bee
commit bb3122d44a
2 changed files with 4 additions and 7 deletions

View file

@ -65,17 +65,14 @@ export default class KeywordModule implements IModule {
let text: string; let text: string;
if (exist) { if (exist) {
text = serifs.keyword.remembered text = serifs.keyword.remembered(kanaToHira(keyword[8]));
.replace('{reading}', kanaToHira(keyword[8]));
} else { } else {
this.learnedKeywords.insertOne({ this.learnedKeywords.insertOne({
keyword: keyword[0], keyword: keyword[0],
learnedAt: Date.now() learnedAt: Date.now()
}); });
text = serifs.keyword.learned text = serifs.keyword.learned(keyword[0], kanaToHira(keyword[8]));
.replace('{word}', keyword[0])
.replace('{reading}', kanaToHira(keyword[8]));
} }
this.ai.post({ this.ai.post({

View file

@ -34,9 +34,9 @@ export default {
}, },
keyword: { keyword: {
learned: '({word}..... {reading}..... 覚えました)', learned: (word, reading) => `(${word}..... ${reading}..... 覚えました)`,
remembered: '{reading}' remembered: (word) => `${word}`
}, },
/** /**