SHA256
Локализовать интерфейс SHiNE на русский и английский
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { t } from '../i18n/index.js';
|
||||
import { iconHtml } from './ui-icon.js';
|
||||
import { createDropdownMenu } from './dropdown-menu.js';
|
||||
|
||||
@@ -63,8 +64,8 @@ export function createTopBar({
|
||||
button.type = 'button';
|
||||
button.className = `icon-btn topbar__back${backAction.className ? ` ${backAction.className}` : ''}`;
|
||||
button.innerHTML = iconHtml('back');
|
||||
button.setAttribute('aria-label', backAction.ariaLabel || 'Назад');
|
||||
button.title = backAction.title || 'Назад';
|
||||
button.setAttribute('aria-label', backAction.ariaLabel || t('screens.topbar.text_004'));
|
||||
button.title = backAction.title || t('screens.topbar.text_005');
|
||||
button.addEventListener('click', backAction.onClick);
|
||||
leftSlot.append(button);
|
||||
}
|
||||
@@ -147,8 +148,8 @@ export function createSearchTopBar({
|
||||
clear.type = 'button';
|
||||
clear.className = 'topbar-search__clear';
|
||||
clear.innerHTML = iconHtml('close');
|
||||
clear.setAttribute('aria-label', 'Очистить');
|
||||
clear.title = 'Очистить';
|
||||
clear.setAttribute('aria-label', t('screens.topbar.text_006'));
|
||||
clear.title = t('screens.topbar.text_001');
|
||||
clear.hidden = !value;
|
||||
clear.addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
@@ -174,7 +175,7 @@ export function createSearchTopBar({
|
||||
const topbar = createTopBar({
|
||||
center: field,
|
||||
className: `topbar--search${className ? ` ${className}` : ''}`,
|
||||
back: { onClick: () => onClose?.(), ariaLabel: 'Закрыть поиск', title: 'Закрыть поиск' },
|
||||
back: { onClick: () => onClose?.(), ariaLabel: t('screens.topbar.text_002'), title: t('screens.topbar.text_003') },
|
||||
actions,
|
||||
});
|
||||
topbar.searchInput = input;
|
||||
|
||||
Reference in New Issue
Block a user