From fc5007b0d5d04b380ddbbc23b6b7307b5f03b411 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Tue, 23 Apr 2024 19:30:11 +0100 Subject: [PATCH] Dashboards: Fix minor i18n papercuts that snuck through (#86802) * fix two issues in dashboards i18n * import * fix another --- packages/grafana-e2e-selectors/src/selectors/pages.ts | 2 +- .../dashboard-scene/settings/DeleteDashboardButton.tsx | 7 ++++++- .../app/features/dashboard-scene/sharing/ShareLinkTab.tsx | 2 +- .../components/DeleteDashboard/DeleteDashboardButton.tsx | 5 +++-- .../features/dashboard/components/ShareModal/ShareLink.tsx | 2 +- public/app/features/dashboard/dashgrid/DashboardEmpty.tsx | 3 +-- public/locales/en-US/grafana.json | 6 +++--- public/locales/pseudo-LOCALE/grafana.json | 6 +++--- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/grafana-e2e-selectors/src/selectors/pages.ts b/packages/grafana-e2e-selectors/src/selectors/pages.ts index 3ae6d8dc99c..5368be3830a 100644 --- a/packages/grafana-e2e-selectors/src/selectors/pages.ts +++ b/packages/grafana-e2e-selectors/src/selectors/pages.ts @@ -83,7 +83,7 @@ export const Pages = { close: 'data-testid dashboard-settings-close', }, General: { - deleteDashBoard: 'Dashboard settings page delete dashboard button', + deleteDashBoard: 'data-testid Dashboard settings page delete dashboard button', sectionItems: (item: string) => `Dashboard settings section item ${item}`, saveDashBoard: 'Dashboard settings aside actions Save button', saveAsDashBoard: 'Dashboard settings aside actions Save As button', diff --git a/public/app/features/dashboard-scene/settings/DeleteDashboardButton.tsx b/public/app/features/dashboard-scene/settings/DeleteDashboardButton.tsx index a896816dc7a..f1fcc2e5a81 100644 --- a/public/app/features/dashboard-scene/settings/DeleteDashboardButton.tsx +++ b/public/app/features/dashboard-scene/settings/DeleteDashboardButton.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { useAsyncFn, useToggle } from 'react-use'; +import { selectors } from '@grafana/e2e-selectors'; import { Button, ConfirmModal, Modal } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; @@ -15,7 +16,11 @@ export function DeleteDashboardButton({ dashboard }: ButtonProps) { return ( <> - diff --git a/public/app/features/dashboard-scene/sharing/ShareLinkTab.tsx b/public/app/features/dashboard-scene/sharing/ShareLinkTab.tsx index 21a739717a0..1f7bd26eacb 100644 --- a/public/app/features/dashboard-scene/sharing/ShareLinkTab.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareLinkTab.tsx @@ -220,7 +220,7 @@ function ShareLinkTabRenderer({ model }: SceneComponentProps) { bottomSpacing={0} > - To render a panel image, you must install the + To render a panel image, you must install the{' '} { hideModal, }); }} - aria-label="Dashboard settings page delete dashboard button" + data-testid={selectors.pages.Dashboard.Settings.General.deleteDashBoard} > - Delete Dashboard + Delete dashboard )} diff --git a/public/app/features/dashboard/components/ShareModal/ShareLink.tsx b/public/app/features/dashboard/components/ShareModal/ShareLink.tsx index 3ece45c6de9..b7bc752eab9 100644 --- a/public/app/features/dashboard/components/ShareModal/ShareLink.tsx +++ b/public/app/features/dashboard/components/ShareModal/ShareLink.tsx @@ -163,7 +163,7 @@ export class ShareLink extends PureComponent { bottomSpacing={0} > - To render a panel image, you must install the + To render a panel image, you must install the{' '} Grafana image renderer plugin diff --git a/public/app/features/dashboard/dashgrid/DashboardEmpty.tsx b/public/app/features/dashboard/dashgrid/DashboardEmpty.tsx index b2fdb9f6267..8ba441de4b3 100644 --- a/public/app/features/dashboard/dashgrid/DashboardEmpty.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardEmpty.tsx @@ -138,8 +138,7 @@ const DashboardEmpty = ({ dashboard, canCreate }: Props) => { - Import dashboards from files or - grafana.com. + Import dashboards from files or grafana.com. diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index b783638694f..bc911111504 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -276,7 +276,7 @@ "add-widget-body": "Create lists, markdowns and other widgets", "add-widget-button": "Add widget", "add-widget-header": "Add a widget", - "import-a-dashboard-body": "Import dashboards from files or<1>grafana.com.", + "import-a-dashboard-body": "Import dashboards from files or <1>grafana.com.", "import-a-dashboard-header": "Import a dashboard", "import-dashboard-button": "Import dashboard" }, @@ -385,7 +385,7 @@ "annotations": { "title": "Annotations" }, - "dashboard-delete-button": "Delete Dashboard", + "dashboard-delete-button": "Delete dashboard", "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", @@ -1524,7 +1524,7 @@ "info-text": "Create a direct link to this dashboard or panel, customized with the options below.", "link-url": "Link URL", "render-alert": "Image renderer plugin not installed", - "render-instructions": "To render a panel image, you must install the<1>Grafana image renderer plugin. Please contact your Grafana administrator to install the plugin.", + "render-instructions": "To render a panel image, you must install the <2>Grafana image renderer plugin. Please contact your Grafana administrator to install the plugin.", "rendered-image": "Direct link rendered image", "save-alert": "Dashboard is not saved", "save-dashboard": "To render a panel image, you must save the dashboard first.", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 9fa2685c1ed..64daa25d135 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -276,7 +276,7 @@ "add-widget-body": "Cřęäŧę ľįşŧş, mäřĸđőŵʼnş äʼnđ őŧĥęř ŵįđģęŧş", "add-widget-button": "Åđđ ŵįđģęŧ", "add-widget-header": "Åđđ ä ŵįđģęŧ", - "import-a-dashboard-body": "Ĩmpőřŧ đäşĥþőäřđş ƒřőm ƒįľęş őř<1>ģřäƒäʼnä.čőm.", + "import-a-dashboard-body": "Ĩmpőřŧ đäşĥþőäřđş ƒřőm ƒįľęş őř <1>ģřäƒäʼnä.čőm.", "import-a-dashboard-header": "Ĩmpőřŧ ä đäşĥþőäřđ", "import-dashboard-button": "Ĩmpőřŧ đäşĥþőäřđ" }, @@ -385,7 +385,7 @@ "annotations": { "title": "Åʼnʼnőŧäŧįőʼnş" }, - "dashboard-delete-button": "Đęľęŧę Đäşĥþőäřđ", + "dashboard-delete-button": "Đęľęŧę đäşĥþőäřđ", "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": "Åūŧő řęƒřęşĥ", @@ -1524,7 +1524,7 @@ "info-text": "Cřęäŧę ä đįřęčŧ ľįʼnĸ ŧő ŧĥįş đäşĥþőäřđ őř päʼnęľ, čūşŧőmįžęđ ŵįŧĥ ŧĥę őpŧįőʼnş þęľőŵ.", "link-url": "Ŀįʼnĸ ŮŖĿ", "render-alert": "Ĩmäģę řęʼnđęřęř pľūģįʼn ʼnőŧ įʼnşŧäľľęđ", - "render-instructions": "Ŧő řęʼnđęř ä päʼnęľ įmäģę, yőū mūşŧ įʼnşŧäľľ ŧĥę<1>Ğřäƒäʼnä įmäģę řęʼnđęřęř pľūģįʼn. Pľęäşę čőʼnŧäčŧ yőūř Ğřäƒäʼnä äđmįʼnįşŧřäŧőř ŧő įʼnşŧäľľ ŧĥę pľūģįʼn.", + "render-instructions": "Ŧő řęʼnđęř ä päʼnęľ įmäģę, yőū mūşŧ įʼnşŧäľľ ŧĥę <2>Ğřäƒäʼnä įmäģę řęʼnđęřęř pľūģįʼn. Pľęäşę čőʼnŧäčŧ yőūř Ğřäƒäʼnä äđmįʼnįşŧřäŧőř ŧő įʼnşŧäľľ ŧĥę pľūģįʼn.", "rendered-image": "Đįřęčŧ ľįʼnĸ řęʼnđęřęđ įmäģę", "save-alert": "Đäşĥþőäřđ įş ʼnőŧ şävęđ", "save-dashboard": "Ŧő řęʼnđęř ä päʼnęľ įmäģę, yőū mūşŧ şävę ŧĥę đäşĥþőäřđ ƒįřşŧ.",