Skip to content

Commit

Permalink
clean up registry error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Dec 5, 2024
1 parent a85de55 commit 5adbf55
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions src/plugins/embeddable/public/add_from_library/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -41,10 +40,7 @@ export const registerAddFromLibraryType = <TSavedObjectAttributes extends Finder
}) => {
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.`
);
}

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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に互換性がありません",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 不兼容",
Expand Down

0 comments on commit 5adbf55

Please sign in to comment.