From 2d1ad93f3bacc836ea8851ce36743b9989fc17b8 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Dec 2016 18:15:37 -0300 Subject: [PATCH] Ivan - Add internationalization for departments view [skip ci] --- client/src/app-components/are-you-sure.js | 2 +- .../src/app/admin/panel/staff/admin-panel-departments.js | 4 ++-- client/src/data/languages/en.js | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/app-components/are-you-sure.js b/client/src/app-components/are-you-sure.js index 13c86819..82b569c0 100644 --- a/client/src/app-components/are-you-sure.js +++ b/client/src/app-components/are-you-sure.js @@ -6,7 +6,7 @@ import ModalContainer from 'app-components/modal-container'; class AreYouSure extends React.Component { static propTypes = { - description: React.PropTypes.string, + description: React.PropTypes.node, onYes: React.PropTypes.func }; diff --git a/client/src/app/admin/panel/staff/admin-panel-departments.js b/client/src/app/admin/panel/staff/admin-panel-departments.js index 19f80c37..327b38b6 100644 --- a/client/src/app/admin/panel/staff/admin-panel-departments.js +++ b/client/src/app/admin/panel/staff/admin-panel-departments.js @@ -46,10 +46,10 @@ class AdminPanelDepartments extends React.Component {
- {i18n((this.state.selectedIndex !== -1) ? 'UPDATE_NAME' : 'ADD_DEPARTMENT')} + {i18n((this.state.selectedIndex !== -1) ? 'UPDATE_DEPARTMENT' : 'ADD_DEPARTMENT')} - {(this.state.selectedIndex !== -1) ? this.renderOptionalButtons() : null} + {(this.state.selectedIndex !== -1 && this.props.departments.length) ? this.renderOptionalButtons() : null} diff --git a/client/src/data/languages/en.js b/client/src/data/languages/en.js index acb99b74..7b515636 100644 --- a/client/src/data/languages/en.js +++ b/client/src/data/languages/en.js @@ -111,6 +111,8 @@ export default { 'UPDATE_LEVEL': 'Update level', 'UPDATE_DEPARTMENTS': 'Update departments', 'EDIT_STAFF': 'Edit staff member', + 'ADD_DEPARTMENT': 'Add department', + 'UPDATE_DEPARTMENT': 'Update department', //VIEW DESCRIPTIONS 'CREATE_TICKET_DESCRIPTION': 'This is a form for creating tickets. Fill the form and send us your issues/doubts/suggestions. Our support system will answer it as soon as possible.', @@ -137,6 +139,7 @@ export default { 'ADD_STAFF_DESCRIPTION': 'Here you can add staff members to your teams.', 'EDIT_STAFF_DESCRIPTION': 'Here you can edit information about a staff member.', 'MY_ACCOUNT_DESCRIPTION': 'Here you can edit information about you.', + 'DEPARTMENTS_DESCRIPTION': 'A department is a group where the tickets can go. They are used to categorize the tickets. You can assign them to other staff members.', //ERRORS 'EMAIL_OR_PASSWORD': 'Email or password invalid', @@ -163,5 +166,7 @@ export default { 'PASSWORD_CHANGED': 'Password has been changed successfully', 'OLD_PASSWORD_INCORRECT': 'Old password is incorrect', 'WILL_LOSE_CHANGES': 'You haven\'t save. Your changes will be lost.', - 'WILL_DELETE_CUSTOM_RESPONSE': 'The custom response will be deleted.' + 'WILL_DELETE_CUSTOM_RESPONSE': 'The custom response will be deleted.', + 'WILL_DELETE_DEPARTMENT': 'The department will be deleted. All the tickets will be transfer to the department selected.', + 'NO_STAFF_ASSIGNED': 'No staff member is assigned to this department.' };