From 55620066e6255d894fd2833efa84d8d052c58905 Mon Sep 17 00:00:00 2001 From: otilor Date: Fri, 29 Sep 2023 16:38:45 +0100 Subject: [PATCH] i18n: dashboard import page (#75664) * add translation for filezone primary and secondary text * add translation for Grafana.com field label * update translation keys * add translation for load button * update required translation * Format utils for invalid-dashboard * add extracted translations * add pseudo translations * add translation for json validation * json field label translation * add translation for required json field * add translation for cancel key * add extracted translations * Add pseudo locale translation * Update public/app/features/manage-dashboards/utils/validation.ts Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/utils/validation.ts Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/utils/validation.ts Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/utils/validation.ts Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * update translations * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * Update public/app/features/manage-dashboards/DashboardImportPage.tsx Co-authored-by: Ashley Harrison * update link component * add new translations --------- Co-authored-by: Ashley Harrison --- .../manage-dashboards/DashboardImportPage.tsx | 42 +++++++++++++------ .../manage-dashboards/utils/validation.ts | 12 ++++-- public/locales/de-DE/grafana.json | 26 ++++++++++++ public/locales/en-US/grafana.json | 26 ++++++++++++ public/locales/es-ES/grafana.json | 26 ++++++++++++ public/locales/fr-FR/grafana.json | 26 ++++++++++++ public/locales/pseudo-LOCALE/grafana.json | 26 ++++++++++++ public/locales/zh-Hans/grafana.json | 26 ++++++++++++ 8 files changed, 193 insertions(+), 17 deletions(-) diff --git a/public/app/features/manage-dashboards/DashboardImportPage.tsx b/public/app/features/manage-dashboards/DashboardImportPage.tsx index 617d883f87a..9e9561f4407 100644 --- a/public/app/features/manage-dashboards/DashboardImportPage.tsx +++ b/public/app/features/manage-dashboards/DashboardImportPage.tsx @@ -26,6 +26,7 @@ import { } from '@grafana/ui'; import appEvents from 'app/core/app_events'; import { Page } from 'app/core/components/Page/Page'; +import { t, Trans } from 'app/core/internationalization'; import { GrafanaRouteComponentProps } from 'app/core/navigation/types'; import { StoreState } from 'app/types'; @@ -126,6 +127,12 @@ class UnthemedDashboardImport extends PureComponent { renderImportForm() { const styles = importStyles(this.props.theme); + const GcomDashboardsLink = () => ( + + grafana.com/dashboards + + ); + return ( <>
@@ -136,8 +143,11 @@ class UnthemedDashboardImport extends PureComponent { onLoad={this.onFileUpload} >
@@ -148,10 +158,9 @@ class UnthemedDashboardImport extends PureComponent { label={ } @@ -160,13 +169,20 @@ class UnthemedDashboardImport extends PureComponent { > Load} + addonAfter={ + + } /> )} @@ -177,13 +193,13 @@ class UnthemedDashboardImport extends PureComponent { {({ register, errors }) => ( <>