lint(curly): consistent use of curly brackets in codebase (#3584)
This commit is contained in:
1 parent
9ae3d9f769
commit
5d435424e2
113 files changed
+1501
-1056
No files matched your search
@@ -4,7 +4,15 @@ const debugMode = !!(
|
||||
|
||||
const detectionOptions = {
|
||||
// order and from where user language should be detected
|
||||
order: ['querystring', 'cookie', 'localStorage', 'navigator', 'htmlTag', 'path', 'subdomain'],
|
||||
order: [
|
||||
'querystring',
|
||||
'cookie',
|
||||
'localStorage',
|
||||
'navigator',
|
||||
'htmlTag',
|
||||
'path',
|
||||
'subdomain',
|
||||
],
|
||||
|
||||
// keys or params to lookup language from
|
||||
lookupQuerystring: 'lng',
|
||||
@@ -18,7 +26,7 @@ const detectionOptions = {
|
||||
excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)
|
||||
|
||||
// optional htmlTag with lang attribute, the default is:
|
||||
htmlTag: document.documentElement
|
||||
htmlTag: document.documentElement,
|
||||
};
|
||||
|
||||
export { debugMode, detectionOptions };
|
||||
@@ -128,7 +128,7 @@ function initI18n(
|
||||
});
|
||||
}
|
||||
|
||||
return initialized.then(function (t) {
|
||||
return initialized.then(function(t) {
|
||||
i18n.T = t;
|
||||
customDebug(`T function available.`, 'info');
|
||||
});
|
||||
@@ -140,7 +140,13 @@ i18n.initializing = initI18n();
|
||||
i18n.initI18n = initI18n;
|
||||
i18n.addLocales = addLocales;
|
||||
i18n.availableLanguages = getAvailableLanguagesInfo(locales);
|
||||
i18n.defaultLanguage = { label: getLanguageLabel(DEFAULT_LANGUAGE), value: DEFAULT_LANGUAGE };
|
||||
i18n.currentLanguage = () => ({ label: getLanguageLabel(i18n.language), value: i18n.language });
|
||||
i18n.defaultLanguage = {
|
||||
label: getLanguageLabel(DEFAULT_LANGUAGE),
|
||||
value: DEFAULT_LANGUAGE,
|
||||
};
|
||||
i18n.currentLanguage = () => ({
|
||||
label: getLanguageLabel(i18n.language),
|
||||
value: i18n.language,
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
@@ -19,5 +19,5 @@ export default {
|
||||
...pt_BR,
|
||||
...vi,
|
||||
...zh,
|
||||
...test_lng
|
||||
...test_lng,
|
||||
};
|
||||
@@ -32,6 +32,6 @@ export default {
|
||||
PatientInfo,
|
||||
Modes,
|
||||
SidePanel,
|
||||
Modals
|
||||
Modals,
|
||||
},
|
||||
};
|
||||
@@ -57,7 +57,7 @@ const languagesMap = {
|
||||
'test-LNG': 'Test Language',
|
||||
};
|
||||
|
||||
const getLanguageLabel = (language) => {
|
||||
const getLanguageLabel = language => {
|
||||
return languagesMap[language];
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user