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); 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); this._translator.prepare(deinflectionReasions);
await this._optionsUtil.prepare(); await this._optionsUtil.prepare();

View File

@ -208,7 +208,7 @@
/* Fonts */ /* Fonts */
@font-face { @font-face {
font-family: kanji-stroke-orders; 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() { getFallbackAudio() {
if (this._fallbackAudio === null) { if (this._fallbackAudio === null) {
this._fallbackAudio = new Audio('/mixed/mp3/button.mp3'); this._fallbackAudio = new Audio('/data/audio/button.mp3');
} }
return this._fallbackAudio; return this._fallbackAudio;
} }

View File

@ -884,7 +884,7 @@ function testDeinflections() {
vm.execute(['bg/js/deinflector.js']); vm.execute(['bg/js/deinflector.js']);
const [Deinflector] = vm.get(['Deinflector']); 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); const deinflector = new Deinflector(deinflectionReasions);
for (const {valid, tests} of data) { for (const {valid, tests} of data) {

View File

@ -81,7 +81,7 @@ async function createVM() {
// Setup translator // Setup translator
const japaneseUtil = new JapaneseUtil(null); const japaneseUtil = new JapaneseUtil(null);
const translator = new Translator({japaneseUtil, database: dictionaryDatabase}); 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); translator.prepare(deinflectionReasions);
// Done // Done