diff --git a/.betterer.results b/.betterer.results index 21156f60eab..f4b8cf76cea 100644 --- a/.betterer.results +++ b/.betterer.results @@ -3170,15 +3170,6 @@ exports[`better eslint`] = { "public/app/features/dashboard/components/DashboardSettings/index.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./DashboardSettings\`)", "0"] ], - "public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] - ], "public/app/features/dashboard/components/GenAI/GenAIHistory.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], diff --git a/public/app/features/browse-dashboards/components/BrowseActions/DeleteModal.tsx b/public/app/features/browse-dashboards/components/BrowseActions/DeleteModal.tsx index 090ccd9ef79..b9fbbcf9348 100644 --- a/public/app/features/browse-dashboards/components/BrowseActions/DeleteModal.tsx +++ b/public/app/features/browse-dashboards/components/BrowseActions/DeleteModal.tsx @@ -70,7 +70,7 @@ export const DeleteModal = ({ onConfirm, onDismiss, selectedItems, ...props }: P ) : null} } - confirmationText="Delete" + confirmationText={t('browse-dashboards.action.confirmation-text', 'Delete')} confirmText={ isDeleting ? t('browse-dashboards.action.deleting', 'Deleting...') diff --git a/public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx b/public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx index 0bb0ae5a9a0..21d67bc057f 100644 --- a/public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx +++ b/public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx @@ -3,11 +3,13 @@ import { connect, ConnectedProps } from 'react-redux'; import useAsyncFn from 'react-use/lib/useAsyncFn'; import { locationService } from '@grafana/runtime'; -import { Modal, ConfirmModal, Button } from '@grafana/ui'; +import { Modal, ConfirmModal, Button, Text, Space, TextLink } from '@grafana/ui'; import { DashboardModel } from 'app/features/dashboard/state'; import { cleanUpDashboardAndVariables } from 'app/features/dashboard/state/actions'; import { deleteDashboard } from 'app/features/manage-dashboards/state/actions'; +import { Trans, t } from '../../../../core/internationalization'; + type DeleteDashboardModalProps = { hideModal(): void; dashboard: DashboardModel; @@ -40,15 +42,22 @@ const DeleteDashboardModalUnconnected = ({ hideModal, cleanUpDashboardAndVariabl isOpen={true} body={ <> -

Do you want to delete this dashboard?

-

{dashboard.title}

+ + + Do you want to delete this dashboard? + + + + {dashboard.title} + } onConfirm={onConfirm} onDismiss={hideModal} - title="Delete" + title={t('dashboard-settings.dashboard-delete-modal.title', 'Delete')} icon="trash-alt" - confirmText="Delete" + confirmText={t('dashboard-settings.dashboard-delete-modal.delete-button', 'Delete')} + confirmationText={t('dashboard-settings.dashboard-delete-modal.confirmation-text', 'Delete')} /> ); }; @@ -56,36 +65,35 @@ const DeleteDashboardModalUnconnected = ({ hideModal, cleanUpDashboardAndVariabl const ProvisionedDeleteModal = ({ hideModal, provisionedId }: { hideModal(): void; provisionedId: string }) => ( -

- This dashboard is managed by Grafana provisioning and cannot be deleted. Remove the dashboard from the config file - to delete it. -

-

- - See{' '} - - documentation - {' '} - for more information about provisioning. - -
- File path: {provisionedId} -

+ + + This dashboard is managed by Grafana provisioning and cannot be deleted. Remove the dashboard from the config + file to delete it. + + + + + + See grafana documentation for more information about provisioning.  + + + {t('dashboard-settings.provisioned-delete-modal.text-link', 'Go to docs page')} + + + + + File path: {{ provisionedId }} +
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index a9f224fae5b..4ac721f6be8 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -134,6 +134,7 @@ "action": { "cancel-button": "Cancel", "cannot-move-folders": "Folders cannot be moved", + "confirmation-text": "Delete", "delete-button": "Delete", "delete-modal-invalid-text": "One or more folders contain library panels or alert rules. Delete these first in order to proceed.", "delete-modal-invalid-title": "Cannot delete folder", @@ -476,6 +477,12 @@ "title": "Annotations" }, "dashboard-delete-button": "Delete dashboard", + "dashboard-delete-modal": { + "confirmation-text": "Delete", + "delete-button": "Delete", + "text": "Do you want to delete this dashboard?", + "title": "Delete" + }, "general": { "auto-refresh-description": "Define the auto refresh intervals that should be available in the auto refresh list. Use the format '5s' for seconds, '1m' for minutes, '1h' for hours, and '1d' for days (e.g.: '5s,10s,30s,1m,5m,15m,30m,1h,2h,1d').", "auto-refresh-label": "Auto refresh", @@ -503,6 +510,14 @@ "permissions": { "title": "Permissions" }, + "provisioned-delete-modal": { + "confirm-button": "OK", + "text-1": "This dashboard is managed by Grafana provisioning and cannot be deleted. Remove the dashboard from the config file to delete it.", + "text-2": "See grafana documentation for more information about provisioning. ", + "text-3": "File path: {{provisionedId}}", + "text-link": "Go to docs page", + "title": "Cannot delete provisioned dashboard" + }, "settings": { "title": "Settings" }, diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 480a53ebd9b..759bbbd912e 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -134,6 +134,7 @@ "action": { "cancel-button": "Cäʼnčęľ", "cannot-move-folders": "Főľđęřş čäʼnʼnőŧ þę mővęđ", + "confirmation-text": "Đęľęŧę", "delete-button": "Đęľęŧę", "delete-modal-invalid-text": "Øʼnę őř mőřę ƒőľđęřş čőʼnŧäįʼn ľįþřäřy päʼnęľş őř äľęřŧ řūľęş. Đęľęŧę ŧĥęşę ƒįřşŧ įʼn őřđęř ŧő přőčęęđ.", "delete-modal-invalid-title": "Cäʼnʼnőŧ đęľęŧę ƒőľđęř", @@ -476,6 +477,12 @@ "title": "Åʼnʼnőŧäŧįőʼnş" }, "dashboard-delete-button": "Đęľęŧę đäşĥþőäřđ", + "dashboard-delete-modal": { + "confirmation-text": "Đęľęŧę", + "delete-button": "Đęľęŧę", + "text": "Đő yőū ŵäʼnŧ ŧő đęľęŧę ŧĥįş đäşĥþőäřđ?", + "title": "Đęľęŧę" + }, "general": { "auto-refresh-description": "Đęƒįʼnę ŧĥę äūŧő řęƒřęşĥ įʼnŧęřväľş ŧĥäŧ şĥőūľđ þę äväįľäþľę įʼn ŧĥę äūŧő řęƒřęşĥ ľįşŧ. Ůşę ŧĥę ƒőřmäŧ '5ş' ƒőř şęčőʼnđş, '1m' ƒőř mįʼnūŧęş, '1ĥ' ƒőř ĥőūřş, äʼnđ '1đ' ƒőř đäyş (ę.ģ.: '5ş,10ş,30ş,1m,5m,15m,30m,1ĥ,2ĥ,1đ').", "auto-refresh-label": "Åūŧő řęƒřęşĥ", @@ -503,6 +510,14 @@ "permissions": { "title": "Pęřmįşşįőʼnş" }, + "provisioned-delete-modal": { + "confirm-button": "ØĶ", + "text-1": "Ŧĥįş đäşĥþőäřđ įş mäʼnäģęđ þy Ğřäƒäʼnä přővįşįőʼnįʼnģ äʼnđ čäʼnʼnőŧ þę đęľęŧęđ. Ŗęmővę ŧĥę đäşĥþőäřđ ƒřőm ŧĥę čőʼnƒįģ ƒįľę ŧő đęľęŧę įŧ.", + "text-2": "Ŝęę ģřäƒäʼnä đőčūmęʼnŧäŧįőʼn ƒőř mőřę įʼnƒőřmäŧįőʼn äþőūŧ přővįşįőʼnįʼnģ. ", + "text-3": "Fįľę päŧĥ: {{provisionedId}}", + "text-link": "Ğő ŧő đőčş päģę", + "title": "Cäʼnʼnőŧ đęľęŧę přővįşįőʼnęđ đäşĥþőäřđ" + }, "settings": { "title": "Ŝęŧŧįʼnģş" },