mirror of
https://github.com/mue/mue.git
synced 2026-07-13 04:02:32 +02:00
chore: run prettier, refactor translations
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// mainly this is just to make life easier when debugging stuff like hover
|
||||
export default function ExperimentalInit() {
|
||||
if (localStorage.getItem('debug') === 'true') {
|
||||
document.onkeydown = (e) => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import I18n from '@eartharoid/i18n';
|
||||
|
||||
import * as de_DE from '../translations/de_DE.json';
|
||||
import * as en_GB from '../translations/en_GB.json';
|
||||
import * as en_US from '../translations/en_US.json';
|
||||
@@ -12,20 +14,22 @@ import * as id_ID from '../translations/id_ID.json';
|
||||
import * as tr_TR from '../translations/tr_TR.json';
|
||||
import * as pt_BR from '../translations/pt_BR.json';
|
||||
|
||||
const translations = {
|
||||
de_DE,
|
||||
en_GB,
|
||||
en_US,
|
||||
es,
|
||||
es_419,
|
||||
fr,
|
||||
nl,
|
||||
no,
|
||||
ru,
|
||||
zh_CN,
|
||||
id_ID,
|
||||
tr_TR,
|
||||
pt_BR,
|
||||
};
|
||||
export default function initTranslations(locale) {
|
||||
const i18n = new I18n(locale, {
|
||||
de_DE,
|
||||
en_GB,
|
||||
en_US,
|
||||
es,
|
||||
es_419,
|
||||
fr,
|
||||
nl,
|
||||
no,
|
||||
ru,
|
||||
zh_CN,
|
||||
id_ID,
|
||||
tr_TR,
|
||||
pt_BR,
|
||||
});
|
||||
|
||||
export default translations;
|
||||
return i18n;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user