Move more data files (#1373)
* Move deinflect.json * Move button.mp3 * Move fonts
This commit is contained in:
parent
f70464e5f3
commit
8454f52378
@ -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();
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user