Internationalization: Translate TimeRangeList component (#58131)

This commit is contained in:
Laura Fernández 2022-11-04 12:21:46 +01:00 committed by GitHub
parent 9c1c10ab9a
commit b7efd46e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import React, { ReactNode } from 'react';
import { TimeOption } from '@grafana/data';
import { stylesFactory } from '../../../themes';
import { t } from '../../../utils/i18n';
import { TimePickerTitle } from './TimePickerTitle';
import { TimeRangeOption } from './TimeRangeOption';
@ -65,14 +66,14 @@ const Options = ({ options, value, onChange, title }: Props) => {
return (
<>
<ul aria-roledescription="Time range selection">
<ul aria-roledescription={t('time-picker.time-range.aria-role', 'Time range selection')}>
{options.map((option, index) => (
<TimeRangeOption
key={keyForOption(option, index)}
value={option}
selected={isEqual(option, value)}
onSelect={onChange}
name={title ?? 'Time ranges'}
name={title ?? t('time-picker.time-range.default-title', 'Time ranges')}
/>
))}
</ul>

View File

@ -416,6 +416,8 @@
"select-time": ""
},
"time-range": {
"aria-role": "",
"default-title": "",
"example-title": "",
"specify": ""
}

View File

@ -416,6 +416,8 @@
"select-time": "Select a time range"
},
"time-range": {
"aria-role": "Time range selection",
"default-title": "Time ranges",
"example-title": "Example time ranges",
"specify": "Specify time range <1></1>"
}

View File

@ -416,6 +416,8 @@
"select-time": ""
},
"time-range": {
"aria-role": "",
"default-title": "",
"example-title": "",
"specify": ""
}

View File

@ -416,6 +416,8 @@
"select-time": ""
},
"time-range": {
"aria-role": "",
"default-title": "",
"example-title": "",
"specify": ""
}
@ -433,7 +435,7 @@
"email-label": "Adresse e-mail",
"name-error": "Un nom est obligatoire",
"name-label": "Nom",
"username-label": "Nom dutilisateur"
"username-label": "Nom d´utilisateur"
},
"title": "Modifier le profil"
},

View File

@ -416,6 +416,8 @@
"select-time": "Ŝęľęčŧ ä ŧįmę řäʼnģę"
},
"time-range": {
"aria-role": "Ŧįmę řäʼnģę şęľęčŧįőʼn",
"default-title": "Ŧįmę řäʼnģęş",
"example-title": "Ēχämpľę ŧįmę řäʼnģęş",
"specify": "Ŝpęčįƒy ŧįmę řäʼnģę <1></1>"
}

View File

@ -416,6 +416,8 @@
"select-time": ""
},
"time-range": {
"aria-role": "",
"default-title": "",
"example-title": "",
"specify": ""
}