Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move dictionary files to dictionary folder #429

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions dev/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ext/js/background/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion ext/js/background/offscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion ext/js/data/sandbox/anki-note-data-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/js/display/display-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/js/pages/settings/dictionary-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ext/js/pages/settings/dictionary-import-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion ext/js/templates/sandbox/anki-template-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions test/database.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/translator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion types/ext/translator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down