@@ -38,12 +38,12 @@
{{/if}}
{{#if canComplete}}
{{select-or-typeahead property="radiologist"
- label="Radiologist" list=radiologistList
+ label=(t 'imaging.labels.radiologist') list=radiologistList
prompt=" "
class="radiologist-input"
}}
- {{em-input property="result" label="Result" class="result-input"}}
+ {{em-input property="result" label=(t 'labels.result') class="result-input"}}
{{/if}}
- {{em-text property="notes" label="Notes" rows=3 }}
+ {{em-text property="notes" label=(t 'labels.notes') rows=3 }}
{{/em-form}}
{{/edit-panel}}
diff --git a/app/imaging/index/route.js b/app/imaging/index/route.js
index b6c70d6a45..72561007d7 100644
--- a/app/imaging/index/route.js
+++ b/app/imaging/index/route.js
@@ -1,7 +1,8 @@
+import { translationMacro as t } from 'ember-i18n';
import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route';
export default AbstractIndexRoute.extend({
modelName: 'imaging',
- pageTitle: 'Imaging Requests',
+ pageTitle: t('imaging.page_title'),
searchStatus: 'Requested',
_getStartKeyFromItem: function(item) {
@@ -11,7 +12,6 @@ export default AbstractIndexRoute.extend({
searchStatus = this.get('searchStatus');
return [searchStatus, requestedDateAsTime, imagingDateAsTime, id];
},
-
_modelQueryParams: function() {
var maxId = this._getMaxPouchId(),
maxValue = this.get('maxValue'),
diff --git a/app/imaging/index/template.hbs b/app/imaging/index/template.hbs
index 40d3b1fcc5..87d0def83c 100644
--- a/app/imaging/index/template.hbs
+++ b/app/imaging/index/template.hbs
@@ -28,7 +28,7 @@
{{else}}
{{/if}}
{{/item-listing}}
diff --git a/app/imaging/route.js b/app/imaging/route.js
index bfbada2b54..7dff4ac6ff 100644
--- a/app/imaging/route.js
+++ b/app/imaging/route.js
@@ -1,3 +1,4 @@
+import { translationMacro as t } from 'ember-i18n';
import AbstractModuleRoute from 'hospitalrun/routes/abstract-module-route';
export default AbstractModuleRoute.extend({
addCapability: 'add_imaging',
@@ -10,14 +11,19 @@ export default AbstractModuleRoute.extend({
}],
allowSearch: false,
moduleName: 'imaging',
- newButtonText: '+ new imaging',
- sectionTitle: 'Imaging',
- subActions: [{
- text: 'Requests',
- linkTo: 'imaging.index'
- }, {
- text: 'Completed',
- linkTo: 'imaging.completed'
- }]
+ newButtonText: t('imaging.buttons.new_button'),
+ sectionTitle: t('imaging.section_title'),
+ subActions: function() {
+ let i18n = this.get("i18n");
+
+ return [{
+ text: i18n.t('labels.requests'),
+ linkTo: 'imaging.index'
+ }, {
+ text: i18n.t('labels.completed'),
+ linkTo: 'imaging.completed'
+ }];
+
+ }.property()
});
diff --git a/app/initializers/i18n.js b/app/initializers/i18n.js
new file mode 100644
index 0000000000..02511aad45
--- /dev/null
+++ b/app/initializers/i18n.js
@@ -0,0 +1,11 @@
+export default {
+ name: 'i18n',
+
+ after: 'ember-i18n',
+
+ initialize: function(app) {
+ app.inject('route', 'i18n', 'service:i18n');
+ app.inject('controller', 'i18n', 'service:i18n');
+ app.inject('mixin', 'i18n', 'service:i18n');
+ }
+};
\ No newline at end of file
diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js
index cebbaddf08..ae1be91df4 100644
--- a/app/locales/en/translations.js
+++ b/app/locales/en/translations.js
@@ -8,13 +8,34 @@ export default {
quantity: 'Quantity',
requested_on: 'Requested On',
date_requested: 'Date Requested',
+ date_completed: 'Date Completed',
requested_by: 'Requested By',
fulfill: 'Fulfill',
actions: 'Actions',
action: 'Action',
notes: 'Notes',
edit: 'Edit',
- imaging_type: 'Imaging Type'
+ imaging_type: 'Imaging Type',
+ result: 'Result',
+ results: 'Results',
+ visit: 'Visit',
+ requests: 'Requests',
+ completed: 'Completed',
+ id: 'Id',
+ gender: 'Gender',
+ age: 'Age'
+ },
+ messages: {
+ no_items_found: 'No items found.',
+ create_new_record: 'Create a new record?'
+ },
+ buttons: {
+ complete: 'Complete',
+ cancel: 'Cancel',
+ return_button: 'Return',
+ add: 'Add',
+ update: 'Update',
+ ok: 'Ok'
},
login: {
messages: {
@@ -31,5 +52,30 @@ export default {
no_requests: 'No requests found.',
create_request: 'Create a new request?'
}
- }
+ },
+ imaging : {
+ page_title: 'Imaging Requests',
+ section_title: 'Imaging',
+ buttons: {
+ new_button: '+ new imaging',
+ },
+ labels: {
+ radiologist: 'Radiologist',
+ add_new_visit: '--Add New Visit--'
+ },
+ messages: {
+ no_completed: 'No completed items found.'
+ },
+ titles: {
+ completed_imaging: 'Completed Imaging',
+ edit_title: 'Edit Imaging Request',
+ new_title: 'New Imaging Request'
+ },
+ alerts: {
+ completed_title: 'Imaging Request Completed',
+ completed_message: 'The imaging request has been completed.',
+ saved_title: 'Imaging Request Saved',
+ saved_message: 'The imaging request has been saved.'
+ }
+ }
};
diff --git a/app/mixins/modal-helper.js b/app/mixins/modal-helper.js
index b41ddd466f..1077ecf7d4 100644
--- a/app/mixins/modal-helper.js
+++ b/app/mixins/modal-helper.js
@@ -6,13 +6,16 @@ export default Ember.Mixin.create({
* @param message string containing the message to display.
*/
displayAlert: function(title, message, okAction) {
- this.send('openModal', 'dialog', Ember.Object.create({
+ let i18n = this.get('i18n');
+ let modalOptions = Ember.Object.extend({
+ updateButtonText: i18n.t('buttons.ok')
+ });
+ this.send('openModal', 'dialog', modalOptions.create({
title: title,
message: message,
okAction: okAction,
hideCancelButton: true,
updateButtonAction: 'ok',
- updateButtonText: 'Ok'
}));
},
diff --git a/app/templates/components/patient-summary.hbs b/app/templates/components/patient-summary.hbs
index 00b4b74030..e852a03ba8 100644
--- a/app/templates/components/patient-summary.hbs
+++ b/app/templates/components/patient-summary.hbs
@@ -2,16 +2,16 @@
- {{patient.displayPatientId}}
+ {{patient.displayPatientId}}
{{patient.displayName}}
- {{patient.gender}}
+ {{patient.gender}}
- {{patient.age}}
+ {{patient.age}}
{{#if havePrimaryDiagnoses}}