From 08517377af48a401bd2f968dcf60ef913b2ddd43 Mon Sep 17 00:00:00 2001 From: Sebastien Stettler Date: Sat, 18 Jun 2016 21:24:32 +0800 Subject: [PATCH] Translate patients (#489) * translate patient controllers * translate patient templates * translate patient routes * fix syntax errors --- app/locales/en/translations.js | 55 +++++++++++++++++++ app/patients/add-contact/controller.js | 6 +- app/patients/add-contact/template.hbs | 8 +-- app/patients/delete/controller.js | 4 +- app/patients/delete/template.hbs | 2 +- app/patients/edit/controller.js | 32 +++++------ app/patients/edit/route.js | 6 +- app/patients/imaging/template.hbs | 10 ++-- app/patients/index/route.js | 4 +- app/patients/index/template.hbs | 20 +++---- app/patients/labs/template.hbs | 12 ++-- app/patients/medication/template.hbs | 8 +-- app/patients/notes/controller.js | 6 +- app/patients/photo/controller.js | 8 +-- app/patients/quick-add/controller.js | 6 +- app/patients/quick-add/template.hbs | 2 +- app/patients/reports/controller.js | 18 +++--- app/patients/reports/route.js | 4 +- app/patients/reports/template.hbs | 6 +- app/patients/route.js | 4 +- app/patients/socialwork/expense/controller.js | 12 ++-- app/patients/socialwork/expense/template.hbs | 6 +- .../socialwork/family-info/controller.js | 10 ++-- .../socialwork/family-info/template.hbs | 16 +++--- 24 files changed, 171 insertions(+), 94 deletions(-) diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 76c46335b3..2b976fee4a 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -650,7 +650,62 @@ export default { actions: 'Actions' }, patients: { + titles: { + add_contact: 'Add Contact', + delete: 'Delete Patient', + new: 'New Patient', + edit: 'Edit Patient', + patient: 'Patient Report', + patient_listing: 'Patient Listing', + patient_report: 'Patient Report', + add_photo: 'Add Photo', + edit_photo: 'Edit Photo', + social_work: 'Expense', + family_info: 'Family Info', + delete_family_member: 'Delete Family Member', + delete_expense: 'Delete Expense', + delete_photo: 'Delete Photo', + delete_contact: 'Delete Contact', + saved_patient: 'Patient Saved' + }, + messages: { + are_you_sure_delete: 'Are you sure you want to delete this {{object}}?', + delete_patient: 'Are you sure you wish to delete {{firstName}} {{lastName}}?', + no_patients_found: 'No patients found.', + saved_patient: 'The patient record for {{displayName}} has been saved.', + not_found_quick_add: 'The patient {{patientFullName}} could not be found. If you would like to create a new patient, fill in the information below. Otherwise press the Cancel button to return.', + create_new_patient: 'Create a new patient record?' + }, + buttons: { + back_to_patients: 'Back to Patient List', + new_patient: '+ new patient' + }, + labels: { + admission_date: 'Admission Date', + patient_days: 'Patient Days', + discharge_date: 'Discharge Date', + discharge: 'Discharge', + admit: 'Admit', + relationships: 'Relationships', + phone: 'Phone', + email: 'Email', + first_name: 'First Name', + last_name: 'Last Name', + sex: 'Sex', + dob: 'DOB', + sources: 'Sources', + costs: 'Costs', + civil_status: 'Civil Status', + relationship: 'Relationship To Patient', + education: 'Education', + occupation: 'Occupation', + income: 'Income', + insurance: 'Insurance', + date_processed: 'Date Processed' + }, notes: { + new_note: 'New Note for', + update_note: 'Updating Note from', on_behalf_of_label: 'On Behalf Of', on_behalf_of_copy: 'on behalf of', please_select_a_visit: 'Please select a visit', diff --git a/app/patients/add-contact/controller.js b/app/patients/add-contact/controller.js index 84a6979fc2..f84c1e5ac8 100644 --- a/app/patients/add-contact/controller.js +++ b/app/patients/add-contact/controller.js @@ -1,10 +1,12 @@ import Ember from 'ember'; import IsUpdateDisabled from 'hospitalrun/mixins/is-update-disabled'; +import { translationMacro as t } from 'ember-i18n'; + export default Ember.Controller.extend(IsUpdateDisabled, { patientsEdit: Ember.inject.controller('patients/edit'), editController: Ember.computed.alias('patientsEdit'), - title: 'Add Contact', - updateButtonText: 'Add', + title: t('patients.titles.add_contact'), + updateButtonText: t('buttons.add'), updateButtonAction: 'add', showUpdateButton: true, diff --git a/app/patients/add-contact/template.hbs b/app/patients/add-contact/template.hbs index 8cd5397aa3..103b21d613 100644 --- a/app/patients/add-contact/template.hbs +++ b/app/patients/add-contact/template.hbs @@ -6,9 +6,9 @@ updateButtonAction=updateButtonAction updateButtonText=updateButtonText }} {{#em-form model=this submitButton=false }} - {{em-input label="Name" property="name"}} - {{em-input label="Phone" property="phone"}} - {{em-input label="Email" property="email"}} - {{em-input label="Relationship" property="relationship"}} + {{em-input label=(t 'labels.name') property="name"}} + {{em-input label=(t 'patients.labels.phone') property="phone"}} + {{em-input label=(t 'patients.labels.email') property="email"}} + {{em-input label=(t 'patients.labels.relationships') property="relationship"}} {{/em-form}} {{/modal-dialog}} diff --git a/app/patients/delete/controller.js b/app/patients/delete/controller.js index 1923a33ddd..73f1966496 100644 --- a/app/patients/delete/controller.js +++ b/app/patients/delete/controller.js @@ -1,4 +1,6 @@ import AbstractDeleteController from 'hospitalrun/controllers/abstract-delete-controller'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractDeleteController.extend({ - title: 'Delete Patient' + title: t('patients.titles.delete') }); diff --git a/app/patients/delete/template.hbs b/app/patients/delete/template.hbs index 55ea8c1149..bae56861be 100644 --- a/app/patients/delete/template.hbs +++ b/app/patients/delete/template.hbs @@ -5,6 +5,6 @@ updateButtonText=updateButtonText }}
- Are you sure you wish to delete {{model.firstName}} {{model.lastName}}? + {{t 'patients.messages.delete_patient' model}}
{{/modal-dialog}} diff --git a/app/patients/edit/controller.js b/app/patients/edit/controller.js index 2fc71a64e7..701d45194b 100644 --- a/app/patients/edit/controller.js +++ b/app/patients/edit/controller.js @@ -366,33 +366,33 @@ export default AbstractEditController.extend(BloodTypes, ReturnTo, UserSession, showDeleteContact: function(contact) { this.send('openModal', 'dialog', Ember.Object.create({ confirmAction: 'deleteContact', - title: 'Delete Contact', - message: 'Are you sure you want to delete this contact?', + title: this.get('i18n').t('patients.titles.delete_contact'), + message: this.get('i18n').t('patients.titles.delete_photo', { object: 'contact' }), contactToDelete: contact, updateButtonAction: 'confirm', - updateButtonText: 'Ok' + updateButtonText: this.get('i18n').t('buttons.ok') })); }, showDeleteExpense: function(expense) { this.send('openModal', 'dialog', Ember.Object.create({ confirmAction: 'deleteExpense', - title: 'Delete Expense', - message: 'Are you sure you want to delete this expense?', + title: this.get('i18n').t('patients.titles.delete_expense'), + message: this.get('i18n').t('patients.titles.delete_photo', { object: 'expense' }), expenseToDelete: expense, updateButtonAction: 'confirm', - updateButtonText: 'Ok' + updateButtonText: this.get('i18n').t('buttons.ok') })); }, showDeleteFamily: function(familyInfo) { this.send('openModal', 'dialog', Ember.Object.create({ confirmAction: 'deleteFamily', - title: 'Delete Family Member', - message: 'Are you sure you want to delete this family member?', + title: this.get('i18n').t('patients.titles.delete_family_member'), + message: this.get('i18n').t('patients.titles.delete_photo', { object: 'family member' }), familyToDelete: familyInfo, updateButtonAction: 'confirm', - updateButtonText: 'Ok' + updateButtonText: this.get('i18n').t('buttons.ok') })); }, @@ -412,11 +412,11 @@ export default AbstractEditController.extend(BloodTypes, ReturnTo, UserSession, showDeletePhoto: function(photo) { this.send('openModal', 'dialog', Ember.Object.create({ confirmAction: 'deletePhoto', - title: 'Delete Photo', - message: 'Are you sure you want to delete this photo?', + title: this.get('i18n').t('patients.titles.delete_photo'), + message: this.get('i18n').t('patients.titles.delete_photo', { object: 'photo' }), photoToDelete: photo, updateButtonAction: 'confirm', - updateButtonText: 'Ok' + updateButtonText: this.get('i18n').t('buttons.ok') })); }, @@ -518,11 +518,11 @@ export default AbstractEditController.extend(BloodTypes, ReturnTo, UserSession, afterUpdate: function(record) { this.send('openModal', 'dialog', Ember.Object.create({ - title: 'Patient Saved', - message: `The patient record for ${record.get('displayName')} has been saved.`, + title: this.get('i18n').t('patients.titles.saved_patient'), + message: this.get('i18n').t('patients.messages.saved_patient', record), updateButtonAction: 'returnToPatient', - updateButtonText: 'Back to Patient List', - cancelButtonText: 'Close' + updateButtonText: this.get('i18n').t('patients.buttons.back_to_patients'), + cancelButtonText: this.get('i18n').t('buttons.close') })); } diff --git a/app/patients/edit/route.js b/app/patients/edit/route.js index 0eb7db4f49..8713018874 100644 --- a/app/patients/edit/route.js +++ b/app/patients/edit/route.js @@ -4,10 +4,12 @@ import PatientId from 'hospitalrun/mixins/patient-id'; import PatientVisits from 'hospitalrun/mixins/patient-visits'; import PatientNotes from 'hospitalrun/mixins/patient-notes'; import PouchDbMixin from 'hospitalrun/mixins/pouchdb'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractEditRoute.extend(PatientId, PatientVisits, PouchDbMixin, PatientNotes, { - editTitle: 'Edit Patient', + editTitle: t('patients.titles.edit'), modelName: 'patient', - newTitle: 'New Patient', + newTitle: t('patients.titles.new'), photos: null, actions: { diff --git a/app/patients/imaging/template.hbs b/app/patients/imaging/template.hbs index 0951f4cdf7..7e4b69d287 100644 --- a/app/patients/imaging/template.hbs +++ b/app/patients/imaging/template.hbs @@ -2,9 +2,9 @@ {{t 'labels.date_requested'}} {{t 'labels.imaging_type'}} - Status - Date Processed - Result + {{t 'labels.status'}} + {{t 'patients.labels.date_processed'}} + {{t 'labels.result'}} {{t 'labels.notes'}} {{t 'labels.requested_by'}} {{t 'labels.actions'}} @@ -24,10 +24,10 @@ {{/if}} {{#if canDeleteImaging}} - + {{/if}} {{/if}} {{/each}} - \ No newline at end of file + diff --git a/app/patients/index/route.js b/app/patients/index/route.js index 22fce7e1ee..88e7f144d6 100644 --- a/app/patients/index/route.js +++ b/app/patients/index/route.js @@ -1,7 +1,9 @@ import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractIndexRoute.extend({ modelName: 'patient', - pageTitle: 'Patient Listing', + pageTitle: t('patients.titles.patient_listing'), _getStartKeyFromItem: function(item) { var displayPatientId = item.get('displayPatientId'); diff --git a/app/patients/index/template.hbs b/app/patients/index/template.hbs index 79ebdc1d2a..40156b080d 100644 --- a/app/patients/index/template.hbs +++ b/app/patients/index/template.hbs @@ -3,12 +3,12 @@ - {{#sortable-column sortBy='id' sortDesc=sortDesc sortKey=sortKey }}ID{{/sortable-column}} - {{#sortable-column sortBy='firstName' sortDesc=sortDesc sortKey=sortKey }}First Name{{/sortable-column}} - {{#sortable-column sortBy='lastName' sortDesc=sortDesc sortKey=sortKey }}Last Name{{/sortable-column}} - {{#sortable-column sortBy='sex' sortDesc=sortDesc sortKey=sortKey }}Sex{{/sortable-column}} - {{#sortable-column sortBy='dateOfBirth' sortDesc=sortDesc sortKey=sortKey }}DOB{{/sortable-column}} - {{#sortable-column sortBy='status' sortDesc=sortDesc sortKey=sortKey }}Status{{/sortable-column}} + {{#sortable-column sortBy='id' sortDesc=sortDesc sortKey=sortKey }}{{t 'labels.id'}}{{/sortable-column}} + {{#sortable-column sortBy='firstName' sortDesc=sortDesc sortKey=sortKey }}{{t 'patients.labels.first_name'}}{{/sortable-column}} + {{#sortable-column sortBy='lastName' sortDesc=sortDesc sortKey=sortKey }}{{t 'patients.labels.last_name'}}{{/sortable-column}} + {{#sortable-column sortBy='sex' sortDesc=sortDesc sortKey=sortKey }}{{t 'patients.labels.sex'}}{{/sortable-column}} + {{#sortable-column sortBy='dateOfBirth' sortDesc=sortDesc sortKey=sortKey }}{{t 'patients.labels.dob'}}{{/sortable-column}} + {{#sortable-column sortBy='status' sortDesc=sortDesc sortKey=sortKey }}{{t 'labels.status'}}{{/sortable-column}} {{#if showActions}} {{/if}} @@ -30,16 +30,16 @@ {{/if}} {{#unless patient.admitted}} {{#if canAdmitPatient}} - + {{/if}} {{/unless}} {{#if patient.admitted}} {{#if canDischargePatient}} - + {{/if}} {{/if}} {{#if canDelete}} - + {{/if}} {{/if}} @@ -49,7 +49,7 @@
{{t 'labels.actions'}}
{{else}}
-

No patients found. {{#if canAdd}}Create a new patient record?{{/if}}

+

{{t 'patients.messages.no_patients_found'}}{{#if canAdd}} {{t 'patients.messages.create_new_patient'}}{{/if}}

{{/if}} {{/item-listing}} diff --git a/app/patients/labs/template.hbs b/app/patients/labs/template.hbs index 9f1d0c20b6..d79f896d11 100644 --- a/app/patients/labs/template.hbs +++ b/app/patients/labs/template.hbs @@ -1,10 +1,10 @@ - - - - + + + + @@ -24,10 +24,10 @@ {{/if}} {{#if canDeleteLab}} - + {{/if}} {{/if}} {{/each}} -
{{t 'labels.date_requested'}}Lab TypeStatusDate ProcessedResult{{t 'labs.labels.lab_type'}}{{t 'labels.status'}}{{t 'patients.labels.date_processed'}}{{t 'labels.result'}} {{t 'labels.notes'}} {{t 'labels.requested_by'}} {{t 'labels.actions'}}
\ No newline at end of file + diff --git a/app/patients/medication/template.hbs b/app/patients/medication/template.hbs index 019409c195..4fd804d1bd 100644 --- a/app/patients/medication/template.hbs +++ b/app/patients/medication/template.hbs @@ -1,9 +1,9 @@ - + - - + + @@ -20,7 +20,7 @@ {{/if}} {{#if canDeleteMedication}} - + {{/if}} {{/if}} diff --git a/app/patients/notes/controller.js b/app/patients/notes/controller.js index 3425fb1871..d6fa13543e 100644 --- a/app/patients/notes/controller.js +++ b/app/patients/notes/controller.js @@ -16,9 +16,9 @@ export default AbstractEditController.extend(IsUpdateDisabled, UserSession, Pati }], title: function() { if (this.get('model.isNew')) { - return 'New Note for ' + this.get('model.patient.displayName'); + return `${this.get('i18n').t('patients.notes.new_note')} ${this.get('model.patient.displayName')}`; } else { - return 'Updating Note from ' + (moment(this.get('model.date')).format('MM/DD/YYYY')) + ' for ' + this.get('model.patient.displayName'); + return `${this.get('i18n').t('patients.notes.new_note')} ${(moment(this.get('model.date')).format('MM/DD/YYYY')) + ' for ' + this.get('model.patient.displayName')}`; } }.property('model.patient.displayName'), updateCapability: 'add_note', @@ -48,4 +48,4 @@ export default AbstractEditController.extend(IsUpdateDisabled, UserSession, Pati this._setNoteType(); } } -}); \ No newline at end of file +}); diff --git a/app/patients/photo/controller.js b/app/patients/photo/controller.js index 7443596701..8f0a47f41e 100644 --- a/app/patients/photo/controller.js +++ b/app/patients/photo/controller.js @@ -5,18 +5,18 @@ export default Ember.Controller.extend({ title: function() { var isNew = this.get('model.isNew'); if (isNew) { - return 'Add Photo'; + return this.get('i18n').t('patients.titles.add_photo'); } else { - return 'Edit Photo'; + return this.get('i18n').t('patients.titles.edit_photo'); } }.property('model.isNew'), updateButtonText: function() { var isNew = this.get('model.isNew'); if (isNew) { - return 'Add'; + return this.get('i18n').t('buttons.add'); } else { - return 'Update'; + return this.get('i18n').t('buttons.add'); } }.property('model.isNew'), diff --git a/app/patients/quick-add/controller.js b/app/patients/quick-add/controller.js index 00f9268abf..40a0a58e49 100644 --- a/app/patients/quick-add/controller.js +++ b/app/patients/quick-add/controller.js @@ -1,9 +1,11 @@ -import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller'; import Ember from 'ember'; +import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractEditController.extend({ medicationController: Ember.inject.controller('medication'), sexList: Ember.computed.alias('medicationController.sexList'), - title: 'New Patient', + title: t('patients.titles.new'), updateCapability: 'add_patient', diff --git a/app/patients/quick-add/template.hbs b/app/patients/quick-add/template.hbs index aabeb8fc90..266e45ac2e 100644 --- a/app/patients/quick-add/template.hbs +++ b/app/patients/quick-add/template.hbs @@ -5,7 +5,7 @@ updateButtonAction=updateButtonAction updateButtonText=updateButtonText }} {{#em-form model=model submitButton=false }}
diff --git a/app/patients/reports/controller.js b/app/patients/reports/controller.js index 0b769c6818..07d9825bd8 100644 --- a/app/patients/reports/controller.js +++ b/app/patients/reports/controller.js @@ -1,9 +1,11 @@ -import AbstractReportController from 'hospitalrun/controllers/abstract-report-controller'; import Ember from 'ember'; +import AbstractReportController from 'hospitalrun/controllers/abstract-report-controller'; import PatientDiagnosis from 'hospitalrun/mixins/patient-diagnosis'; import PatientVisits from 'hospitalrun/mixins/patient-visits'; import SelectValues from 'hospitalrun/utils/select-values'; import VisitTypes from 'hospitalrun/mixins/visit-types'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractReportController.extend(PatientDiagnosis, PatientVisits, VisitTypes, { patientsController: Ember.inject.controller('patients'), @@ -18,12 +20,12 @@ export default AbstractReportController.extend(PatientDiagnosis, PatientVisits, admissionReportColumns: { sex: { - label: 'Sex', + label: t('labels.sex'), include: true, property: 'sex' }, total: { - label: 'Total', + label: t('labels.total'), include: true, property: 'total', format: '_numberFormat' @@ -31,29 +33,29 @@ export default AbstractReportController.extend(PatientDiagnosis, PatientVisits, }, admissionDetailReportColumns: { id: { - label: 'Id', + label: t('labels.id'), include: true, property: 'patientId' }, name: { - label: 'Name', + label: t('labels.name'), include: true, property: 'patientName' }, admissionDate: { - label: 'Admission Date', + label: t('patients.labels.admission_date'), include: true, property: 'admissionDate', format: '_dateTimeFormat' }, dischargeDate: { - label: 'Discharge Date', + label: t('patients.labels.discharge_date'), include: false, property: 'dischargeDate', format: '_dateTimeFormat' }, patientDays: { - label: 'Patient Days', + label: t('patients.labels.discharge_date'), include: false, property: 'patientDays', format: '_numberFormat' diff --git a/app/patients/reports/route.js b/app/patients/reports/route.js index 1f9368027d..baff23a2c1 100644 --- a/app/patients/reports/route.js +++ b/app/patients/reports/route.js @@ -1,7 +1,9 @@ import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; import Ember from 'ember'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractIndexRoute.extend({ - pageTitle: 'Patient Report', + pageTitle: t('patients.titles.patient_report'), // No model for reports; data gets retrieved when report is run. model: function() { diff --git a/app/patients/reports/template.hbs b/app/patients/reports/template.hbs index 318ce70a4a..1c1d509f02 100644 --- a/app/patients/reports/template.hbs +++ b/app/patients/reports/template.hbs @@ -3,7 +3,7 @@ {{#em-form model=this submitButton=false }}
- + {{select-list action=(action (mut reportType)) class='form-control' @@ -88,7 +88,7 @@ {{/em-form}}
{{#if showReportResults}} @@ -109,7 +109,7 @@
Date{{t 'labels.date'}} {{t 'labels.name'}}StatusPrescription{{t 'labels.status'}}{{t 'labels.prescription'}} {{t 'labels.requested_by'}} {{t 'labels.actions'}}
diff --git a/app/patients/route.js b/app/patients/route.js index 11dee6db76..c34fbef6e6 100644 --- a/app/patients/route.js +++ b/app/patients/route.js @@ -1,6 +1,8 @@ import AbstractModuleRoute from 'hospitalrun/routes/abstract-module-route'; import Ember from 'ember'; import PatientId from 'hospitalrun/mixins/patient-id'; +import { translationMacro as t } from 'ember-i18n'; + export default AbstractModuleRoute.extend(PatientId, { addCapability: 'add_patient', additionalModels: [{ @@ -53,6 +55,6 @@ export default AbstractModuleRoute.extend(PatientId, { }.bind(this)); } }, - newButtonText: '+ new patient', + newButtonText: t('patients.buttons.new_patient'), moduleName: 'patients' }); diff --git a/app/patients/socialwork/expense/controller.js b/app/patients/socialwork/expense/controller.js index c0da70e93e..e9e9f2a592 100644 --- a/app/patients/socialwork/expense/controller.js +++ b/app/patients/socialwork/expense/controller.js @@ -1,6 +1,8 @@ import Ember from 'ember'; import IsUpdateDisabled from 'hospitalrun/mixins/is-update-disabled'; import SelectValues from 'hospitalrun/utils/select-values'; +import { translationMacro as t } from 'ember-i18n'; + export default Ember.Controller.extend(IsUpdateDisabled, { patientsController: Ember.inject.controller('patients'), @@ -18,13 +20,15 @@ export default Ember.Controller.extend(IsUpdateDisabled, { editController: Ember.computed.alias('patientsController'), showUpdateButton: true, - title: 'Expense', + title: t('patients.titles.social_work'), updateButtonAction: 'update', + updateButtonText: function() { - if (this.get('model.isNew')) { - return 'Add'; + var isNew = this.get('model.isNew'); + if (isNew) { + return this.get('i18n').t('buttons.add'); } else { - return 'Update'; + return this.get('i18n').t('buttons.add'); } }.property('model.isNew'), diff --git a/app/patients/socialwork/expense/template.hbs b/app/patients/socialwork/expense/template.hbs index 5ce9a128be..2d78dc7d98 100644 --- a/app/patients/socialwork/expense/template.hbs +++ b/app/patients/socialwork/expense/template.hbs @@ -6,11 +6,11 @@ updateButtonAction=updateButtonAction updateButtonText=updateButtonText }} {{#em-form model=model submitButton=false }} - {{em-select label="Category" property="category" class="required" + {{em-select label=(t 'inventory.reports.rows.category') property="category" class="required" content=categoryTypes prompt=" " }} - {{em-input label="Sources" property="sources"}} - {{em-input label="Cost" property="cost" class="required"}} + {{em-input label=(t 'patients.labels.sources') property="sources"}} + {{em-input label=(t 'patients.labels.cost') property="cost" class="required"}} {{/em-form}} {{/modal-dialog}} diff --git a/app/patients/socialwork/family-info/controller.js b/app/patients/socialwork/family-info/controller.js index 9b4b254b09..8210d77680 100644 --- a/app/patients/socialwork/family-info/controller.js +++ b/app/patients/socialwork/family-info/controller.js @@ -5,13 +5,15 @@ export default Ember.Controller.extend(IsUpdateDisabled, { editController: Ember.computed.alias('patientsController'), showUpdateButton: true, - title: 'Family Info', + title: t('patients.titles.family_info'), updateButtonAction: 'update', + updateButtonText: function() { - if (this.get('model.isNew')) { - return 'Add'; + var isNew = this.get('model.isNew'); + if (isNew) { + return this.get('i18n').t('buttons.add'); } else { - return 'Update'; + return this.get('i18n').t('buttons.add'); } }.property('model.isNew'), diff --git a/app/patients/socialwork/family-info/template.hbs b/app/patients/socialwork/family-info/template.hbs index a68f113762..06d1bac36e 100644 --- a/app/patients/socialwork/family-info/template.hbs +++ b/app/patients/socialwork/family-info/template.hbs @@ -7,20 +7,20 @@ updateButtonText=updateButtonText }} {{#em-form model=model submitButton=false }}
- {{em-input label="Name" property="name" class="required col-xs-6"}} - {{em-input label="Age" property="age" class="col-xs-3"}} + {{em-input label=(t labels.name) property="name" class="required col-xs-6"}} + {{em-input label=(t labels.age) property="age" class="col-xs-3"}}
- {{em-input label="Civil Status" property="civilStatus" class="col-xs-6"}} - {{em-input label="Relationship To Patient" property="relationship" class="col-xs-6"}} + {{em-input label=(t labels.civil_status) property="civilStatus" class="col-xs-6"}} + {{em-input label=(t labels.relationship) property="relationship" class="col-xs-6"}}
- {{em-input label="Education" property="education" class="col-xs-6"}} - {{em-input label="Occupation" property="occupation" class="col-xs-6"}} + {{em-input label=(t labels.education) property="education" class="col-xs-6"}} + {{em-input label=(t labels.occupation)property="occupation" class="col-xs-6"}}
- {{em-input label="Income" property="income" class="col-xs-6"}} - {{em-input label="Insurance" property="insurance" class="col-xs-6"}} + {{em-input label=(t labels.income) property="income" class="col-xs-6"}} + {{em-input label=(t labels.insurance) property="insurance" class="col-xs-6"}}
{{/em-form}} {{/modal-dialog}}