mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
Mark up playlist/ShareModal
for translations (#74061)
* added Internationalization to share modal * ordered chronologically * changed markup keys * fixed import in grafana ui component * pseudo locale file updated * Removed redundant close-tooltip
This commit is contained in:
parent
47a756d524
commit
cad4fca8aa
@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
||||
|
||||
import { SelectableValue, UrlQueryMap, urlUtil } from '@grafana/data';
|
||||
import { Checkbox, ClipboardButton, Field, FieldSet, Input, Modal, RadioButtonGroup } from '@grafana/ui';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { buildBaseUrl } from 'app/features/dashboard/components/ShareModal/utils';
|
||||
|
||||
import { PlaylistMode } from './types';
|
||||
@ -16,9 +17,9 @@ export const ShareModal = ({ playlistUid, onDismiss }: Props) => {
|
||||
const [autoFit, setAutofit] = useState(false);
|
||||
|
||||
const modes: Array<SelectableValue<PlaylistMode>> = [
|
||||
{ label: 'Normal', value: false },
|
||||
{ label: 'TV', value: 'tv' },
|
||||
{ label: 'Kiosk', value: true },
|
||||
{ label: t('share-playlist.mode-normal', 'Normal'), value: false },
|
||||
{ label: t('share-playlist.mode-tv', 'TV'), value: 'tv' },
|
||||
{ label: t('share-playlist.mode-kiosk', 'Kiosk'), value: true },
|
||||
];
|
||||
|
||||
const params: UrlQueryMap = {};
|
||||
@ -32,29 +33,29 @@ export const ShareModal = ({ playlistUid, onDismiss }: Props) => {
|
||||
const shareUrl = urlUtil.renderUrl(`${buildBaseUrl()}/play/${playlistUid}`, params);
|
||||
|
||||
return (
|
||||
<Modal isOpen={true} title="Share playlist" onDismiss={onDismiss}>
|
||||
<Modal isOpen={true} title={t('share-playlist.title', 'Share playlist')} onDismiss={onDismiss}>
|
||||
<FieldSet>
|
||||
<Field label="Mode">
|
||||
<Field label={t('share-playlist.mode', 'Mode')}>
|
||||
<RadioButtonGroup value={mode} options={modes} onChange={setMode} />
|
||||
</Field>
|
||||
<Field>
|
||||
<Checkbox
|
||||
label="Autofit"
|
||||
description="Panel heights will be adjusted to fit screen size"
|
||||
label={t('share-playlist.checkbox-label', 'Autofit')}
|
||||
description={t('share-playlist.checkbox-description', 'Panel heights will be adjusted to fit screen size')}
|
||||
name="autofix"
|
||||
value={autoFit}
|
||||
onChange={(e) => setAutofit(e.currentTarget.checked)}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="Link URL">
|
||||
<Field label={t('share-playlist.link-url-label', 'Link URL')}>
|
||||
<Input
|
||||
id="link-url-input"
|
||||
value={shareUrl}
|
||||
readOnly
|
||||
addonAfter={
|
||||
<ClipboardButton icon="copy" variant="primary" getText={() => shareUrl}>
|
||||
Copy
|
||||
<Trans i18nKey="share-playlist.copy-link-button">Copy</Trans>
|
||||
</ClipboardButton>
|
||||
}
|
||||
/>
|
||||
|
@ -745,6 +745,17 @@
|
||||
"copy-button": "In Zwischenablage kopieren"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "",
|
||||
"checkbox-label": "",
|
||||
"copy-link-button": "",
|
||||
"link-url-label": "",
|
||||
"mode": "",
|
||||
"mode-kiosk": "",
|
||||
"mode-normal": "",
|
||||
"mode-tv": "",
|
||||
"title": ""
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
@ -745,6 +745,17 @@
|
||||
"copy-button": "Copy to Clipboard"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "Panel heights will be adjusted to fit screen size",
|
||||
"checkbox-label": "Autofit",
|
||||
"copy-link-button": "Copy",
|
||||
"link-url-label": "Link URL",
|
||||
"mode": "Mode",
|
||||
"mode-kiosk": "Kiosk",
|
||||
"mode-normal": "Normal",
|
||||
"mode-tv": "TV",
|
||||
"title": "Share playlist"
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
@ -750,6 +750,17 @@
|
||||
"copy-button": "Copiar al portapapeles"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "",
|
||||
"checkbox-label": "",
|
||||
"copy-link-button": "",
|
||||
"link-url-label": "",
|
||||
"mode": "",
|
||||
"mode-kiosk": "",
|
||||
"mode-normal": "",
|
||||
"mode-tv": "",
|
||||
"title": ""
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
@ -750,6 +750,17 @@
|
||||
"copy-button": "Copier dans le presse-papiers"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "",
|
||||
"checkbox-label": "",
|
||||
"copy-link-button": "",
|
||||
"link-url-label": "",
|
||||
"mode": "",
|
||||
"mode-kiosk": "",
|
||||
"mode-normal": "",
|
||||
"mode-tv": "",
|
||||
"title": ""
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
@ -745,6 +745,17 @@
|
||||
"copy-button": "Cőpy ŧő Cľįpþőäřđ"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "Päʼnęľ ĥęįģĥŧş ŵįľľ þę äđĵūşŧęđ ŧő ƒįŧ şčřęęʼn şįžę",
|
||||
"checkbox-label": "Åūŧőƒįŧ",
|
||||
"copy-link-button": "Cőpy",
|
||||
"link-url-label": "Ŀįʼnĸ ŮŖĿ",
|
||||
"mode": "Mőđę",
|
||||
"mode-kiosk": "Ķįőşĸ",
|
||||
"mode-normal": "Ńőřmäľ",
|
||||
"mode-tv": "ŦV",
|
||||
"title": "Ŝĥäřę pľäyľįşŧ"
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
@ -740,6 +740,17 @@
|
||||
"copy-button": "复制到剪贴板"
|
||||
}
|
||||
},
|
||||
"share-playlist": {
|
||||
"checkbox-description": "",
|
||||
"checkbox-label": "",
|
||||
"copy-link-button": "",
|
||||
"link-url-label": "",
|
||||
"mode": "",
|
||||
"mode-kiosk": "",
|
||||
"mode-normal": "",
|
||||
"mode-tv": "",
|
||||
"title": ""
|
||||
},
|
||||
"shared": {
|
||||
"preferences": {
|
||||
"theme": {
|
||||
|
Loading…
Reference in New Issue
Block a user