From 3c88868fe521be5146dd927b94b87218f5cf15bc Mon Sep 17 00:00:00 2001
From: RoxanaAnamariaTurc
<106086831+RoxanaAnamariaTurc@users.noreply.github.com>
Date: Wed, 21 Jun 2023 09:07:42 +0100
Subject: [PATCH] Internationalization: Mark up phrases for translation on
Dashboards page (#70361)
* Internationalization:Mark up phrases for translation on Dashboards page
* Internationalization: Mark up phrases for translation on Dashboards page
---
.../BrowseActions/BrowseActions.tsx | 6 +++--
.../components/DashboardsTree.tsx | 11 +++++---
.../components/SearchView.tsx | 7 +++--
.../browse-dashboards/components/TypeCell.tsx | 7 ++---
.../search/page/components/SearchView.tsx | 7 +++--
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 +++++++++++++++++++
11 files changed, 182 insertions(+), 12 deletions(-)
diff --git a/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx b/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx
index 28514bd6708..1a1f11965f5 100644
--- a/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx
+++ b/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx
@@ -5,6 +5,7 @@ import { GrafanaTheme2 } from '@grafana/data';
import { reportInteraction } from '@grafana/runtime';
import { Button, useStyles2 } from '@grafana/ui';
import appEvents from 'app/core/app_events';
+import { Trans } from 'app/core/internationalization';
import { useSearchStateManager } from 'app/features/search/state/SearchStateManager';
import { useDispatch, useSelector } from 'app/types';
import { ShowModalReactEvent } from 'app/types/events';
@@ -130,10 +131,11 @@ export function BrowseActions() {
return (
- Move
+ Move
+
- Delete
+ Delete
);
diff --git a/public/app/features/browse-dashboards/components/DashboardsTree.tsx b/public/app/features/browse-dashboards/components/DashboardsTree.tsx
index 7dbd29514ba..1efbf32c55d 100644
--- a/public/app/features/browse-dashboards/components/DashboardsTree.tsx
+++ b/public/app/features/browse-dashboards/components/DashboardsTree.tsx
@@ -7,6 +7,7 @@ import InfiniteLoader from 'react-window-infinite-loader';
import { GrafanaTheme2, isTruthy } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { useStyles2 } from '@grafana/ui';
+import { t, Trans } from 'app/core/internationalization';
import { DashboardViewItem } from 'app/features/search/types';
import {
@@ -76,21 +77,25 @@ export function DashboardsTree({
const nameColumn: DashboardsTreeColumn = {
id: 'name',
width: 3,
- Header: Name ,
+ Header: (
+
+ Name
+
+ ),
Cell: (props: DashboardsTreeCellProps) => ,
};
const typeColumn: DashboardsTreeColumn = {
id: 'type',
width: 1,
- Header: 'Type',
+ Header: t('browse-dashboards.dashboards-tree.type-column', 'Type'),
Cell: TypeCell,
};
const tagsColumns: DashboardsTreeColumn = {
id: 'tags',
width: 2,
- Header: 'Tags',
+ Header: t('browse-dashboards.dashboards-tree.tags-column', 'Tags'),
Cell: TagsCell,
};
const columns = [canSelect && checkboxColumn, nameColumn, typeColumn, tagsColumns].filter(isTruthy);
diff --git a/public/app/features/browse-dashboards/components/SearchView.tsx b/public/app/features/browse-dashboards/components/SearchView.tsx
index f2e4b2d19de..a181d192a55 100644
--- a/public/app/features/browse-dashboards/components/SearchView.tsx
+++ b/public/app/features/browse-dashboards/components/SearchView.tsx
@@ -1,6 +1,7 @@
import React, { useCallback } from 'react';
import { Button, Card, Spinner } from '@grafana/ui';
+import { Trans } from 'app/core/internationalization';
import { useKeyNavigationListener } from 'app/features/search/hooks/useSearchKeyboardSelection';
import { SearchResultsProps, SearchResultsTable } from 'app/features/search/page/components/SearchResultsTable';
import { useSearchStateManager } from 'app/features/search/state/SearchStateManager';
@@ -72,10 +73,12 @@ export function SearchView({ width, height, canSelect }: SearchViewProps) {
return (
- No results found for your query.
+
+ No results found for your query.
+
- Clear search and filters
+ Clear search and filters
diff --git a/public/app/features/browse-dashboards/components/TypeCell.tsx b/public/app/features/browse-dashboards/components/TypeCell.tsx
index 05bb806fda6..4d2f4f56627 100644
--- a/public/app/features/browse-dashboards/components/TypeCell.tsx
+++ b/public/app/features/browse-dashboards/components/TypeCell.tsx
@@ -6,6 +6,7 @@ import { CellProps } from 'react-table';
import { GrafanaTheme2 } from '@grafana/data';
import { Icon, useStyles2 } from '@grafana/ui';
import { Span } from '@grafana/ui/src/unstable';
+import { Trans } from 'app/core/internationalization';
import { getIconForKind } from 'app/features/search/service/utils';
import { DashboardsTreeItem } from '../types';
@@ -20,7 +21,7 @@ export function TypeCell({ row: { original: data } }: CellProps
- Dashboard
+ Dashboard
);
@@ -29,7 +30,7 @@ export function TypeCell({ row: { original: data } }: CellProps
- Folder
+ Folder
);
@@ -38,7 +39,7 @@ export function TypeCell({ row: { original: data } }: CellProps
- Panel
+ Panel
);
diff --git a/public/app/features/search/page/components/SearchView.tsx b/public/app/features/search/page/components/SearchView.tsx
index b1f65393187..a58a4f63ec1 100644
--- a/public/app/features/search/page/components/SearchView.tsx
+++ b/public/app/features/search/page/components/SearchView.tsx
@@ -8,6 +8,7 @@ import { GrafanaTheme2 } from '@grafana/data';
import { config } from '@grafana/runtime';
import { useStyles2, Spinner, Button } from '@grafana/ui';
import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA';
+import { Trans } from 'app/core/internationalization';
import { FolderDTO } from 'app/types';
import { getGrafanaSearcher } from '../../service';
@@ -75,10 +76,12 @@ export const SearchView = ({ showManage, folderDTO, hidePseudoFolders, keyboardE
return (
-
No results found for your query.
+
+ No results found for your query.
+
- Clear search and filters
+ Clear search and filters
);
diff --git a/public/locales/de-DE/grafana.json b/public/locales/de-DE/grafana.json
index d8202b63e3d..631a3d32117 100644
--- a/public/locales/de-DE/grafana.json
+++ b/public/locales/de-DE/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "",
+ "move-button": ""
+ },
+ "dashboards-tree": {
+ "name-column": "",
+ "tags-column": "",
+ "type-column": ""
+ },
+ "no-results": {
+ "clear": "",
+ "text": ""
+ },
+ "type-cell": {
+ "dashboard": "",
+ "folder": "",
+ "panel": ""
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "Kopiert"
@@ -434,6 +454,12 @@
"placeholder": "Nach Dashboards suchen"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "",
+ "text": ""
+ }
+ },
"share-modal": {
"dashboard": {
"title": "Teilen"
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index f789b63014b..76a29cbeab4 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Do not manually edit this file, or update these source phrases in Crowdin. The source of truth for English strings are in the code source",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "Delete",
+ "move-button": "Move"
+ },
+ "dashboards-tree": {
+ "name-column": "Name",
+ "tags-column": "Tags",
+ "type-column": "Type"
+ },
+ "no-results": {
+ "clear": "Clear search and filters",
+ "text": "No results found for your query."
+ },
+ "type-cell": {
+ "dashboard": "Dashboard",
+ "folder": "Folder",
+ "panel": "Panel"
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "Copied"
@@ -434,6 +454,12 @@
"placeholder": "Search for dashboards and folders"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "Clear search and filters",
+ "text": "No results found for your query."
+ }
+ },
"share-modal": {
"dashboard": {
"title": "Share"
diff --git a/public/locales/es-ES/grafana.json b/public/locales/es-ES/grafana.json
index ca70446cb8a..015e9393907 100644
--- a/public/locales/es-ES/grafana.json
+++ b/public/locales/es-ES/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Do not manually edit this file, or update these source phrases in Crowdin. The source of truth for English strings are in the code source",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "",
+ "move-button": ""
+ },
+ "dashboards-tree": {
+ "name-column": "",
+ "tags-column": "",
+ "type-column": ""
+ },
+ "no-results": {
+ "clear": "",
+ "text": ""
+ },
+ "type-cell": {
+ "dashboard": "",
+ "folder": "",
+ "panel": ""
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "Copiado"
@@ -434,6 +454,12 @@
"placeholder": "Buscar paneles de control"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "",
+ "text": ""
+ }
+ },
"share-modal": {
"dashboard": {
"title": "Compartir"
diff --git a/public/locales/fr-FR/grafana.json b/public/locales/fr-FR/grafana.json
index afa3cb17316..6310ef9be6c 100644
--- a/public/locales/fr-FR/grafana.json
+++ b/public/locales/fr-FR/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "",
+ "move-button": ""
+ },
+ "dashboards-tree": {
+ "name-column": "",
+ "tags-column": "",
+ "type-column": ""
+ },
+ "no-results": {
+ "clear": "",
+ "text": ""
+ },
+ "type-cell": {
+ "dashboard": "",
+ "folder": "",
+ "panel": ""
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "Copié"
@@ -434,6 +454,12 @@
"placeholder": "Rechercher des tableaux de bord"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "",
+ "text": ""
+ }
+ },
"share-modal": {
"dashboard": {
"title": "Partager"
diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json
index f0f3b927701..1602761e63f 100644
--- a/public/locales/pseudo-LOCALE/grafana.json
+++ b/public/locales/pseudo-LOCALE/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Đő ʼnőŧ mäʼnūäľľy ęđįŧ ŧĥįş ƒįľę, őř ūpđäŧę ŧĥęşę şőūřčę pĥřäşęş įʼn Cřőŵđįʼn. Ŧĥę şőūřčę őƒ ŧřūŧĥ ƒőř Ēʼnģľįşĥ şŧřįʼnģş äřę įʼn ŧĥę čőđę şőūřčę",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "Đęľęŧę",
+ "move-button": "Mővę"
+ },
+ "dashboards-tree": {
+ "name-column": "Ńämę",
+ "tags-column": "Ŧäģş",
+ "type-column": "Ŧypę"
+ },
+ "no-results": {
+ "clear": "Cľęäř şęäřčĥ äʼnđ ƒįľŧęřş",
+ "text": "Ńő řęşūľŧş ƒőūʼnđ ƒőř yőūř qūęřy."
+ },
+ "type-cell": {
+ "dashboard": "Đäşĥþőäřđ",
+ "folder": "Főľđęř",
+ "panel": "Päʼnęľ"
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "Cőpįęđ"
@@ -434,6 +454,12 @@
"placeholder": "Ŝęäřčĥ ƒőř đäşĥþőäřđş äʼnđ ƒőľđęřş"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "Cľęäř şęäřčĥ äʼnđ ƒįľŧęřş",
+ "text": "Ńő řęşūľŧş ƒőūʼnđ ƒőř yőūř qūęřy."
+ }
+ },
"share-modal": {
"dashboard": {
"title": "Ŝĥäřę"
diff --git a/public/locales/zh-Hans/grafana.json b/public/locales/zh-Hans/grafana.json
index 9021e6072e0..d6f838e2cae 100644
--- a/public/locales/zh-Hans/grafana.json
+++ b/public/locales/zh-Hans/grafana.json
@@ -1,5 +1,25 @@
{
"_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file",
+ "browse-dashboards": {
+ "action": {
+ "delete-button": "",
+ "move-button": ""
+ },
+ "dashboards-tree": {
+ "name-column": "",
+ "tags-column": "",
+ "type-column": ""
+ },
+ "no-results": {
+ "clear": "",
+ "text": ""
+ },
+ "type-cell": {
+ "dashboard": "",
+ "folder": "",
+ "panel": ""
+ }
+ },
"clipboard-button": {
"inline-toast": {
"success": "已复制"
@@ -434,6 +454,12 @@
"placeholder": "搜索仪表板"
}
},
+ "search-view": {
+ "no-results": {
+ "clear": "",
+ "text": ""
+ }
+ },
"share-modal": {
"dashboard": {
"title": "分享"