From 7f1282120c38268f32f7fe4ba3247074d294e9fa Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Thu, 25 Jun 2020 11:33:38 +0300 Subject: [PATCH 1/2] Change labeling --- .../common/lib/connectors/jira/flyout.tsx | 4 +-- .../common/lib/connectors/jira/index.tsx | 4 +-- .../lib/connectors/jira/translations.ts | 28 +++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx index c9953fdb30e0..0737db3cd08e 100644 --- a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx @@ -63,7 +63,7 @@ const JiraConnectorForm: React.FC> fullWidth error={errors.email} isInvalid={isEmailInvalid} - label={i18n.EMAIL_LABEL} + label={i18n.JIRA_EMAIL_LABEL} > > fullWidth error={errors.apiToken} isInvalid={isApiTokenInvalid} - label={i18n.API_TOKEN_LABEL} + label={i18n.JIRA_API_TOKEN_LABEL} > { } 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 }; diff --git a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts index 286f81842411..7c4b67352680 100644 --- a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts @@ -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.common.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', { From 441efa6f615bf4bf36c5e5f6d929b23d398b58cf Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Thu, 25 Jun 2020 12:02:14 +0300 Subject: [PATCH 2/2] Improve word --- .../public/common/lib/connectors/jira/translations.ts | 6 +++--- .../public/common/lib/connectors/translations.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts index 7c4b67352680..bcb2c49a0de7 100644 --- a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts @@ -44,7 +44,7 @@ export const JIRA_EMAIL_LABEL = i18n.translate( ); export const JIRA_EMAIL_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.connectors.common.requiredEmailTextField', + 'xpack.securitySolution.case.connectors.jira.requiredEmailTextField', { defaultMessage: 'Email or Username is required', } @@ -53,14 +53,14 @@ export const JIRA_EMAIL_REQUIRED = i18n.translate( export const JIRA_API_TOKEN_LABEL = i18n.translate( 'xpack.securitySolution.case.connectors.jira.apiTokenTextFieldLabel', { - defaultMessage: 'Api token or Password', + 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', + defaultMessage: 'API token or Password is required', } ); diff --git a/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts index 40848ea76900..6dd1247d40fc 100644 --- a/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts @@ -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', } );