Internationalization: Translate TimeRangeList component (#58131)
This commit is contained in:
+3
-2
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user