mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 15:45:43 -06:00
Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807)
This commit is contained in:
parent
a62e437eb3
commit
8f567d57fa
@ -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>
|
||||
)}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user