aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background')
-rw-r--r--ext/js/background/backend.js6
-rw-r--r--ext/js/background/offscreen-proxy.js6
-rw-r--r--ext/js/background/offscreen.js4
3 files changed, 8 insertions, 8 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();
diff --git a/ext/js/background/offscreen-proxy.js b/ext/js/background/offscreen-proxy.js
index 555c3abc..80ff31c0 100644
--- a/ext/js/background/offscreen-proxy.js
+++ b/ext/js/background/offscreen-proxy.js
@@ -159,10 +159,10 @@ export class TranslatorProxy {
}
/**
- * @param {import('deinflector').ReasonsRaw} deinflectionReasons
+ * @param {import('language-transformer').LanguageTransformDescriptor} descriptor
*/
- async prepare(deinflectionReasons) {
- await this._offscreen.sendMessagePromise({action: 'translatorPrepareOffscreen', params: {deinflectionReasons}});
+ async prepare(descriptor) {
+ await this._offscreen.sendMessagePromise({action: 'translatorPrepareOffscreen', params: {descriptor}});
}
/**
diff --git a/ext/js/background/offscreen.js b/ext/js/background/offscreen.js
index a0f5592e..ef05508a 100644
--- a/ext/js/background/offscreen.js
+++ b/ext/js/background/offscreen.js
@@ -115,8 +115,8 @@ export class Offscreen {
}
/** @type {import('offscreen').ApiHandler<'translatorPrepareOffscreen'>} */
- _prepareTranslatorHandler({deinflectionReasons}) {
- this._translator.prepare(deinflectionReasons);
+ _prepareTranslatorHandler({descriptor}) {
+ this._translator.prepare(descriptor);
}
/** @type {import('offscreen').ApiHandler<'findKanjiOffscreen'>} */