Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Translations (#536)
Browse files Browse the repository at this point in the history
* refactor visits

* translate appointments.search template file

* grand total should be one key

* translate visits templates

* translate patients.edit

* More translations

* translate component files

* Change philhealth to something generic
  • Loading branch information
billybonks authored and jkleinsc committed Jul 7, 2016
1 parent 880f6e1 commit b6f3402
Show file tree
Hide file tree
Showing 21 changed files with 357 additions and 271 deletions.
8 changes: 4 additions & 4 deletions app/appointments/search/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<div class="panel-body">
{{#em-form model=model submitButton=false }}
<div class="row">
{{date-picker property="selectedStartingDate" label="Show Appointments On Or After" class="col-sm-3"}}
{{date-picker property="selectedStartingDate" label=(t "appointments.labels.selectedStartingDate")class="col-sm-3"}}
{{em-select class="col-sm-3" property="selectedStatus"
label="Status" content=appointmentStatusesWithEmpty
label=(t "labels.status") content=appointmentStatusesWithEmpty
}}
</div>
<div calss="row">
{{em-select class="col-sm-3" label="Type"
{{em-select class="col-sm-3" label=(t "labels.type")
property="selectedAppointmentType" content=visitTypesWithEmpty
}}
{{em-select class="col-sm-3" property="selectedProvider"
label="With" content=physicianList
label=(t 'labels.with') content=physicianList
}}
</div>
{{/em-form}}
Expand Down
3 changes: 2 additions & 1 deletion app/components/charge-quantity.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
i18n: Ember.inject.service(),
classNames: ['col-xs-2', 'form-group'],
classNameBindings: ['hasError'],
tagName: 'td',
Expand All @@ -17,7 +18,7 @@ export default Ember.Component.extend({

quantityHelp: function() {
if (this.get('hasError')) {
return 'not a valid number';
return this.get('i18n').t('components.invalid_number');
}
}.property('hasError')

Expand Down
25 changes: 13 additions & 12 deletions app/components/loading-message.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import Ember from 'ember';
import { translationMacro as t } from 'ember-i18n';
export default Ember.Component.extend({
tagName: 'span',
showLoadingMessages: false,
loadingMessages: [
'The top butterfly flight speed is 12 miles per hour. Some moths can fly 25 miles per hour!',
'Owls are the only birds that can see the color blue.',
'Cats have over 100 vocal sounds; dogs only have 10.',
'Humans use a total of 72 different muscles in speech.',
'More than 1,000 different languages are spoken on the continent of Africa.',
'An erythrophobe is someone who blushes easily.',
'The most common phobia in the world is odynophobia which is the fear of pain.',
'Your body uses 300 muscles to balance itself when you are standing still.',
'Certain frogs can be frozen solid then thawed, and continue living.',
'Our eyes are always the same size from birth, but our nose and ears never stop growing.',
'Your tongue is the only muscle in your body that is attached at only one end.',
'Camels have three eyelids to protect themselves from blowing sand.'
t('loading.messages.0'),
t('loading.messages.1'),
t('loading.messages.2'),
t('loading.messages.3'),
t('loading.messages.4'),
t('loading.messages.5'),
t('loading.messages.6'),
t('loading.messages.7'),
t('loading.messages.8'),
t('loading.messages.9'),
t('loading.messages.10'),
t('loading.messages.11')
],

_setRandomMessage: function() {
Expand Down
3 changes: 2 additions & 1 deletion app/components/modal-dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
i18n: Ember.inject.service(),
cancelAction: 'cancel',
closeModalAction: 'closeModal',
hideCancelButton: false,
Expand All @@ -13,7 +14,7 @@ export default Ember.Component.extend({
cancelBtnText: function() {
let cancelText = this.get('cancelButtonText');
if (Ember.isEmpty(cancelText)) {
return 'Cancel';
return this.get('i18n').t('buttons.cancel');
} else {
return cancelText;
}
Expand Down
4 changes: 2 additions & 2 deletions app/invoices/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<th class="col-xs-5">{{t 'labels.description'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.actual_charges'}}</th>
<th class="col-xs-1 text-right">{{t 'labels.discount'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.phil_health'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.insurance'}}</th>
<th class="col-xs-1 text-right">{{t 'billing.labels.hmo_com'}}</th>
<th class="col-xs-1 text-right">{{t 'labels.excess'}}</th>
<th class="col-xs-2 text-right">{{t 'labels.action'}}</th>
Expand Down Expand Up @@ -189,7 +189,7 @@
</tr>
<tr>
<td>
<strong>{{t 'labels.grand'}} {{t 'labels.total'}}</strong>
<strong>{{t 'labels.grand_total'}}</strong>
</td>
<td colspan="4"></td>
<td class="text-right">{{number-format model.remainingBalance}}</td>
Expand Down
150 changes: 124 additions & 26 deletions app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default {
billing: 'Billing',
administration: 'Administration',
subnav: {
actions: 'Actions',
requests: 'Requests',
items: 'Items',
completed: 'Completed',
Expand Down Expand Up @@ -235,6 +236,7 @@ export default {
cptcode: 'CPT Code',
loading: 'Loading',
name: 'Name',
note: 'Note',
patient: 'Patient',
prescriber: 'Prescriber',
quantity: 'Quantity',
Expand Down Expand Up @@ -267,6 +269,7 @@ export default {
type: 'Type',
sex: 'Sex',
age: 'Age',
search: 'Search',
username: 'Username',
email: 'Email',
role: 'Role',
Expand Down Expand Up @@ -318,11 +321,13 @@ export default {
price: 'Price',
total: 'Total',
expense_to: 'Expense To',
grand: 'Grand',
grand_total: 'Grand Total',
remarks: 'Remarks',
payments: 'Payments',
category: 'Category',
department: 'Department'
department: 'Department',
address: 'Address',
country: 'Country'
},
messages: {
no_items_found: 'No items found.',
Expand All @@ -341,7 +346,11 @@ export default {
alerts: {
please_wait: 'Please Wait'
},
headings: {
charged_items: 'Charged Items'
},
buttons: {
add_item: 'Add Item',
complete: 'Complete',
cancel: 'Cancel',
close: 'Close',
Expand Down Expand Up @@ -379,6 +388,22 @@ export default {
sign_in: 'Sign in'
}
},
loading: {
messages: {
0: 'The top butterfly flight speed is 12 miles per hour. Some moths can fly 25 miles per hour!',
1: 'Owls are the only birds that can see the color blue.',
2: 'Cats have over 100 vocal sounds; dogs only have 10.',
3: 'Humans use a total of 72 different muscles in speech.',
4: 'More than 1,000 different languages are spoken on the continent of Africa.',
5: 'An erythrophobe is someone who blushes easily.',
6: 'The most common phobia in the world is odynophobia which is the fear of pain.',
7: 'Your body uses 300 muscles to balance itself when you are standing still.',
8: 'Certain frogs can be frozen solid then thawed, and continue living.',
9: 'Our eyes are always the same size from birth, but our nose and ears never stop growing.',
10: 'Your tongue is the only muscle in your body that is attached at only one end.',
11: 'Camels have three eyelids to protect themselves from blowing sand.'
}
},
inventory: {
edit: {
cost: 'Cost Per Unit:',
Expand Down Expand Up @@ -636,31 +661,56 @@ export default {
},
buttons: {
new_button: '+ new appointment'
},
labels: {
selectedStartingDate: 'Show Appointments On Or After'
}
},
vitals: {
messages: {
delete: 'Are you sure you wish to delete these vitals?'
},
labels: {
date_recorded: 'Date Recorded',
temperature: 'Temperature',
weight: 'Weight',
height: 'Height',
sbp: 'SBP',
dbp: 'DBP',
heart_rate: 'Heart Rate',
respiratory_rate: 'Respiratory Rate'
}
},
visits: {
edit: {
actions: 'Actions',
edit: 'Edit',
date: 'Date',
authored_by: 'Authored By',
note: 'Note',
notes: 'Notes',
new_note: 'New Note',
visit_information: 'Visit Information',
titles: {
additional_diagnoses: 'Additional Diagnoses'
},
messages: {
delete: 'Are you sure you wish to delete this visit?'
},
buttons: {
new_procedure: 'New Procedure',
new_lab: 'New Lab',
new_appointment: 'New Appointment',
add_diagnosis: 'Add Diagnosis',
new_imaging: 'New Imaging',
new_medication: 'New Medication',
new_vitals: 'New Vitals'
},
labels: {
diagnosis: 'Diagnosis',
delete: 'Delete',
procedure: 'Procedure',
procedures: 'Procedures',
new_procedure: 'New Procedure',
authored_by: 'Authored By',
labs: 'Labs',
new_lab: 'New Lab',
imaging: 'Imaging',
new_imaging: 'New Imaging',
visit_information: 'Visit Information',
examiner: 'Examiner',
medication: 'Medication',
new_medication: 'New Medication'
status: 'Visit Status',
admitting_diagnosis: 'Admitting Diagnosis',
final_diagnosis: 'Final/Billing Diagnosis',
visit_type: 'Visit Type',
vitals: 'Vitals'
}
},
labs: {
Expand Down Expand Up @@ -690,12 +740,20 @@ export default {
request_saved_message: 'The lab request has been saved.'
}
},
common: {
actions: 'Actions'
},
patients: {
navigation: {
photos: 'Photos',
general: 'General',
history: 'History',
appointments: 'Appointments',
visits: 'Visits',
medication: 'Medication',
imaging: 'Imaging',
labs: 'Labs',
social_work: 'Social Work'
},
titles: {
add_contact: 'Add Contact',
family_information: 'Family Information',
delete: 'Delete Patient',
new: 'New Patient',
edit: 'Edit Patient',
Expand All @@ -721,10 +779,28 @@ export default {
create_new_patient: 'Create a new patient record?'
},
buttons: {
add_expense: 'Add Expense',
add_contact: 'Add Contact',
new_lab: 'New Lab',
new_visit: 'New Visit',
new_medication: 'New Medication',
new_imaging: 'New Imaging',
add_family_member: 'Add Family Member',
new_photo: 'New Photo',
new_appointment: 'New Appointment',
back_to_patients: 'Back to Patient List',
new_patient: '+ new patient'
},
headings: {
history: 'History',
history_since: 'History Since'
},
labels: {
primary_diagnosis: 'Primary Diagnoses',
secondary_diagnosis: 'Secondary Diagnoses',
monthly_cost: 'Monthly Cost',
total_montly_expense: 'Total Monthly Expenses',
patient_type: 'Patient Type',
admission_date: 'Admission Date',
patient_days: 'Patient Days',
discharge_date: 'Discharge Date',
Expand All @@ -734,9 +810,12 @@ export default {
phone: 'Phone',
email: 'Email',
first_name: 'First Name',
middle_name: 'Middle Name',
last_name: 'Last Name',
sex: 'Sex',
dob: 'DOB',
date_of_birth: 'Date Of Birth',
place_of_birth: 'Place Of Birth',
sources: 'Sources',
costs: 'Costs',
civil_status: 'Civil Status',
Expand All @@ -745,15 +824,22 @@ export default {
occupation: 'Occupation',
income: 'Income',
insurance: 'Insurance',
date_processed: 'Date Processed'
date_processed: 'Date Processed',
status: 'Patient Status',
external_patient_id: 'External Patient Id',
blood_type: 'Blood Type',
clinic: 'Clinic Site',
referred_by: 'Referred By',
referred_date: 'Referred Date',
religion: 'Religion',
parent: 'Parent/Guardian'
},
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',
note_label: 'Note'
please_select_a_visit: 'Please select a visit'
}
},
billing: {
Expand All @@ -771,7 +857,7 @@ export default {
external_invoice_number: 'External Invoice #',
payment_profile: 'Payment Profile',
actual_charges: 'Actual Charges',
phil_health: 'PhilHealth',
insurance: 'National Insurance',
hmo_com: 'HMO/COM',
payments_deposits: 'Payments/Deposits',
pricing_panel_overrides: 'Pricing profile overrides',
Expand All @@ -796,10 +882,22 @@ export default {
medication_used: 'Medication Used'
},
messages: {
delete_medication: 'Are you sure you want to delete this medication?'
delete_medication: 'Are you sure you want to delete this medication?',
delete: 'Are you sure you wish to delete this procedure?'
},
buttons: {
add_medication: 'Add Medication'
}
},
photos: {
how: 'How Do You Want To Add A Photo?',
take_photo: 'Take photo',
upload_photo: 'Upload Photo',
upload_file: 'Upload File',
camera: 'Camera',
photo: 'photo'
},
components: {
invalid_number: 'not a valid number'
}
};
Loading

0 comments on commit b6f3402

Please sign in to comment.