Move more data files (#1373)

* Move deinflect.json

* Move button.mp3

* Move fonts
This commit is contained in:
toasted-nutbread 2021-02-12 20:37:43 -05:00 committed by GitHub
parent f70464e5f3
commit 8454f52378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 5 deletions

View File

@ -207,7 +207,7 @@ class Backend {
yomichan.logError(e);
}
const deinflectionReasions = await this._fetchAsset('/bg/lang/deinflect.json', true);
const deinflectionReasions = await this._fetchAsset('/data/deinflect.json', true);
this._translator.prepare(deinflectionReasions);
await this._optionsUtil.prepare();

View File

@ -208,7 +208,7 @@
/* Fonts */
@font-face {
font-family: kanji-stroke-orders;
src: url('/mixed/ttf/kanji-stroke-orders.ttf');
src: url('/data/fonts/kanji-stroke-orders.ttf');
}

View File

@ -35,7 +35,7 @@ class AudioSystem {
getFallbackAudio() {
if (this._fallbackAudio === null) {
this._fallbackAudio = new Audio('/mixed/mp3/button.mp3');
this._fallbackAudio = new Audio('/data/audio/button.mp3');
}
return this._fallbackAudio;
}

View File

@ -884,7 +884,7 @@ function testDeinflections() {
vm.execute(['bg/js/deinflector.js']);
const [Deinflector] = vm.get(['Deinflector']);
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'bg/lang/deinflect.json')));
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json')));
const deinflector = new Deinflector(deinflectionReasions);
for (const {valid, tests} of data) {

View File

@ -81,7 +81,7 @@ async function createVM() {
// Setup translator
const japaneseUtil = new JapaneseUtil(null);
const translator = new Translator({japaneseUtil, database: dictionaryDatabase});
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'bg/lang/deinflect.json')));
const deinflectionReasions = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json')));
translator.prepare(deinflectionReasions);
// Done