Skip to content

Commit

Permalink
EPMRPP-87574 || Edit Project or Global integration has wrong title (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazarQSO authored Dec 6, 2023
1 parent 5af63ea commit 42e864e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/localization/translated/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"AddFilter.placeholderFilterName": "Увядзіце назву фільтра",
"AddIntegrationModal.createGlobalTitle": "Стварыць глабальную інтэграцыю",
"AddIntegrationModal.createProjectTitle": "Стварыць праектную інтэграцыю",
"AddIntegrationModal.editAuthTitle": "Змяніць аўтарызацыю",
"AddIntegrationModal.editProjectIntegrationTitle": "Рэдагаваць інтэграцыю праекта",
"AddIntegrationModal.editGlobalIntegrationTitle": "Рэдагаваць глабальную інтэграцыю",
"AddNewCaseButton.addNewRuleButton": "Дадаць новае правіла",
"AddUserForm.addUserTitle": "Дадаць карыстальніка",
"AddUserForm.generatePassword": "Згенераваць пароль",
Expand Down
3 changes: 2 additions & 1 deletion app/localization/translated/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"AddFilter.placeholderFilterName": "Ввести имя фильтра",
"AddIntegrationModal.createGlobalTitle": "Создать глобальную интеграцию",
"AddIntegrationModal.createProjectTitle": "Создать проектную интеграцию",
"AddIntegrationModal.editAuthTitle": "Изменить авторизацию",
"AddIntegrationModal.editProjectIntegrationTitle": "Редактировать интеграцию проекта",
"AddIntegrationModal.editGlobalIntegrationTitle": "Редактировать глобальную интеграцию",
"AddNewCaseButton.addNewRuleButton": "Добавить новое правило",
"AddUserForm.addUserTitle": "Добавить пользователя",
"AddUserForm.generatePassword": "Сгенерировать пароль",
Expand Down
3 changes: 2 additions & 1 deletion app/localization/translated/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"AddFilter.placeholderFilterName": "Ввести ім’я фільтру",
"AddIntegrationModal.createGlobalTitle": "Створити глобальну інтеграцію",
"AddIntegrationModal.createProjectTitle": "Створити проектну інтеграцію",
"AddIntegrationModal.editAuthTitle": "Змінити авторизацію",
"AddIntegrationModal.editProjectIntegrationTitle": "Редагувати інтеграцію проекту",
"AddIntegrationModal.editGlobalIntegrationTitle": "Редагувати глобальну інтеграцію",
"AddNewCaseButton.addNewRuleButton": "Додати нове правило",
"AddUserForm.addUserTitle": "Додати користувача",
"AddUserForm.generatePassword": "Згенерувати пароль",
Expand Down
3 changes: 2 additions & 1 deletion app/localization/translated/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"AddFilter.placeholderFilterName": "请输入过滤器名称",
"AddIntegrationModal.createGlobalTitle": "创建全局集成",
"AddIntegrationModal.createProjectTitle": "Create Project Integration",
"AddIntegrationModal.editAuthTitle": "编辑授权",
"AddIntegrationModal.editProjectIntegrationTitle": "Edit Project Integration",
"AddIntegrationModal.editGlobalIntegrationTitle": "Edit Global Integration",
"AddNewCaseButton.addNewRuleButton": "创建规则",
"AddUserForm.addUserTitle": "添加用户",
"AddUserForm.generatePassword": "生成密码",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ const messages = defineMessages({
id: 'AddIntegrationModal.createGlobalTitle',
defaultMessage: 'Create Global Integration',
},
editAuthTitle: {
id: 'AddIntegrationModal.editAuthTitle',
defaultMessage: 'Edit authorization',
editProjectIntegrationTitle: {
id: 'AddIntegrationModal.editProjectIntegrationTitle',
defaultMessage: 'Edit Project Integration',
},
editGlobalIntegrationTitle: {
id: 'AddIntegrationModal.editGlobalIntegrationTitle',
defaultMessage: 'Edit Global Integration',
},
});

Expand All @@ -66,7 +70,6 @@ const AddIntegrationModal = ({ data, initialize, change, handleSubmit, dirty })
const { formatMessage } = useIntl();
const { trackEvent } = useTracking();
const { onConfirm, customProps, isGlobal } = data;

const integrationFieldsExtension = fieldsExtensions.find(
(ext) => ext.pluginName === data.instanceType,
);
Expand Down Expand Up @@ -94,14 +97,17 @@ const AddIntegrationModal = ({ data, initialize, change, handleSubmit, dirty })
};

const createTitle = isGlobal ? messages.createGlobalTitle : messages.createProjectTitle;
const editTitle = isGlobal
? messages.editGlobalIntegrationTitle
: messages.editProjectIntegrationTitle;

const FieldsComponent =
INTEGRATIONS_FORM_FIELDS_COMPONENTS_MAP[data.instanceType] ||
(integrationFieldsExtension && ExtensionLoader);

return (
<ModalLayout
title={formatMessage(customProps.editAuthMode ? messages.editAuthTitle : createTitle)}
title={formatMessage(customProps.editAuthMode ? editTitle : createTitle)}
okButton={okButton}
cancelButton={cancelButton}
onClose={() => dispatch(hideModalAction())}
Expand Down

0 comments on commit 42e864e

Please sign in to comment.