Skip to content

Commit

Permalink
Combine identical title translation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Jul 22, 2020
1 parent 50a39b6 commit a417a7a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import { i18n } from '@kbn/i18n';

export const missingMlResultsPrivilegesTitle = i18n.translate(
'xpack.infra.logs.analysis.missingMlResultsPrivilegesTitle',
export const missingMlPrivilegesTitle = i18n.translate(
'xpack.infra.logs.analysis.missingMlPrivilegesTitle',
{
defaultMessage: 'Additional Machine Learning privileges required',
}
Expand All @@ -21,13 +21,6 @@ export const missingMlResultsPrivilegesDescription = i18n.translate(
}
);

export const missingMlSetupPrivilegesTitle = i18n.translate(
'xpack.infra.logs.analysis.missingMlSetupPrivilegesTitle',
{
defaultMessage: 'Additional Machine Learning privileges required',
}
);

export const missingMlSetupPrivilegesDescription = i18n.translate(
'xpack.infra.logs.analysis.missingMlSetupPrivilegesDescription',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { EuiEmptyPrompt } from '@elastic/eui';
import React from 'react';
import { euiStyled } from '../../../../../observability/public';
import {
missingMlPrivilegesTitle,
missingMlResultsPrivilegesDescription,
missingMlResultsPrivilegesTitle,
} from './missing_privileges_messages';
import { UserManagementLink } from './user_management_link';

export const MissingResultsPrivilegesPrompt: React.FunctionComponent = () => (
<EmptyPrompt
title={<h2>{missingMlResultsPrivilegesTitle}</h2>}
title={<h2>{missingMlPrivilegesTitle}</h2>}
body={<p>{missingMlResultsPrivilegesDescription}</p>}
actions={<UserManagementLink />}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { EuiEmptyPrompt } from '@elastic/eui';
import React from 'react';
import { euiStyled } from '../../../../../observability/public';
import {
missingMlPrivilegesTitle,
missingMlSetupPrivilegesDescription,
missingMlSetupPrivilegesTitle,
} from './missing_privileges_messages';
import { UserManagementLink } from './user_management_link';

export const MissingSetupPrivilegesPrompt: React.FunctionComponent = () => (
<EmptyPrompt
title={<h2>{missingMlSetupPrivilegesTitle}</h2>}
title={<h2>{missingMlPrivilegesTitle}</h2>}
body={<p>{missingMlSetupPrivilegesDescription}</p>}
actions={<UserManagementLink />}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import { EuiToolTip, PropsOf } from '@elastic/eui';
import React from 'react';
import {
missingMlPrivilegesTitle,
missingMlSetupPrivilegesDescription,
missingMlSetupPrivilegesTitle,
} from './missing_privileges_messages';

export const MissingSetupPrivilegesToolTip: React.FC<Omit<
Expand All @@ -18,6 +18,6 @@ export const MissingSetupPrivilegesToolTip: React.FC<Omit<
<EuiToolTip
{...props}
content={missingMlSetupPrivilegesDescription}
title={missingMlSetupPrivilegesTitle}
title={missingMlPrivilegesTitle}
/>
);
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -7415,8 +7415,6 @@
"xpack.infra.logs.analysis.anomalySectionNoDataTitle": "表示するデータがありません。",
"xpack.infra.logs.analysis.jobStoppedCalloutMessage": "ML ジョブが手動またはリソース不足により停止しました。新しいログエントリーはジョブが再起動するまで処理されません。",
"xpack.infra.logs.analysis.jobStoppedCalloutTitle": "ML ジョブが停止しました",
"xpack.infra.logs.analysis.missingMlResultsPrivilegesTitle": "追加の機械学習の権限が必要です",
"xpack.infra.logs.analysis.missingMlSetupPrivilegesTitle": "追加の機械学習の権限が必要です",
"xpack.infra.logs.analysis.mlAppButton": "機械学習を開く",
"xpack.infra.logs.analysis.mlUnavailableBody": "詳細は{machineLearningAppLink}をご覧ください。",
"xpack.infra.logs.analysis.mlUnavailableTitle": "この機能には機械学習が必要です",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -7420,8 +7420,6 @@
"xpack.infra.logs.analysis.anomalySectionNoDataTitle": "没有可显示的数据。",
"xpack.infra.logs.analysis.jobStoppedCalloutMessage": "ML 作业已手动停止或由于缺乏资源而停止。作业重新启动后,才会处理新的日志条目。",
"xpack.infra.logs.analysis.jobStoppedCalloutTitle": "ML 作业已停止",
"xpack.infra.logs.analysis.missingMlResultsPrivilegesTitle": "需要额外的 Machine Learning 权限",
"xpack.infra.logs.analysis.missingMlSetupPrivilegesTitle": "需要额外的 Machine Learning 权限",
"xpack.infra.logs.analysis.mlAppButton": "打开 Machine Learning",
"xpack.infra.logs.analysis.mlUnavailableBody": "查看 {machineLearningAppLink} 以获取更多信息。",
"xpack.infra.logs.analysis.mlUnavailableTitle": "此功能需要 Machine Learning",
Expand Down

0 comments on commit a417a7a

Please sign in to comment.