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);
|
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();
|
||||||
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user