Skip to content

Commit

Permalink
[7.x] [SIEM][CASE] Improve Jira's labelling (#69892) (#69923)
Browse files Browse the repository at this point in the history
* Change labeling

* Improve word
  • Loading branch information
cnasikas authored Jun 25, 2020
1 parent fb8e9e8 commit 8bc04a9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const JiraConnectorForm: React.FC<ConnectorFlyoutFormProps<JiraActionConnector>>
fullWidth
error={errors.email}
isInvalid={isEmailInvalid}
label={i18n.EMAIL_LABEL}
label={i18n.JIRA_EMAIL_LABEL}
>
<EuiFieldText
fullWidth
Expand All @@ -85,7 +85,7 @@ const JiraConnectorForm: React.FC<ConnectorFlyoutFormProps<JiraActionConnector>>
fullWidth
error={errors.apiToken}
isInvalid={isApiTokenInvalid}
label={i18n.API_TOKEN_LABEL}
label={i18n.JIRA_API_TOKEN_LABEL}
>
<EuiFieldPassword
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const validateConnector = (action: JiraActionConnector): ValidationResult => {
}

if (!action.secrets.email) {
errors.email = [...errors.email, i18n.EMAIL_REQUIRED];
errors.email = [...errors.email, i18n.JIRA_EMAIL_REQUIRED];
}

if (!action.secrets.apiToken) {
errors.apiToken = [...errors.apiToken, i18n.API_TOKEN_REQUIRED];
errors.apiToken = [...errors.apiToken, i18n.JIRA_API_TOKEN_REQUIRED];
}

return { errors };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,34 @@ export const JIRA_PROJECT_KEY_REQUIRED = i18n.translate(
}
);

export const JIRA_EMAIL_LABEL = i18n.translate(
'xpack.securitySolution.case.connectors.jira.emailTextFieldLabel',
{
defaultMessage: 'Email or Username',
}
);

export const JIRA_EMAIL_REQUIRED = i18n.translate(
'xpack.securitySolution.case.connectors.jira.requiredEmailTextField',
{
defaultMessage: 'Email or Username is required',
}
);

export const JIRA_API_TOKEN_LABEL = i18n.translate(
'xpack.securitySolution.case.connectors.jira.apiTokenTextFieldLabel',
{
defaultMessage: 'API token or Password',
}
);

export const JIRA_API_TOKEN_REQUIRED = i18n.translate(
'xpack.securitySolution.case.connectors.jira.requiredApiTokenTextField',
{
defaultMessage: 'API token or Password is required',
}
);

export const MAPPING_FIELD_SUMMARY = i18n.translate(
'xpack.securitySolution.case.configureCases.mappingFieldSummary',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ export const PASSWORD_REQUIRED = i18n.translate(
export const API_TOKEN_LABEL = i18n.translate(
'xpack.securitySolution.case.connectors.common.apiTokenTextFieldLabel',
{
defaultMessage: 'Api token',
defaultMessage: 'API token',
}
);

export const API_TOKEN_REQUIRED = i18n.translate(
'xpack.securitySolution.case.connectors.common.requiredApiTokenTextField',
{
defaultMessage: 'Api token is required',
defaultMessage: 'API token is required',
}
);

Expand Down

0 comments on commit 8bc04a9

Please sign in to comment.