Added note about language degradation

This commit is contained in:
Stuart Taylor
2016-11-06 10:41:37 +00:00
parent 2434f268eb
commit 9d46ebfc29
4 changed files with 55 additions and 8 deletions

View File

@ -111,13 +111,18 @@ export function mapChallengeToLang(
lang = 'en';
}
const translation = translations[lang] || {};
const isTranslated = Object.keys(translation).length > 0;
if (lang !== 'en') {
challenge = {
...challenge,
...translation
...translation,
isTranslated
};
}
return challenge;
return {
...challenge,
isTranslated
};
}
export function getMapForLang(lang) {
@ -133,4 +138,3 @@ export function getMapForLang(lang) {
return { result, entities };
};
}