From c9defd949fc396dde03877134c315e9f4e77b4b3 Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Wed, 20 Jul 2022 12:17:26 +0800 Subject: [PATCH] i18n --- example/example-i18n.html | 6 ++++-- src/components/i18n/locales/en/messages.json | 8 +++++--- src/components/modules/toolbar/blockSettings.ts | 4 ++-- src/components/modules/toolbar/index.ts | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/example/example-i18n.html b/example/example-i18n.html index c123bd7b..930dbaef 100644 --- a/example/example-i18n.html +++ b/example/example-i18n.html @@ -194,9 +194,11 @@ "toolbar": { "toolbox": { "Add": "Добавить", - "Filter": "Поиск", - "Nothing found": "Ничего не найдено" } + }, + "popover": { + "Filter": "Поиск", + "Nothing found": "Ничего не найдено" } }, diff --git a/src/components/i18n/locales/en/messages.json b/src/components/i18n/locales/en/messages.json index d44df52c..34cc3477 100644 --- a/src/components/i18n/locales/en/messages.json +++ b/src/components/i18n/locales/en/messages.json @@ -13,10 +13,12 @@ }, "toolbar": { "toolbox": { - "Add": "", - "Filter": "", - "Nothing found": "" + "Add": "" } + }, + "popover": { + "Filter": "", + "Nothing found": "" } }, "toolNames": { diff --git a/src/components/modules/toolbar/blockSettings.ts b/src/components/modules/toolbar/blockSettings.ts index f42bc4d1..657ee474 100644 --- a/src/components/modules/toolbar/blockSettings.ts +++ b/src/components/modules/toolbar/blockSettings.ts @@ -110,8 +110,8 @@ export default class BlockSettings extends Module { this.popover = new Popover({ className: this.CSS.settings, searchable: true, - filterLabel: I18n.ui(I18nInternalNS.ui.toolbar.toolbox, 'Filter'), - nothingFoundLabel: I18n.ui(I18nInternalNS.ui.toolbar.toolbox, 'Nothing found'), + filterLabel: I18n.ui(I18nInternalNS.ui.popover, 'Filter'), + nothingFoundLabel: I18n.ui(I18nInternalNS.ui.popover, 'Nothing found'), items: this.prepareTunesItems(tunesItems), customContent: this.nodes.renderedTunes, api: this.Editor.API.methods, diff --git a/src/components/modules/toolbar/index.ts b/src/components/modules/toolbar/index.ts index 7713b7c5..5c469fa0 100644 --- a/src/components/modules/toolbar/index.ts +++ b/src/components/modules/toolbar/index.ts @@ -407,8 +407,8 @@ export default class Toolbar extends Module { api: this.Editor.API.methods, tools: this.Editor.Tools.blockTools, i18nLabels: { - filter: I18n.ui(I18nInternalNS.ui.toolbar.toolbox, 'Filter'), - nothingFound: I18n.ui(I18nInternalNS.ui.toolbar.toolbox, 'Nothing found'), + filter: I18n.ui(I18nInternalNS.ui.popover, 'Filter'), + nothingFound: I18n.ui(I18nInternalNS.ui.popover, 'Nothing found'), }, });