diff --git a/packages/sanity/src/desk/i18n/resources.ts b/packages/sanity/src/desk/i18n/resources.ts
index 30422db81eb..a30801bd2aa 100644
--- a/packages/sanity/src/desk/i18n/resources.ts
+++ b/packages/sanity/src/desk/i18n/resources.ts
@@ -165,6 +165,16 @@ const deskLocaleStrings = {
/** --- "PRODUCTION PREVIEW", eg link to content --- */
'production-preview.menu-item.title': 'Open preview',
+
+ /** -- UNKNOWN PANE TYPE */
+
+ /** The text to display when type is missing */
+ 'panes.unknown-pane-type.missing-type.text':
+ 'Structure item is missing required type
property.',
+
+ /** The text to display when type is unknown */
+ 'panes.unknown-pane-type.unknown-type.text':
+ 'Structure item of type {{type}}
is not a known entity.',
}
/**
diff --git a/packages/sanity/src/desk/panes/unknown/UnknownPaneType.tsx b/packages/sanity/src/desk/panes/unknown/UnknownPaneType.tsx
index 682024fe838..0e4f3580894 100644
--- a/packages/sanity/src/desk/panes/unknown/UnknownPaneType.tsx
+++ b/packages/sanity/src/desk/panes/unknown/UnknownPaneType.tsx
@@ -1,7 +1,8 @@
import {Box, Text} from '@sanity/ui'
import React from 'react'
import {Pane, PaneContent, PaneHeader} from '../../components/pane'
-import {isRecord} from 'sanity'
+import {deskLocaleNamespace} from '../../i18n'
+import {isRecord, Translate, useTranslation} from 'sanity'
interface UnknownPaneProps {
isSelected: boolean
@@ -15,7 +16,7 @@ interface UnknownPaneProps {
export function UnknownPane(props: UnknownPaneProps) {
const {isSelected, pane, paneKey} = props
const type = (isRecord(pane) && pane.type) || null
-
+ const {t} = useTranslation(deskLocaleNamespace)
return (
@@ -23,11 +24,20 @@ export function UnknownPane(props: UnknownPaneProps) {
{typeof type === 'string' ? (
- Structure item of type {type}
is not a known entity.
+ {children}
}}
+ values={{type}}
+ />
) : (
- Structure item is missing required type
property.
+ {children}
}}
+ />
)}