diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2023-12-23 11:29:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-23 10:29:48 +0000 |
commit | 6550495282780abaaa4c1aa4d33e3907fedf2927 (patch) | |
tree | 48d176ccac8a802e1bf03caf175d0f02c124cc97 | |
parent | 76c52d2ea08d9764c8f044c1f3a8c1eaf6434828 (diff) |
move dictionary files to dictionary folder (#429)
21 files changed, 21 insertions, 21 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 87309296..bd90f4fc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -651,7 +651,7 @@ "ext/js/general/regex-util.js", "ext/js/general/text-source-map.js", "ext/js/language/deinflector.js", - "ext/js/language/dictionary-database.js", + "ext/js/dictionary/dictionary-database.js", "ext/js/language/sandbox/dictionary-data-util.js", "ext/js/language/sandbox/japanese-util.js", "ext/js/language/translator.js", @@ -679,10 +679,10 @@ "ext/js/data/database.js", "ext/js/data/json-schema.js", "ext/js/general/cache-map.js", - "ext/js/language/dictionary-database.js", - "ext/js/language/dictionary-importer.js", - "ext/js/language/dictionary-worker-handler.js", - "ext/js/language/dictionary-worker-media-loader.js", + "ext/js/dictionary/dictionary-database.js", + "ext/js/dictionary/dictionary-importer.js", + "ext/js/dictionary/dictionary-worker-handler.js", + "ext/js/dictionary/dictionary-worker-media-loader.js", "ext/js/media/media-util.js" ], "env": { diff --git a/dev/jsconfig.json b/dev/jsconfig.json index d613e88d..a7540068 100644 --- a/dev/jsconfig.json +++ b/dev/jsconfig.json @@ -64,8 +64,8 @@ "../ext/js/general/regex-util.js", "../ext/js/general/text-source-map.js", "../ext/js/language/deinflector.js", - "../ext/js/language/dictionary-importer.js", - "../ext/js/language/dictionary-database.js", + "../ext/js/dictionary/dictionary-importer.js", + "../ext/js/dictionary/dictionary-database.js", "../ext/js/language/sandbox/dictionary-data-util.js", "../ext/js/language/sandbox/japanese-util.js", "../ext/js/language/translator.js", diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index f7cad1e6..df4b9777 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -30,9 +30,9 @@ import {AnkiUtil} from '../data/anki-util.js'; import {OptionsUtil} from '../data/options-util.js'; import {PermissionsUtil} from '../data/permissions-util.js'; import {ArrayBufferUtil} from '../data/sandbox/array-buffer-util.js'; +import {DictionaryDatabase} from '../dictionary/dictionary-database.js'; import {Environment} from '../extension/environment.js'; import {ObjectPropertyAccessor} from '../general/object-property-accessor.js'; -import {DictionaryDatabase} from '../language/dictionary-database.js'; import {JapaneseUtil} from '../language/sandbox/japanese-util.js'; import {Translator} from '../language/translator.js'; import {AudioDownloader} from '../media/audio-downloader.js'; diff --git a/ext/js/background/offscreen.js b/ext/js/background/offscreen.js index 7e3576ba..05c655df 100644 --- a/ext/js/background/offscreen.js +++ b/ext/js/background/offscreen.js @@ -20,7 +20,7 @@ import * as wanakana from '../../lib/wanakana.js'; import {ClipboardReader} from '../comm/clipboard-reader.js'; import {createApiMap, invokeApiMapHandler} from '../core/api-map.js'; import {ArrayBufferUtil} from '../data/sandbox/array-buffer-util.js'; -import {DictionaryDatabase} from '../language/dictionary-database.js'; +import {DictionaryDatabase} from '../dictionary/dictionary-database.js'; import {JapaneseUtil} from '../language/sandbox/japanese-util.js'; import {Translator} from '../language/translator.js'; diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js index dce71938..9d93b497 100644 --- a/ext/js/data/sandbox/anki-note-data-creator.js +++ b/ext/js/data/sandbox/anki-note-data-creator.js @@ -16,7 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import {DictionaryDataUtil} from '../../language/sandbox/dictionary-data-util.js'; +import {DictionaryDataUtil} from '../../dictionary/dictionary-data-util.js'; /** * This class is used to convert the internal dictionary entry format to the diff --git a/ext/js/language/sandbox/dictionary-data-util.js b/ext/js/dictionary/dictionary-data-util.js index a54b043b..a54b043b 100644 --- a/ext/js/language/sandbox/dictionary-data-util.js +++ b/ext/js/dictionary/dictionary-data-util.js diff --git a/ext/js/language/dictionary-database.js b/ext/js/dictionary/dictionary-database.js index 45c5c6fd..45c5c6fd 100644 --- a/ext/js/language/dictionary-database.js +++ b/ext/js/dictionary/dictionary-database.js diff --git a/ext/js/language/dictionary-importer-media-loader.js b/ext/js/dictionary/dictionary-importer-media-loader.js index a5857dce..a5857dce 100644 --- a/ext/js/language/dictionary-importer-media-loader.js +++ b/ext/js/dictionary/dictionary-importer-media-loader.js diff --git a/ext/js/language/dictionary-importer.js b/ext/js/dictionary/dictionary-importer.js index 2c0c7e9c..2c0c7e9c 100644 --- a/ext/js/language/dictionary-importer.js +++ b/ext/js/dictionary/dictionary-importer.js diff --git a/ext/js/language/dictionary-worker-handler.js b/ext/js/dictionary/dictionary-worker-handler.js index 9a724386..9a724386 100644 --- a/ext/js/language/dictionary-worker-handler.js +++ b/ext/js/dictionary/dictionary-worker-handler.js diff --git a/ext/js/language/dictionary-worker-main.js b/ext/js/dictionary/dictionary-worker-main.js index 8ae283b8..8ae283b8 100644 --- a/ext/js/language/dictionary-worker-main.js +++ b/ext/js/dictionary/dictionary-worker-main.js diff --git a/ext/js/language/dictionary-worker-media-loader.js b/ext/js/dictionary/dictionary-worker-media-loader.js index e19a13d3..e19a13d3 100644 --- a/ext/js/language/dictionary-worker-media-loader.js +++ b/ext/js/dictionary/dictionary-worker-media-loader.js diff --git a/ext/js/language/dictionary-worker.js b/ext/js/dictionary/dictionary-worker.js index 3119dd7b..669c65ac 100644 --- a/ext/js/language/dictionary-worker.js +++ b/ext/js/dictionary/dictionary-worker.js @@ -73,7 +73,7 @@ export class DictionaryWorker { */ _invoke(action, params, transfer, onProgress, formatResult) { return new Promise((resolve, reject) => { - const worker = new Worker('/js/language/dictionary-worker-main.js', {type: 'module'}); + const worker = new Worker('/js/dictionary/dictionary-worker-main.js', {type: 'module'}); /** @type {import('dictionary-worker').InvokeDetails<TResponseRaw, TResponse>} */ const details = { complete: false, diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 87b02f8a..920d2c94 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -18,8 +18,8 @@ import {isObject} from '../core.js'; import {ExtensionError} from '../core/extension-error.js'; +import {DictionaryDataUtil} from '../dictionary/dictionary-data-util.js'; import {HtmlTemplateCollection} from '../dom/html-template-collection.js'; -import {DictionaryDataUtil} from '../language/sandbox/dictionary-data-util.js'; import {yomitan} from '../yomitan.js'; import {PronunciationGenerator} from './sandbox/pronunciation-generator.js'; import {StructuredContentGenerator} from './sandbox/structured-content-generator.js'; diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index ddbd8578..45909940 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -31,7 +31,7 @@ export class Translator { constructor({japaneseUtil, database}) { /** @type {import('./sandbox/japanese-util.js').JapaneseUtil} */ this._japaneseUtil = japaneseUtil; - /** @type {import('./dictionary-database.js').DictionaryDatabase} */ + /** @type {import('../dictionary/dictionary-database.js').DictionaryDatabase} */ this._database = database; /** @type {?Deinflector} */ this._deinflector = null; diff --git a/ext/js/pages/settings/dictionary-controller.js b/ext/js/pages/settings/dictionary-controller.js index 6e9522db..db6a73d4 100644 --- a/ext/js/pages/settings/dictionary-controller.js +++ b/ext/js/pages/settings/dictionary-controller.js @@ -17,8 +17,8 @@ */ import {EventListenerCollection, log} from '../../core.js'; +import {DictionaryWorker} from '../../dictionary/dictionary-worker.js'; import {querySelectorNotNull} from '../../dom/query-selector.js'; -import {DictionaryWorker} from '../../language/dictionary-worker.js'; import {yomitan} from '../../yomitan.js'; class DictionaryEntry { diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index 35b7c461..c478b265 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -18,8 +18,8 @@ import {log} from '../../core.js'; import {ExtensionError} from '../../core/extension-error.js'; +import {DictionaryWorker} from '../../dictionary/dictionary-worker.js'; import {querySelectorNotNull} from '../../dom/query-selector.js'; -import {DictionaryWorker} from '../../language/dictionary-worker.js'; import {yomitan} from '../../yomitan.js'; import {DictionaryController} from './dictionary-controller.js'; diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js index 515e85da..d69c7b47 100644 --- a/ext/js/templates/sandbox/anki-template-renderer.js +++ b/ext/js/templates/sandbox/anki-template-renderer.js @@ -18,10 +18,10 @@ import {Handlebars} from '../../../lib/handlebars.js'; import {AnkiNoteDataCreator} from '../../data/sandbox/anki-note-data-creator.js'; +import {DictionaryDataUtil} from '../../dictionary/dictionary-data-util.js'; import {PronunciationGenerator} from '../../display/sandbox/pronunciation-generator.js'; import {StructuredContentGenerator} from '../../display/sandbox/structured-content-generator.js'; import {CssStyleApplier} from '../../dom/sandbox/css-style-applier.js'; -import {DictionaryDataUtil} from '../../language/sandbox/dictionary-data-util.js'; import {JapaneseUtil} from '../../language/sandbox/japanese-util.js'; import {AnkiTemplateRendererContentManager} from './anki-template-renderer-content-manager.js'; import {TemplateRendererMediaProvider} from './template-renderer-media-provider.js'; diff --git a/test/database.test.js b/test/database.test.js index 86c69a41..4a52f18d 100644 --- a/test/database.test.js +++ b/test/database.test.js @@ -22,8 +22,8 @@ import path from 'path'; import {beforeEach, describe, expect, test, vi} from 'vitest'; import {parseJson} from '../dev/json.js'; import {createDictionaryArchive} from '../dev/util.js'; -import {DictionaryDatabase} from '../ext/js/language/dictionary-database.js'; -import {DictionaryImporter} from '../ext/js/language/dictionary-importer.js'; +import {DictionaryDatabase} from '../ext/js/dictionary/dictionary-database.js'; +import {DictionaryImporter} from '../ext/js/dictionary/dictionary-importer.js'; import {DictionaryImporterMediaLoader} from './mocks/dictionary-importer-media-loader.js'; const dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/test/fixtures/translator-test.js b/test/fixtures/translator-test.js index 0afbe1f0..83644513 100644 --- a/test/fixtures/translator-test.js +++ b/test/fixtures/translator-test.js @@ -24,8 +24,8 @@ import {expect, vi} from 'vitest'; import {parseJson} from '../../dev/json.js'; import {createDictionaryArchive} from '../../dev/util.js'; import {AnkiNoteDataCreator} from '../../ext/js/data/sandbox/anki-note-data-creator.js'; -import {DictionaryDatabase} from '../../ext/js/language/dictionary-database.js'; -import {DictionaryImporter} from '../../ext/js/language/dictionary-importer.js'; +import {DictionaryDatabase} from '../../ext/js/dictionary/dictionary-database.js'; +import {DictionaryImporter} from '../../ext/js/dictionary/dictionary-importer.js'; import {JapaneseUtil} from '../../ext/js/language/sandbox/japanese-util.js'; import {Translator} from '../../ext/js/language/translator.js'; import {chrome, fetch} from '../mocks/common.js'; diff --git a/types/ext/translator.d.ts b/types/ext/translator.d.ts index 39d4be81..f1eb6bcc 100644 --- a/types/ext/translator.d.ts +++ b/types/ext/translator.d.ts @@ -15,7 +15,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import type {DictionaryDatabase} from '../../ext/js/language/dictionary-database'; +import type {DictionaryDatabase} from '../../ext/js/dictionary/dictionary-database'; import type {JapaneseUtil} from '../../ext/js/language/sandbox/japanese-util'; import type * as Dictionary from './dictionary'; import type * as DictionaryDatabaseTypes from './dictionary-database'; |