diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2024-02-27 13:16:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 12:16:21 +0000 |
commit | 0792954e345925b3e3b2ebb733367e138375978e (patch) | |
tree | a9f169cf7dc2de396d6e46c9d8c418f9870d9301 /test/fixtures/translator-test.js | |
parent | c4fea2251606fb0b3d0d761a544dac578f3d9048 (diff) |
make deinflections language-specific (#720)
* abstract deinflections
* undo redundant changes
* remove cast
* MultiLanguageTransformer
* comments
* comments
Diffstat (limited to 'test/fixtures/translator-test.js')
-rw-r--r-- | test/fixtures/translator-test.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/fixtures/translator-test.js b/test/fixtures/translator-test.js index ff3782a7..6b6eaad8 100644 --- a/test/fixtures/translator-test.js +++ b/test/fixtures/translator-test.js @@ -31,7 +31,7 @@ import {DictionaryImporterMediaLoader} from '../mocks/dictionary-importer-media- import {createDomTest} from './dom-test.js'; const extDir = join(dirname(fileURLToPath(import.meta.url)), '../../ext'); -const languageTransformDescriptorPath = join(extDir, 'data/language/japanese-transforms.json'); +const languageTransformDescriptorPath = join(extDir, 'js/language/ja/japanese-transforms.json'); vi.stubGlobal('indexedDB', indexedDB); vi.stubGlobal('IDBKeyRange', IDBKeyRange); @@ -65,7 +65,7 @@ export async function createTranslatorContext(dictionaryDirectory, dictionaryNam const translator = new Translator(dictionaryDatabase); /** @type {import('language-transformer').LanguageTransformDescriptor} */ const deinflectionReasons = parseJson(readFileSync(languageTransformDescriptorPath, {encoding: 'utf8'})); - translator.prepare(deinflectionReasons); + translator.prepare([deinflectionReasons]); return translator; } |