Skip to content

Commit

Permalink
feat(i18n): fix confirm delete dialog (#5139)
Browse files Browse the repository at this point in the history
* fix(i18n): move `context` to props

* feat(i18n): fix spelling in comments
  • Loading branch information
ricokahler authored and rexxars committed Nov 28, 2023
1 parent 32e9d8d commit 5a538b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export function ConfirmDeleteDialogBody({
<Translate
t={t}
i18nKey="confirm-delete-dialog.confirmation.text"
context={action}
components={{DocumentTitle: () => <strong>{documentTitle}</strong>}}
values={{context: action}}
/>
</Text>
)
Expand Down Expand Up @@ -122,8 +122,8 @@ export function ConfirmDeleteDialogBody({
<Translate
i18nKey="confirm-delete-dialog.referring-documents-descriptor.text"
t={t}
context={action}
components={{DocumentTitle: () => documentTitle}}
values={{context: action}}
/>
</Text>
</Box>
Expand Down Expand Up @@ -275,8 +275,8 @@ export function ConfirmDeleteDialogBody({
<Translate
i18nKey="confirm-delete-dialog.referential-integrity-disclaimer.text"
t={t}
context={action}
components={{DocumentTitle: () => documentTitle}}
values={{context: action}}
/>
</Text>
</Box>
Expand Down
6 changes: 3 additions & 3 deletions packages/sanity/src/desk/i18n/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ const deskLocaleStrings = {
/** The text when a generic operation failed */
'panes.document-operation-results.operation-error': 'An error occurred during {{context}}',

/** The text when a publish operation succeded */
/** The text when a publish operation succeeded */
'panes.document-operation-results.operation-success_publish': 'The document was published',

/** The text when an unpublish operation succeded */
/** The text when an unpublish operation succeeded */
'panes.document-operation-results.operation-success_unpublish':
'The document was unpublished. A draft has been created from the latest published version.',

/** The text when a discard changes operation succeded */
/** The text when a discard changes operation succeeded */
'panes.document-operation-results.operation-success_discardChanges':
'All changes since last publish has now been discarded. The discarded draft can still be recovered from history',

Expand Down

0 comments on commit 5a538b2

Please sign in to comment.