From 8f567d57fa8d626e1bedbf8e7d308cff017ba19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Fern=C3=A1ndez?= Date: Mon, 21 Nov 2022 17:37:53 +0100 Subject: [PATCH] Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807) --- .../src/components/ClipboardButton/ClipboardButton.tsx | 3 ++- .../dashboard/components/ShareModal/ViewJsonModal.tsx | 3 ++- public/locales/de-DE/grafana.json | 8 ++++++++ public/locales/en-US/grafana.json | 8 ++++++++ public/locales/es-ES/grafana.json | 8 ++++++++ public/locales/fr-FR/grafana.json | 8 ++++++++ public/locales/pseudo-LOCALE/grafana.json | 8 ++++++++ public/locales/zh-Hans/grafana.json | 8 ++++++++ 8 files changed, 52 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/ClipboardButton/ClipboardButton.tsx b/packages/grafana-ui/src/components/ClipboardButton/ClipboardButton.tsx index 9a37d35e210..0265dc5f8ac 100644 --- a/packages/grafana-ui/src/components/ClipboardButton/ClipboardButton.tsx +++ b/packages/grafana-ui/src/components/ClipboardButton/ClipboardButton.tsx @@ -3,6 +3,7 @@ import React, { useCallback, useRef, useState, useEffect } from 'react'; import { GrafanaTheme2 } from '@grafana/data'; +import { Trans } from '../../../src/utils/i18n'; import { useStyles2 } from '../../themes'; import { Button, ButtonProps } from '../Button'; import { Icon } from '../Icon/Icon'; @@ -62,7 +63,7 @@ export function ClipboardButton({ <> {showCopySuccess && ( - Copied + Copied )} diff --git a/public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx b/public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx index 9018ec6c026..2a5fa2a262e 100644 --- a/public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx +++ b/public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx @@ -2,6 +2,7 @@ import React, { useCallback } from 'react'; import AutoSizer from 'react-virtualized-auto-sizer'; import { ClipboardButton, CodeEditor, Modal } from '@grafana/ui'; +import { Trans } from 'app/core/internationalization'; export interface ViewJsonModalProps { json: string; @@ -17,7 +18,7 @@ export function ViewJsonModal({ json, onDismiss }: ViewJsonModalProps): JSX.Elem - Copy to Clipboard + Copy to Clipboard diff --git a/public/locales/de-DE/grafana.json b/public/locales/de-DE/grafana.json index e3d9a9abaab..02df8d71da9 100644 --- a/public/locales/de-DE/grafana.json +++ b/public/locales/de-DE/grafana.json @@ -1,5 +1,10 @@ { "_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file", + "clipboard-button": { + "inline-toast": { + "success": "" + } + }, "common": { "locale": { "default": "Standard" @@ -412,6 +417,9 @@ "dark": "Dunkel", "field-name": "Design", "light": "Hell" + }, + "view-json": { + "copy-button": "" } }, "shared-dashboard": { diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 2a68c15a74c..d59f3850cf2 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -1,5 +1,10 @@ { "_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", + "clipboard-button": { + "inline-toast": { + "success": "Copied" + } + }, "common": { "locale": { "default": "Default" @@ -412,6 +417,9 @@ "dark": "Dark", "field-name": "Theme", "light": "Light" + }, + "view-json": { + "copy-button": "Copy to Clipboard" } }, "shared-dashboard": { diff --git a/public/locales/es-ES/grafana.json b/public/locales/es-ES/grafana.json index f3bd4e0cc7b..3aef2967296 100644 --- a/public/locales/es-ES/grafana.json +++ b/public/locales/es-ES/grafana.json @@ -1,5 +1,10 @@ { "_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file", + "clipboard-button": { + "inline-toast": { + "success": "" + } + }, "common": { "locale": { "default": "Por defecto" @@ -412,6 +417,9 @@ "dark": "Oscuro", "field-name": "Tema", "light": "Claro" + }, + "view-json": { + "copy-button": "" } }, "shared-dashboard": { diff --git a/public/locales/fr-FR/grafana.json b/public/locales/fr-FR/grafana.json index 1bcdb9254ca..f6d9d51910e 100644 --- a/public/locales/fr-FR/grafana.json +++ b/public/locales/fr-FR/grafana.json @@ -1,5 +1,10 @@ { "_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file", + "clipboard-button": { + "inline-toast": { + "success": "" + } + }, "common": { "locale": { "default": "Par défaut" @@ -412,6 +417,9 @@ "dark": "Sombre", "field-name": "Thème", "light": "Clair" + }, + "view-json": { + "copy-button": "" } }, "shared-dashboard": { diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 1ec222378bf..a757286d3ce 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -1,5 +1,10 @@ { "_comment": "Đő ʼnőŧ mäʼnūäľľy ęđįŧ ŧĥįş ƒįľę, őř ūpđäŧę ŧĥęşę şőūřčę pĥřäşęş įʼn Cřőŵđįʼn. Ŧĥę şőūřčę őƒ ŧřūŧĥ ƒőř Ēʼnģľįşĥ şŧřįʼnģş äřę įʼn ŧĥę čőđę şőūřčę", + "clipboard-button": { + "inline-toast": { + "success": "Cőpįęđ" + } + }, "common": { "locale": { "default": "Đęƒäūľŧ" @@ -412,6 +417,9 @@ "dark": "Đäřĸ", "field-name": "Ŧĥęmę", "light": "Ŀįģĥŧ" + }, + "view-json": { + "copy-button": "Cőpy ŧő Cľįpþőäřđ" } }, "shared-dashboard": { diff --git a/public/locales/zh-Hans/grafana.json b/public/locales/zh-Hans/grafana.json index 4122d706209..c9ec58cdae6 100644 --- a/public/locales/zh-Hans/grafana.json +++ b/public/locales/zh-Hans/grafana.json @@ -1,5 +1,10 @@ { "_comment": "Do not manually edit this file. Translations must be made in Crowdin which will sync them back into this file", + "clipboard-button": { + "inline-toast": { + "success": "" + } + }, "common": { "locale": { "default": "默认" @@ -412,6 +417,9 @@ "dark": "深色", "field-name": "主题", "light": "浅色" + }, + "view-json": { + "copy-button": "" } }, "shared-dashboard": {