this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix slow code blocking whole component render

+7 -5
+7 -5
src/utils/get-translate-target-language.jsx
··· 8 8 ...navigator.languages, 9 9 ]; 10 10 11 + const localeTargetLanguages = localeMatch( 12 + locales, 13 + translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match` 14 + 'en', 15 + ); 16 + 11 17 function getTranslateTargetLanguage(fromSettings = false) { 12 18 if (fromSettings) { 13 19 const { contentTranslationTargetLanguage } = states.settings; ··· 15 21 return contentTranslationTargetLanguage; 16 22 } 17 23 } 18 - return localeMatch( 19 - locales, 20 - translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match` 21 - 'en', 22 - ); 24 + return localeTargetLanguages; 23 25 } 24 26 25 27 export default getTranslateTargetLanguage;