Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807)

This commit is contained in:
Laura Fernández 2022-11-21 17:37:53 +01:00 committed by GitHub
parent a62e437eb3
commit 8f567d57fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 2 deletions

View File

@ -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 && (
<InlineToast placement="top" referenceElement={buttonRef.current}>
Copied
<Trans i18nKey="clipboard-button.inline-toast.success">Copied</Trans>
</InlineToast>
)}

View File

@ -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
</AutoSizer>
<Modal.ButtonRow>
<ClipboardButton icon="copy" getText={getClipboardText}>
Copy to Clipboard
<Trans i18nKey="share-modal.view-json.copy-button">Copy to Clipboard</Trans>
</ClipboardButton>
</Modal.ButtonRow>
</Modal>

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {