From ab627314baa217528df1555272bc1dd6e216dd0e Mon Sep 17 00:00:00 2001 From: Tommy Petty Date: Mon, 16 Oct 2023 16:59:10 -0400 Subject: [PATCH] fix(i18n): camelCase to kebab-case for resource ids (#4994) --- .../sanity/src/desk/documentActions/DeleteAction.tsx | 4 ++-- .../desk/documentActions/DiscardChangesAction.tsx | 12 ++++++------ .../src/desk/documentActions/DuplicateAction.tsx | 4 ++-- .../src/desk/documentActions/PublishAction.tsx | 4 ++-- .../src/desk/documentActions/UnpublishAction.tsx | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/sanity/src/desk/documentActions/DeleteAction.tsx b/packages/sanity/src/desk/documentActions/DeleteAction.tsx index e10cc2a505be..c3942ea35eb3 100644 --- a/packages/sanity/src/desk/documentActions/DeleteAction.tsx +++ b/packages/sanity/src/desk/documentActions/DeleteAction.tsx @@ -15,8 +15,8 @@ import { } from 'sanity' const DISABLED_REASON_TITLE_KEY = { - NOTHING_TO_DELETE: 'action.delete.disabled.nothingToDelete', - NOT_READY: 'action.delete.disabled.notReady', + NOTHING_TO_DELETE: 'action.delete.disabled.nothing-to-delete', + NOT_READY: 'action.delete.disabled.not-ready', } /** @internal */ diff --git a/packages/sanity/src/desk/documentActions/DiscardChangesAction.tsx b/packages/sanity/src/desk/documentActions/DiscardChangesAction.tsx index e8f53b495978..1c3ed610e01e 100644 --- a/packages/sanity/src/desk/documentActions/DiscardChangesAction.tsx +++ b/packages/sanity/src/desk/documentActions/DiscardChangesAction.tsx @@ -14,9 +14,9 @@ import { } from 'sanity' const DISABLED_REASON_KEY = { - NO_CHANGES: 'action.discardChanges.disabled.noChanges', - NOT_PUBLISHED: 'action.discardChanges.disabled.notPublished', - NOT_READY: 'action.discardChanges.disabled.notReady', + NO_CHANGES: 'action.discard-changes.disabled.no-changes', + NOT_PUBLISHED: 'action.discard-changes.disabled.not-published', + NOT_READY: 'action.discard-changes.disabled.not-ready', } as const /** @internal */ @@ -54,7 +54,7 @@ export const DiscardChangesAction: DocumentActionComponent = ({ tone: 'critical', onCancel: onComplete, onConfirm: handleConfirm, - message: t('action.discardChanges.confirmDialog.confirm-discard-changes'), + message: t('action.discard-changes.confirm-dialog.confirm-discard-changes'), }, [handleConfirm, isConfirmDialogOpen, onComplete, t], ) @@ -68,7 +68,7 @@ export const DiscardChangesAction: DocumentActionComponent = ({ tone: 'critical', icon: ResetIcon, disabled: true, - label: t('action.discardChanges.label'), + label: t('action.discard-changes.label'), title: ( {t('action.publish.alreadyPublished.tooltip', {timeSincePublished})} + return {t('action.publish.already-published.tooltip', {timeSincePublished})} } /** @internal */ @@ -72,7 +72,7 @@ export const PublishAction: DocumentActionComponent = (props) => { const title = publish.disabled ? getDisabledReason(publish.disabled, (published || {})._updatedAt, t) || '' : hasValidationErrors - ? t('action.publish.validationIssues.tooltip') + ? t('action.publish.validation-issues.tooltip') : '' const hasDraft = Boolean(draft) diff --git a/packages/sanity/src/desk/documentActions/UnpublishAction.tsx b/packages/sanity/src/desk/documentActions/UnpublishAction.tsx index 7126125638d7..ca121add5604 100644 --- a/packages/sanity/src/desk/documentActions/UnpublishAction.tsx +++ b/packages/sanity/src/desk/documentActions/UnpublishAction.tsx @@ -13,9 +13,9 @@ import { } from 'sanity' const DISABLED_REASON_KEY = { - NOT_PUBLISHED: 'action.unpublish.disabled.notPublished', - NOT_READY: 'action.unpublish.disabled.notReady', - LIVE_EDIT_ENABLED: 'action.unpublish.disabled.liveEditEnabled', + NOT_PUBLISHED: 'action.unpublish.disabled.not-published', + NOT_READY: 'action.unpublish.disabled.not-ready', + LIVE_EDIT_ENABLED: 'action.unpublish.disabled.live-edit-enabled', } /** @internal */