This commit is contained in:
@ -2,7 +2,6 @@
|
||||
currentLang = document.documentElement.lang;
|
||||
|
||||
const LOCALES_SELECT_MENU = {
|
||||
ru: {
|
||||
platform: "Платформа",
|
||||
ecm: "ECM",
|
||||
crm: "CRM",
|
||||
@ -10,15 +9,6 @@ const LOCALES_SELECT_MENU = {
|
||||
business_solutions: "Бизнес-решения",
|
||||
service: "Service",
|
||||
kedo: "КЭДО",
|
||||
},
|
||||
en: {
|
||||
platform: "Platform",
|
||||
ecm: "ECM",
|
||||
crm: "CRM",
|
||||
projects: "Projects",
|
||||
business_solutions: "Business Solutions",
|
||||
service: "Service",
|
||||
},
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
@ -222,7 +212,7 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
|
||||
"key=" +
|
||||
CONFIG.apikey +
|
||||
"&cx=" +
|
||||
CONFIG[currentLang].cx +
|
||||
CONFIG.cx +
|
||||
"&q=" +
|
||||
requestValue +
|
||||
"&start=" +
|
||||
@ -243,7 +233,7 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
|
||||
"key=" +
|
||||
CONFIG.apikey +
|
||||
"&cx=" +
|
||||
CONFIG[currentLang].cx +
|
||||
CONFIG.cx +
|
||||
"&q=" +
|
||||
requestValue +
|
||||
"&start=" +
|
||||
@ -259,8 +249,8 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
|
||||
).innerHTML = `<div class="search-res__notice search-res__notice_error">
|
||||
<img src="./warning.svg" alt="warning">
|
||||
<div class="search-res__notice-description">
|
||||
<p class="notice__title">${NOTIFICATION_TEXT.error[currentLang].elma365[0]}</p>
|
||||
<p class="notice__description">${NOTIFICATION_TEXT.error[currentLang].elma365[1]}</p>
|
||||
<p class="notice__title">${NOTIFICATION_TEXT.error.elma365[0]}</p>
|
||||
<p class="notice__description">${NOTIFICATION_TEXT.error.elma365[1]}</p>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
@ -314,8 +304,8 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
|
||||
html = `
|
||||
<div class="search-res__notice search-res__notice_no-result">
|
||||
<div class="search-res__notice-description">
|
||||
<p class="notice__title">${NOTIFICATION_TEXT.noResults[currentLang].elma365[0]}</p>
|
||||
<p class="notice__description">${NOTIFICATION_TEXT.noResults[currentLang].elma365[1]}</p>
|
||||
<p class="notice__title">${NOTIFICATION_TEXT.noResults.elma365[0]}</p>
|
||||
<p class="notice__description">${NOTIFICATION_TEXT.noResults.elma365[1]}</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@ -747,31 +737,31 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
|
||||
|
||||
switch (true) {
|
||||
case /help\/platform/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].platform;
|
||||
textContent = LOCALES_SELECT_MENU.platform;
|
||||
break;
|
||||
case /help\/ecm/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].ecm;
|
||||
textContent = LOCALES_SELECT_MENU.ecm;
|
||||
break;
|
||||
case /help\/crm/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].crm;
|
||||
textContent = LOCALES_SELECT_MENU.crm;
|
||||
break;
|
||||
case /help\/projects/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].projects;
|
||||
textContent = LOCALES_SELECT_MENU.projects;
|
||||
break;
|
||||
|
||||
case /help\/business_solutions/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].business_solutions;
|
||||
textContent = LOCALES_SELECT_MENU.business_solutions;
|
||||
break;
|
||||
|
||||
case /help\/service/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].service;
|
||||
textContent = LOCALES_SELECT_MENU.service;
|
||||
break;
|
||||
case /help\/kedo/i.test(url):
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].kedo;
|
||||
textContent = LOCALES_SELECT_MENU.kedo;
|
||||
break;
|
||||
|
||||
default:
|
||||
textContent = LOCALES_SELECT_MENU[currentLang].platform;
|
||||
textContent = LOCALES_SELECT_MENU.platform;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user