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;
if (exist) {
text = serifs.keyword.remembered
.replace('{reading}', kanaToHira(keyword[8]));
text = serifs.keyword.remembered(kanaToHira(keyword[8]));
} else {
this.learnedKeywords.insertOne({
keyword: keyword[0],
learnedAt: Date.now()
});
text = serifs.keyword.learned
.replace('{word}', keyword[0])
.replace('{reading}', kanaToHira(keyword[8]));
text = serifs.keyword.learned(keyword[0], kanaToHira(keyword[8]));
}
this.ai.post({

View file

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