From 5adbf55978aa082c36ba9e83a9da8eecc12c6bd1 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 5 Dec 2024 09:17:53 -0700 Subject: [PATCH] clean up registry error message --- src/plugins/embeddable/public/add_from_library/registry.ts | 6 +----- x-pack/plugins/translations/translations/fr-FR.json | 1 - x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/plugins/embeddable/public/add_from_library/registry.ts b/src/plugins/embeddable/public/add_from_library/registry.ts index 7c2d3c2d5c9f2..03af6380ff239 100644 --- a/src/plugins/embeddable/public/add_from_library/registry.ts +++ b/src/plugins/embeddable/public/add_from_library/registry.ts @@ -8,7 +8,6 @@ */ import { IconType } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; import { CanAddNewPanel } from '@kbn/presentation-containers'; import { FinderAttributes, SavedObjectCommon } from '@kbn/saved-objects-finder-plugin/common'; import { SavedObjectMetaData } from '@kbn/saved-objects-finder-plugin/public'; @@ -41,10 +40,7 @@ export const registerAddFromLibraryType = { if (registry.has(savedObjectType)) { throw new Error( - i18n.translate('embeddableApi.embeddableSavedObjectRegistry.keyAlreadyExistsError', { - defaultMessage: `Embeddable type {embeddableType} already exists in the registry.`, - values: { embeddableType: savedObjectType }, - }) + `Saved object type '${savedObjectType}' already exists in the 'Add from Library' registry.` ); } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5694f72043533..63c26a6683173 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -2824,7 +2824,6 @@ "embeddableApi.compatibility.defaultTypeDisplayName": "graphique", "embeddableApi.contextMenuTrigger.description": "Une nouvelle action sera ajoutée au menu contextuel du panneau", "embeddableApi.contextMenuTrigger.title": "Menu contextuel", - "embeddableApi.embeddableSavedObjectRegistry.keyAlreadyExistsError": "Le type incorporable {embeddableType} existe déjà dans le registre.", "embeddableApi.errors.embeddableFactoryNotFound": "Impossible de charger {type}. Veuillez effectuer une mise à niveau vers la distribution par défaut d'Elasticsearch et de Kibana avec la licence appropriée.", "embeddableApi.errors.paneldoesNotExist": "Panneau introuvable", "embeddableApi.errors.panelIncompatibleError": "L'API du panneau n'est pas compatible", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 29549d79fde10..446ff88246a7a 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2819,7 +2819,6 @@ "embeddableApi.compatibility.defaultTypeDisplayName": "チャート", "embeddableApi.contextMenuTrigger.description": "新しいアクションがパネルのコンテキストメニューに追加されます", "embeddableApi.contextMenuTrigger.title": "コンテキストメニュー", - "embeddableApi.embeddableSavedObjectRegistry.keyAlreadyExistsError": "埋め込み可能タイプ\"{embeddableType}\"はすでにレジストリに存在します。", "embeddableApi.errors.embeddableFactoryNotFound": "{type} を読み込めません。Elasticsearch と Kibanaのデフォルトのディストリビューションを適切なライセンスでアップグレードしてください。", "embeddableApi.errors.paneldoesNotExist": "パネルが見つかりません", "embeddableApi.errors.panelIncompatibleError": "パネルAPIに互換性がありません", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6a3ef86d6f0a9..20e1de9fc8cc9 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2809,7 +2809,6 @@ "embeddableApi.compatibility.defaultTypeDisplayName": "图表", "embeddableApi.contextMenuTrigger.description": "会将一个新操作添加到该面板的上下文菜单", "embeddableApi.contextMenuTrigger.title": "上下文菜单", - "embeddableApi.embeddableSavedObjectRegistry.keyAlreadyExistsError": "注册表中已存在可嵌入对象类型 {embeddableType}。", "embeddableApi.errors.embeddableFactoryNotFound": "{type} 无法加载。请升级到具有适当许可的默认 Elasticsearch 和 Kibana 分发。", "embeddableApi.errors.paneldoesNotExist": "未找到面板", "embeddableApi.errors.panelIncompatibleError": "面板 API 不兼容",