mirror of https://github.com/mue/mue.git
fix(dev): errors and translation bug
This commit is contained in:
parent
c81c01d484
commit
fa5fd00de9
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6"
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
|
@ -110,3 +110,5 @@ Favourite.propTypes = {
|
|||
offline: PropTypes.bool,
|
||||
pun: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Favourite;
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
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';
|
||||
import * as es from '../translations/es.json';
|
||||
import * as es_419 from '../translations/es_419.json';
|
||||
import * as fr from '../translations/fr.json';
|
||||
import * as nl from '../translations/nl.json';
|
||||
import * as no from '../translations/no.json';
|
||||
import * as ru from '../translations/ru.json';
|
||||
import * as zh_CN from '../translations/zh_CN.json';
|
||||
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';
|
||||
|
||||
|
||||
/**
|
||||
* Initialise the i18n object.
|
||||
* The i18n object is then returned.
|
||||
|
@ -8,20 +23,20 @@ import I18n from '@eartharoid/i18n';
|
|||
*/
|
||||
export default function initTranslations(locale) {
|
||||
const i18n = new I18n(locale, {
|
||||
de_DE: import('../translations/de_DE.json'),
|
||||
en_GB: import('../translations/en_GB.json'),
|
||||
en_US: import('../translations/en_US.json'),
|
||||
es: import('../translations/es.json'),
|
||||
es_419: import('../translations/es_419.json'),
|
||||
fr: import('../translations/fr.json'),
|
||||
nl: import('../translations/nl.json'),
|
||||
no: import('../translations/no.json'),
|
||||
ru: import('../translations/ru.json'),
|
||||
zh_CN: import('../translations/zh_CN.json'),
|
||||
id_ID: import('../translations/id_ID.json'),
|
||||
tr_TR: import('../translations/tr_TR.json'),
|
||||
pt_BR: import('../translations/pt_BR.json'),
|
||||
de_DE,
|
||||
en_GB,
|
||||
en_US,
|
||||
es,
|
||||
es_419,
|
||||
fr,
|
||||
nl,
|
||||
no,
|
||||
ru,
|
||||
zh_CN,
|
||||
id_ID,
|
||||
tr_TR,
|
||||
pt_BR,
|
||||
});
|
||||
|
||||
return i18n;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue