diff --git a/packages/sanity/src/structure/components/requestPermissionDialog/RequestPermissionDialog.tsx b/packages/sanity/src/structure/components/requestPermissionDialog/RequestPermissionDialog.tsx index 30931efbc73..b69b78409c3 100644 --- a/packages/sanity/src/structure/components/requestPermissionDialog/RequestPermissionDialog.tsx +++ b/packages/sanity/src/structure/components/requestPermissionDialog/RequestPermissionDialog.tsx @@ -1,5 +1,3 @@ -/* eslint-disable i18next/no-literal-string */ - import {Box, Card, Flex, Stack, Text, TextInput, useToast} from '@sanity/ui' import {useEffect, useId, useMemo, useState} from 'react' import {type Role, useClient, useProjectId, useTranslation} from 'sanity' @@ -131,16 +129,16 @@ export function RequestPermissionDialog({ - - A request will be made to administrators asking to grant you increased permission to - this project. - - If you'd like, you can add a note + {t('request-permission-dialog.description.text')} + {t('request-permission-dialog.note-input.description.text')} {hasTooManyRequests || hasBeenDenied ? ( {hasTooManyRequests && ( - <> - {msgError ?? - `You've reached the limit for role requests across all projects. Please wait - before submitting more requests or contact an admin for assistance.`} - + <>{msgError ?? t('request-permission-dialog.warning.limit-reached.text')} )} {hasBeenDenied && ( - <>{msgError ?? `Your request to access this project has been declined.`} + <>{msgError ?? t('request-permission-dialog.warning.denied.text')} )} ) : ( { if (e.key === 'Enter') onConfirm() diff --git a/packages/sanity/src/structure/i18n/resources.ts b/packages/sanity/src/structure/i18n/resources.ts index 6001d69fc54..10c4e672164 100644 --- a/packages/sanity/src/structure/i18n/resources.ts +++ b/packages/sanity/src/structure/i18n/resources.ts @@ -411,6 +411,24 @@ const structureLocaleStrings = defineLocalesResources('structure', { /** The text for the "Open preview" action for a document */ 'production-preview.menu-item.title': 'Open preview', + /** The text for the confirm button in the request permission dialog used in the permissions banner */ + 'request-permission-dialog.confirm-button.text': 'Send request', + /** The description text for the request permission dialog used in the permissions banner */ + 'request-permission-dialog.description.text': + 'A request will be made to administrators asking to grant you increased permission to this project.', + /** The header/title for the request permission dialog used in the permissions banner */ + 'request-permission-dialog.header.text': 'Ask to edit', + /** The text describing the note input for the request permission dialog used in the permissions banner */ + 'request-permission-dialog.note-input.description.text': "If you'd like, you can add a note", + /** The placeholder for the note input in the request permission dialog used in the permissions banner */ + 'request-permission-dialog.note-input.placeholder.text': 'Add note...', + /** The error/warning text in the request permission dialog when the user's request has been declined */ + 'request-permission-dialog.warning.denied.text': + 'Your request to access this project has been declined.', + /** The error/warning text in the request permission dialog when the user's request has been denied due to too many outstanding requests */ + 'request-permission-dialog.warning.limit-reached.text': + "You've reached the limit for role requests across all projects. Please wait before submitting more requests or contact an admin for assistance.", + /** Label for button when status is saved */ 'status-bar.document-status-pulse.status.saved.text': 'Saved', /** Label for button when status is syncing */