mirror of
https://github.com/mue/mue.git
synced 2026-07-12 02:42:07 +02:00
fix(achievements): i18n
This commit is contained in:
@@ -1,47 +1,12 @@
|
||||
import variables from 'config/variables';
|
||||
|
||||
// import de_DE from 'i18n/locales/achievements/de_DE.json';
|
||||
// import en-GB from 'i18n/locales/achievements/en-GB.json';
|
||||
// import en_US from 'i18n/locales/achievements/en_US.json';
|
||||
// import es from 'i18n/locales/achievements/es.json';
|
||||
// import fr from 'i18n/locales/achievements/fr.json';
|
||||
// import nl from 'i18n/locales/achievements/nl.json';
|
||||
// import no from 'i18n/locales/achievements/no.json';
|
||||
// import ru from 'i18n/locales/achievements/ru.json';
|
||||
// import zh_CN from 'i18n/locales/achievements/zh_CN.json';
|
||||
// import id_ID from 'i18n/locales/achievements/id_ID.json';
|
||||
// import tr_TR from 'i18n/locales/achievements/tr_TR.json';
|
||||
// import bn from 'i18n/locales/achievements/bn.json';
|
||||
// import pt_BR from 'i18n/locales/achievements/pt_BR.json';
|
||||
|
||||
import achievements from '../../achievements.json';
|
||||
|
||||
import { checkAchievements, newAchievements } from './condition';
|
||||
|
||||
// const translations = {
|
||||
// de_DE,
|
||||
// en-GB,
|
||||
// en_US,
|
||||
// es,
|
||||
// fr,
|
||||
// nl,
|
||||
// no,
|
||||
// ru,
|
||||
// zh_CN,
|
||||
// id_ID,
|
||||
// tr_TR,
|
||||
// bn,
|
||||
// pt_BR,
|
||||
// };
|
||||
|
||||
// todo: clean this up and condition.js too
|
||||
function getLocalisedAchievementData(id) {
|
||||
// const localised = translations[variables.locale_id][id] ||
|
||||
// translations.en-GB[id] || { name: id, description: '' };
|
||||
// return {
|
||||
// name: localised.name,
|
||||
// description: localised.description,
|
||||
// };
|
||||
return {
|
||||
name: variables.getMessage(`achievements:${id}.name`),
|
||||
description: variables.getMessage(`achievements:${id}.description`)
|
||||
};
|
||||
}
|
||||
|
||||
export { achievements, checkAchievements, newAchievements, getLocalisedAchievementData };
|
||||
|
||||
Reference in New Issue
Block a user