mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
Internationalization: Translate TimePickerFooter component (#58390)
This commit is contained in:
parent
42b2e630b7
commit
3790e105e5
@ -7,6 +7,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { Field, RadioButtonGroup, Select } from '../..';
|
||||
import { stylesFactory, useTheme2 } from '../../../themes';
|
||||
import { t, Trans } from '../../../utils/i18n';
|
||||
import { Button } from '../../Button';
|
||||
import { TimeZonePicker } from '../TimeZonePicker';
|
||||
import { TimeZoneDescription } from '../TimeZonePicker/TimeZoneDescription';
|
||||
@ -58,7 +59,10 @@ export const TimePickerFooter: FC<Props> = (props) => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<section aria-label="Time zone selection" className={style.container}>
|
||||
<section
|
||||
aria-label={t('time-picker.footer.time-zone-selection', 'Time zone selection')}
|
||||
className={style.container}
|
||||
>
|
||||
<div className={style.timeZoneContainer}>
|
||||
<div className={style.timeZone}>
|
||||
<TimeZoneTitle title={info.name} />
|
||||
@ -69,7 +73,7 @@ export const TimePickerFooter: FC<Props> = (props) => {
|
||||
</div>
|
||||
<div className={style.spacer} />
|
||||
<Button variant="secondary" onClick={onToggleChangeTimeSettings} size="sm">
|
||||
Change time settings
|
||||
<Trans i18nKey="time-picker.footer.change-settings-button">Change time settings</Trans>
|
||||
</Button>
|
||||
</section>
|
||||
{isEditing ? (
|
||||
@ -78,8 +82,8 @@ export const TimePickerFooter: FC<Props> = (props) => {
|
||||
<RadioButtonGroup
|
||||
value={editMode}
|
||||
options={[
|
||||
{ label: 'Time zone', value: 'tz' },
|
||||
{ label: 'Fiscal year', value: 'fy' },
|
||||
{ label: t('time-picker.footer.time-zone-option', 'Time zone'), value: 'tz' },
|
||||
{ label: t('time-picker.footer.fiscal-year-option', 'Fiscal year'), value: 'fy' },
|
||||
]}
|
||||
onChange={setEditMode}
|
||||
></RadioButtonGroup>
|
||||
@ -106,7 +110,10 @@ export const TimePickerFooter: FC<Props> = (props) => {
|
||||
aria-label={selectors.components.TimeZonePicker.containerV2}
|
||||
className={cx(style.timeZoneContainer, style.timeSettingContainer)}
|
||||
>
|
||||
<Field className={style.fiscalYearField} label={'Fiscal year start month'}>
|
||||
<Field
|
||||
className={style.fiscalYearField}
|
||||
label={t('time-picker.footer.fiscal-year-start', 'Fiscal year start month')}
|
||||
>
|
||||
<Select
|
||||
value={fiscalYearStartMonth}
|
||||
menuShouldPortal={false}
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "",
|
||||
"select-time": ""
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "",
|
||||
"fiscal-year-option": "",
|
||||
"fiscal-year-start": "",
|
||||
"time-zone-option": "",
|
||||
"time-zone-selection": ""
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "",
|
||||
"default-error": "",
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "Cancel",
|
||||
"select-time": "Select a time range"
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "Change time settings",
|
||||
"fiscal-year-option": "Fiscal year",
|
||||
"fiscal-year-start": "Fiscal year start month",
|
||||
"time-zone-option": "Time zone",
|
||||
"time-zone-selection": "Time zone selection"
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "Apply time range",
|
||||
"default-error": "Please enter a past date or \"now\"",
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "",
|
||||
"select-time": ""
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "",
|
||||
"fiscal-year-option": "",
|
||||
"fiscal-year-start": "",
|
||||
"time-zone-option": "",
|
||||
"time-zone-selection": ""
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "",
|
||||
"default-error": "",
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "",
|
||||
"select-time": ""
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "",
|
||||
"fiscal-year-option": "",
|
||||
"fiscal-year-start": "",
|
||||
"time-zone-option": "",
|
||||
"time-zone-selection": ""
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "",
|
||||
"default-error": "",
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "Cäʼnčęľ",
|
||||
"select-time": "Ŝęľęčŧ ä ŧįmę řäʼnģę"
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "Cĥäʼnģę ŧįmę şęŧŧįʼnģş",
|
||||
"fiscal-year-option": "Fįşčäľ yęäř",
|
||||
"fiscal-year-start": "Fįşčäľ yęäř şŧäřŧ mőʼnŧĥ",
|
||||
"time-zone-option": "Ŧįmę žőʼnę",
|
||||
"time-zone-selection": "Ŧįmę žőʼnę şęľęčŧįőʼn"
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "Åppľy ŧįmę řäʼnģę",
|
||||
"default-error": "Pľęäşę ęʼnŧęř ä päşŧ đäŧę őř \"ʼnőŵ\"",
|
||||
|
@ -417,6 +417,13 @@
|
||||
"cancel-button": "",
|
||||
"select-time": ""
|
||||
},
|
||||
"footer": {
|
||||
"change-settings-button": "",
|
||||
"fiscal-year-option": "",
|
||||
"fiscal-year-start": "",
|
||||
"time-zone-option": "",
|
||||
"time-zone-selection": ""
|
||||
},
|
||||
"range-content": {
|
||||
"apply-button": "",
|
||||
"default-error": "",
|
||||
|
Loading…
Reference in New Issue
Block a user