chore: run prettier, refactor translations

This commit is contained in:
David Ralph
2023-03-14 23:53:05 +00:00
parent 0990774b41
commit ad39f4a732
11 changed files with 114 additions and 151 deletions

View File

@@ -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) => {

View File

@@ -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;
}