Skip to content

Commit

Permalink
rename a translation key
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Oct 20, 2022
1 parent c070045 commit b0a39a3
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const explainLackOfPermission = (
} else if (isMlRule(rule.type) && !hasMlPermissions) {
return detectionI18n.ML_RULES_DISABLED_MESSAGE;
} else if (!canEditRuleWithActions(rule, hasReadActionsPrivileges)) {
return i18nActions.LACK_OF_KIBANA_PRIVILEGES;
return i18nActions.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES;
} else if (!hasUserCRUDPermission(canUserCRUD)) {
return i18nActions.LACK_OF_RULE_EDITING_PRIVILEGES;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const RuleActionsOverflowComponent = ({
position="left"
content={
!canEditRuleWithActions(rule, canDuplicateRuleWithActions)
? i18nActions.LACK_OF_KIBANA_PRIVILEGES
? i18nActions.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ export const useBulkActions = ({
disabled:
missingActionPrivileges || containsLoading || (!containsDisabled && !isAllSelected),
onClick: handleEnableAction,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand All @@ -342,7 +344,9 @@ export const useBulkActions = ({
'data-test-subj': 'duplicateRuleBulk',
disabled: isEditDisabled,
onClick: handleDuplicateAction,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand All @@ -366,7 +370,9 @@ export const useBulkActions = ({
'data-test-subj': 'addRuleActionsBulk',
disabled: !hasActionsPrivileges || isEditDisabled,
onClick: handleBulkEdit(BulkActionEditType.add_rule_actions),
toolTipContent: !hasActionsPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: !hasActionsPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand All @@ -376,7 +382,9 @@ export const useBulkActions = ({
'data-test-subj': 'setScheduleBulk',
disabled: isEditDisabled,
onClick: handleBulkEdit(BulkActionEditType.set_schedule),
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand All @@ -386,7 +394,9 @@ export const useBulkActions = ({
'data-test-subj': 'applyTimelineTemplateBulk',
disabled: isEditDisabled,
onClick: handleBulkEdit(BulkActionEditType.set_timeline),
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand All @@ -405,7 +415,9 @@ export const useBulkActions = ({
disabled:
missingActionPrivileges || containsLoading || (!containsEnabled && !isAllSelected),
onClick: handleDisableActions,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
icon: undefined,
},
Expand Down Expand Up @@ -439,7 +451,9 @@ export const useBulkActions = ({
'data-test-subj': 'addTagsBulkEditRule',
onClick: handleBulkEdit(BulkActionEditType.add_tags),
disabled: isEditDisabled,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
},
{
Expand All @@ -448,7 +462,9 @@ export const useBulkActions = ({
'data-test-subj': 'deleteTagsBulkEditRule',
onClick: handleBulkEdit(BulkActionEditType.delete_tags),
disabled: isEditDisabled,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
},
],
Expand All @@ -463,7 +479,9 @@ export const useBulkActions = ({
'data-test-subj': 'addIndexPatternsBulkEditRule',
onClick: handleBulkEdit(BulkActionEditType.add_index_patterns),
disabled: isEditDisabled,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
},
{
Expand All @@ -472,7 +490,9 @@ export const useBulkActions = ({
'data-test-subj': 'deleteIndexPatternsBulkEditRule',
onClick: handleBulkEdit(BulkActionEditType.delete_index_patterns),
disabled: isEditDisabled,
toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_PRIVILEGES : undefined,
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getRulesTableActions = ({
'data-test-subj': 'editRuleAction',
description: i18n.EDIT_RULE_SETTINGS,
name: !actionsPrivileges ? (
<EuiToolTip position="left" content={i18n.LACK_OF_KIBANA_PRIVILEGES}>
<EuiToolTip position="left" content={i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES}>
<>{i18n.EDIT_RULE_SETTINGS}</>
</EuiToolTip>
) : (
Expand All @@ -59,7 +59,7 @@ export const getRulesTableActions = ({
description: i18n.DUPLICATE_RULE,
icon: 'copy',
name: !actionsPrivileges ? (
<EuiToolTip position="left" content={i18n.LACK_OF_KIBANA_PRIVILEGES}>
<EuiToolTip position="left" content={i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES}>
<>{i18n.DUPLICATE_RULE}</>
</EuiToolTip>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ export const EDIT_RULE_SETTINGS = i18n.translate(
}
);

export const LACK_OF_KIBANA_PRIVILEGES = i18n.translate(
'xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaPrivileges',
export const LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES = i18n.translate(
'xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaActionsFeaturePrivileges',
{
defaultMessage: 'You do not have Kibana Actions privileges',
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -27360,7 +27360,7 @@
"xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteRuleDescription": "Supprimer la règle",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "Dupliquer la règle",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "Modifier les paramètres de règles",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaPrivileges": "Vous ne disposez pas des privilèges d'actions Kibana",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaActionsFeaturePrivileges": "Vous ne disposez pas des privilèges d'actions Kibana",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "Exporter la règle",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "La sélection contient des règles immuables qui ne peuvent pas être supprimées",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "Actions groupées",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -27335,7 +27335,7 @@
"xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteRuleDescription": "ルールの削除",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "ルールの複製",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "ルール設定の編集",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaPrivileges": "Kibana アクション特権がありません",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaActionsFeaturePrivileges": "Kibana アクション特権がありません",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "ルールのエクスポート",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "選択には削除できないイミュータブルルールがあります",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "一斉アクション",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -27369,7 +27369,7 @@
"xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteRuleDescription": "删除规则",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "复制规则",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "编辑规则设置",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaPrivileges": "您没有 Kibana 操作权限",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.lackOfKibanaActionsFeaturePrivileges": "您没有 Kibana 操作权限",
"xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "导出规则",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "选择内容包含无法删除的不可变规则",
"xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "批处理操作",
Expand Down

0 comments on commit b0a39a3

Please sign in to comment.