summaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-31 08:28:05 -0500
committerGitHub <noreply@github.com>2024-01-31 13:28:05 +0000
commit3e419aa562aab03ca20421aaf7e4d1a39194a5b4 (patch)
tree15e8bfe81fa5e3fae55e54802f14d94a7502a469 /ext/js/background/backend.js
parent6807b05e9bd41f013364fae0cbcce83cf1ed37b6 (diff)
Language transformer (#582)
* Set up new deinflection data file * Define types * Test * Add internal types * Set up loading for transforms * Add getPartOfSpeechFlags * Convert static methods * Add note * Add transform function * Update trace structure * Add a language tag to the language transform descriptor * Add clear function * Add function for multiple parts of speech * Clarify naming * Add getConditionFlagsFromConditionType * Add plural function * Replace usages of Deinflector * Update tests * Update config * Remove old * Rename * Rename files
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 74c1370c..0773dc4b 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -282,9 +282,9 @@ export class Backend {
log.error(e);
}
- /** @type {import('deinflector').ReasonsRaw} */
- const deinflectionReasons = await this._fetchJson('/data/deinflect.json');
- this._translator.prepare(deinflectionReasons);
+ /** @type {import('language-transformer').LanguageTransformDescriptor} */
+ const descriptor = await this._fetchJson('/data/language/japanese-transforms.json');
+ this._translator.prepare(descriptor);
await this._optionsUtil.prepare();
this._defaultAnkiFieldTemplates = (await this._fetchText('/data/templates/default-anki-field-templates.handlebars')).trim();