mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] [Accessibility] Add job ID to select row checkbox aria-label in Jobs List (#40149)
* [ML] [Accessibility] Add job ID to select row checkbox in Jobs List * [ML] Add job ID to cannot select checkbox message in Jobs List row * [ML] Update translations files for select job checkbox
This commit is contained in:
parent
1e1153ea7b
commit
7c79427991
3 changed files with 22 additions and 6 deletions
|
@ -23,6 +23,7 @@ import {
|
|||
EuiButtonIcon,
|
||||
} from '@elastic/eui';
|
||||
import { injectI18n } from '@kbn/i18n/react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
const PAGE_SIZE_OPTIONS = [10, 25, 50];
|
||||
|
@ -102,10 +103,27 @@ class JobsListUI extends Component {
|
|||
const { intl, loading } = this.props;
|
||||
const selectionControls = {
|
||||
selectable: job => (job.deleting !== true),
|
||||
selectableMessage: (selectable) => (!selectable) ? intl.formatMessage({
|
||||
id: 'xpack.ml.jobsList.cannotSelectJobTooltip',
|
||||
defaultMessage: 'Cannot select job' })
|
||||
: undefined,
|
||||
selectableMessage: (selectable, rowItem) => (
|
||||
(selectable === false)
|
||||
? i18n.translate(
|
||||
'xpack.ml.jobsList.cannotSelectRowForJobMessage',
|
||||
{
|
||||
defaultMessage: 'Cannot select job ID {jobId}',
|
||||
values: {
|
||||
jobId: rowItem.id,
|
||||
}
|
||||
}
|
||||
)
|
||||
: i18n.translate(
|
||||
'xpack.ml.jobsList.selectRowForJobMessage',
|
||||
{
|
||||
defaultMessage: 'Select the row for job ID {jobId}',
|
||||
values: {
|
||||
jobId: rowItem.id,
|
||||
}
|
||||
}
|
||||
)
|
||||
),
|
||||
onSelectionChange: this.props.selectJobChange
|
||||
};
|
||||
|
||||
|
|
|
@ -6641,7 +6641,6 @@
|
|||
"xpack.ml.jobsList.actionExecuteSuccessfullyNotificationMessage": "{successesJobsCount, plural, one{{successJob}} other{# 件のジョブ}} {actionTextPT}成功",
|
||||
"xpack.ml.jobsList.actionFailedNotificationMessage": "{failureId} が {actionText} に失敗しました",
|
||||
"xpack.ml.jobsList.actionsLabel": "アクション",
|
||||
"xpack.ml.jobsList.cannotSelectJobTooltip": "ジョブを選択できません",
|
||||
"xpack.ml.jobsList.cloneJobErrorMessage": "{jobId} のクローンを作成できませんでした。ジョブが見つかりませんでした",
|
||||
"xpack.ml.jobsList.closeActionStatusText": "閉じる",
|
||||
"xpack.ml.jobsList.closedActionStatusText": "クローズ済み",
|
||||
|
|
|
@ -6641,7 +6641,6 @@
|
|||
"xpack.ml.jobsList.actionExecuteSuccessfullyNotificationMessage": "{successesJobsCount, plural, one{{successJob}} other{# 个作业}}{actionTextPT}已成功",
|
||||
"xpack.ml.jobsList.actionFailedNotificationMessage": "{failureId} 未能{actionText}",
|
||||
"xpack.ml.jobsList.actionsLabel": "操作",
|
||||
"xpack.ml.jobsList.cannotSelectJobTooltip": "无法选择作业",
|
||||
"xpack.ml.jobsList.cloneJobErrorMessage": "无法克隆 {jobId}。找不到作业",
|
||||
"xpack.ml.jobsList.closeActionStatusText": "关闭",
|
||||
"xpack.ml.jobsList.closedActionStatusText": "已关闭",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue