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