Skip to content

Commit

Permalink
feat(core): add i18n primitives to ArrayOfObjectsInputMember
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias authored and rexxars committed Sep 13, 2023
1 parent b74978d commit 4d02c2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ export function ArrayOfObjectsInputMember(props: ArrayOfObjectsMemberProps) {
}

//@ts-expect-error The branching above should cover all possible cases
console.warn(new Error(`Unhandled member kind ${member.kind}`))
console.warn(new Error(t('arrayInput.warning.unhandled-member-kind', {kind: member.kind})))
return null
}
3 changes: 3 additions & 0 deletions packages/sanity/src/core/i18n/bundles/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ export const studioLocaleStrings = {
/** Error label for toast when array could not resolve the initial value */
'arrayInput.error.cannot-resolve-initial-value-title':
'Unable to resolve initial value for type: {{schemaTypeTitle}}: {{errorMessage}}.',

/** warning label for when there is an unhandled member kind in an array of objects input */
'arrayInput.warning.unhandled-member-kind': 'Unhandled member kind {{kind}}',
}

/**
Expand Down

0 comments on commit 4d02c2c

Please sign in to comment.