Skip to content

Commit

Permalink
[ML] Fixing recognizer wizard create job button (#73025) (#73182)
Browse files Browse the repository at this point in the history
* [ML] Fixing recognizer wizard create job button

* updating translations
  • Loading branch information
jgowdyelastic authored Jul 24, 2020
1 parent ec0813c commit 4ce5f87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,27 +258,19 @@ export const JobSettingsForm: FC<JobSettingsFormProps> = ({
fill
type="submit"
isLoading={saveState === SAVE_STATE.SAVING}
disabled={!validationResult.formValid}
disabled={!validationResult.formValid || saveState === SAVE_STATE.SAVING}
onClick={() => {
onSubmit(formState);
}}
aria-label={i18n.translate('xpack.ml.newJob.recognize.createJobButtonAriaLabel', {
defaultMessage: 'Create job',
})}
>
{saveState === SAVE_STATE.NOT_SAVED && (
<FormattedMessage
id="xpack.ml.newJob.recognize.createJobButtonLabel"
defaultMessage="Create {numberOfJobs, plural, zero {Job} one {Job} other {Jobs}}"
values={{ numberOfJobs: jobs.length }}
/>
)}
{saveState === SAVE_STATE.SAVING && (
<FormattedMessage
id="xpack.ml.newJob.recognize.analysisRunningLabel"
defaultMessage="Analysis running"
/>
)}
<FormattedMessage
id="xpack.ml.newJob.recognize.createJobButtonLabel"
defaultMessage="Create {numberOfJobs, plural, zero {Job} one {Job} other {Jobs}}"
values={{ numberOfJobs: jobs.length }}
/>
</EuiButton>
</EuiTextAlign>
</>
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -10241,7 +10241,6 @@
"xpack.ml.newJob.recognize.advancedLabel": "高度な設定",
"xpack.ml.newJob.recognize.advancedSettingsAriaLabel": "高度な設定",
"xpack.ml.newJob.recognize.alreadyExistsLabel": "(既に存在します)",
"xpack.ml.newJob.recognize.analysisRunningLabel": "分析を実行中",
"xpack.ml.newJob.recognize.cancelJobOverrideLabel": "閉じる",
"xpack.ml.newJob.recognize.createJobButtonAriaLabel": "ジョブを作成",
"xpack.ml.newJob.recognize.createJobButtonLabel": "{numberOfJobs, plural, zero {Job} one {Job} other {Jobs}} を作成",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -10245,7 +10245,6 @@
"xpack.ml.newJob.recognize.advancedLabel": "高级",
"xpack.ml.newJob.recognize.advancedSettingsAriaLabel": "高级设置",
"xpack.ml.newJob.recognize.alreadyExistsLabel": "(已存在)",
"xpack.ml.newJob.recognize.analysisRunningLabel": "分析正在运行",
"xpack.ml.newJob.recognize.cancelJobOverrideLabel": "关闭",
"xpack.ml.newJob.recognize.createJobButtonAriaLabel": "创建作业",
"xpack.ml.newJob.recognize.createJobButtonLabel": "创建{numberOfJobs, plural, zero {作业} one {Job} other {Jobs}}",
Expand Down

0 comments on commit 4ce5f87

Please sign in to comment.