From 2831830575035891623fd4e4723b13d494c8d229 Mon Sep 17 00:00:00 2001 From: Mitch Ellis Date: Wed, 25 May 2016 23:06:00 +0800 Subject: [PATCH 1/3] [TRANSLATION] Billing Invoice Routes translated --- app/invoices/add-line-item/template.hbs | 4 +- app/invoices/delete/template.hbs | 2 +- app/invoices/edit/template.hbs | 64 ++++++++++++------------- app/invoices/index/template.hbs | 18 +++---- app/invoices/payment/template.hbs | 10 ++-- app/locales/en/translations.js | 40 +++++++++++++++- 6 files changed, 87 insertions(+), 51 deletions(-) diff --git a/app/invoices/add-line-item/template.hbs b/app/invoices/add-line-item/template.hbs index bb16d10e3d..306df11e5f 100644 --- a/app/invoices/add-line-item/template.hbs +++ b/app/invoices/add-line-item/template.hbs @@ -4,9 +4,9 @@ updateButtonAction=updateButtonAction updateButtonText=updateButtonText }} {{#em-form model=model submitButton=false }} - {{em-input property="name" label="Name" class="required"}} + {{em-input property="name" label=(t 'labels.name') class="required"}} {{select-or-typeahead property="category" className="required" - label="Category" list=billingCategories + label=(t 'labels.category') list=billingCategories selection=model.category }} {{/em-form}} diff --git a/app/invoices/delete/template.hbs b/app/invoices/delete/template.hbs index 0622ea2c0f..a9f900cd37 100644 --- a/app/invoices/delete/template.hbs +++ b/app/invoices/delete/template.hbs @@ -6,6 +6,6 @@ {{#em-form model=model submitButton=false }}{{/em-form}}
- Are you sure you wish to delete {{model.displayInvoiceNumber}}? + {{t 'billing.alerts.delete_item' item=model.displayInvoiceNumber}}
{{/modal-dialog}} diff --git a/app/invoices/edit/template.hbs b/app/invoices/edit/template.hbs index 8825374534..64407e3663 100644 --- a/app/invoices/edit/template.hbs +++ b/app/invoices/edit/template.hbs @@ -6,14 +6,14 @@
{{#unless model.isNew}}
- +

{{model.id}}

{{/unless}} - {{date-picker property="billDate" label="Bill Date" class="col-xs-2"}} + {{date-picker property="billDate" label=(t 'labels.bill_date') class="col-xs-2"}} {{#if model.isNew}} - {{patient-typeahead property="patientTypeAhead" label="Patient" content=patientList selection=selectedPatient class="col-xs-4 required invoice-patient"}} - {{em-select class="col-xs-4 required invoice-visit" label="Visit" + {{patient-typeahead property="patientTypeAhead" label=(t 'labels.patient') content=patientList selection=selectedPatient class="col-xs-4 required invoice-patient"}} + {{em-select class="col-xs-4 required invoice-visit" label=(t 'labels.visit') property="visit" content=patientVisitsForSelect optionValuePath="selectObject" optionLabelPath="selectObject.visitDescription" selected=model.visit @@ -21,14 +21,14 @@ }} {{else}}
- +

{{model.visit.visitDescription}}

{{/if}}
- {{em-input property="externalInvoiceNumber" label="External Invoice #" class="col-xs-3 external-invoice-no"}} - {{em-select label="Payment Profile" + {{em-input property="externalInvoiceNumber" label=(t 'billing.labels.external_invoice_number') class="col-xs-3 external-invoice-no"}} + {{em-select label=(t 'billing.labels.payment_profile') property="paymentProfile" content=pricingProfiles optionValuePath="selectObject" @@ -43,21 +43,21 @@

- Line Items + {{t 'labels.line_items'}} {{#if canAddCharge}} - + {{/if}}

- - - - - - + + + + + + {{#each model.lineItemsByCategory as |categoryGroup|}} @@ -97,7 +97,7 @@ @@ -106,13 +106,13 @@ - - - + + + @@ -148,7 +148,7 @@ @@ -158,7 +158,7 @@ {{/each}} @@ -170,7 +170,7 @@ {{/each}} @@ -181,7 +181,7 @@ @@ -189,7 +189,7 @@ @@ -202,7 +202,7 @@

- Remarks + {{t 'labels.remarks'}}

@@ -212,18 +212,18 @@

- Payments + {{t 'labels.payments'}} {{#if canAddPayment}} - + {{/if}}

DescriptionActual ChargesDiscountPhilHealthHMO/COMExcess{{t 'labels.description'}}{{t 'billing.labels.actual_charges'}}{{t 'labels.discount'}}{{t 'billing.labels.phil_health'}}{{t 'billing.labels.hmo_com'}}{{t 'labels.excess'}} {{t 'labels.action'}}
{{#if canAddCharge}} {{/if}}
{{t 'labels.name'}} {{t 'labels.quantity'}}PriceExpense ToTotal{{t 'labels.price'}}{{t 'labels.expense_to'}}{{t 'labels.total'}} {{#if canAddCharge}} {{/if}} {{#if canAddCharge}} {{/if}}
- Total {{categoryGroup.category}} + {{t 'labels.total'}} {{categoryGroup.category}} {{number-format categoryGroup.total}} {{number-format categoryGroup.discount}}
- Total + {{t 'labels.total'}} {{number-format model.total}} {{number-format model.discount}}
- Payments/Deposits + {{t 'billing.labels.payments_deposits'}} -{{number-format model.paidTotal}}
- Grand Total + {{t 'labels.grand'}} {{t 'labels.total'}} {{number-format model.remainingBalance}}
- - - + + + @@ -238,7 +238,7 @@ {{#if payment.canRemovePayment}} {{/if}} diff --git a/app/invoices/index/template.hbs b/app/invoices/index/template.hbs index ed91935ea1..ac2b5a1d3b 100644 --- a/app/invoices/index/template.hbs +++ b/app/invoices/index/template.hbs @@ -2,12 +2,12 @@ {{#if hasRecords}}
DateAmountType{{t 'labels.date'}}{{t 'labels.amount'}}{{t 'labels.type'}} {{t 'labels.notes'}} {{t 'labels.action'}}
- - - + + + - - + + {{#if showActions}} {{/if}} @@ -25,14 +25,14 @@ {{#if showActions}} {{#if canAddPayment}} {{/if}} {{#if canAdd}} - + {{/if}} {{#if canDelete}} - + {{/if}} {{/if}} {{/unless}} @@ -42,7 +42,7 @@
NumberBill DateStatus{{t 'labels.number'}}{{t 'labels.bill_date'}}{{t 'labels.status'}} {{t 'labels.patient'}}TotalBalance Due{{t 'labels.total'}}{{t 'labels.balance_due'}}{{t 'labels.actions'}}
{{else}}
-

No invoices found. Create an invoice?

+

{{t 'billing.alerts.no_invoice_found'}} {{t 'billing.buttons.create_invoice'}}

{{/if}} {{/item-listing}} diff --git a/app/invoices/payment/template.hbs b/app/invoices/payment/template.hbs index 990a6cddb9..082544d707 100644 --- a/app/invoices/payment/template.hbs +++ b/app/invoices/payment/template.hbs @@ -7,7 +7,7 @@ {{#em-form model=model submitButton=false }} {{#if model.isNew}} {{#if selectPatient}} - {{patient-typeahead property="patientTypeAhead" label="Patient" content=patientList selection=selectedPatient class="required payment-patient"}} + {{patient-typeahead property="patientTypeAhead" label=(t 'labels.patient') content=patientList selection=selectedPatient class="required payment-patient"}} {{else}}
@@ -15,9 +15,9 @@
{{/if}} {{/if}} - {{em-input property="amount" label="Amount" class="required payment-amount"}} - {{date-picker property="datePaid" label="Date Paid" maxDate="now" class="required"}} - {{select-or-typeahead property="expenseAccount" label="Credit To" list=expenseAccountList selection=model.expenseAccount }} - {{em-text property="notes" label="Notes"}} + {{em-input property="amount" label=(t 'labels.amount') class="required payment-amount"}} + {{date-picker property="datePaid" label=(t 'labels.date_paid') maxDate="now" class="required"}} + {{select-or-typeahead property="expenseAccount" label=(t 'labels.credit_to') list=expenseAccountList selection=model.expenseAccount }} + {{em-text property="notes" label=(t 'labels.notes')}} {{/em-form}} {{/modal-dialog}} diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index 76c46335b3..f0a9bbc001 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -281,7 +281,24 @@ export default { physician: 'Physician', assisting: 'Assisting', anesthesia: 'Anesthesia', - procedures: 'Procedures' + procedures: 'Procedures', + number: 'Number', + bill_date: 'Bill Date', + balance_due: 'Balance Due', + amount: 'Amount', + date_paid: 'Date Paid', + credit_to: 'Credit To', + invoice_id: 'Invoice ID', + line_items: 'Line Items', + discount: 'Discount', + excess: 'Excess', + price: 'Price', + total: 'Total', + expense_to: 'Expense To', + grand: 'Grand', + remarks: 'Remarks', + payments: 'Payments', + category: 'Category' }, messages: { no_items_found: 'No items found.', @@ -323,7 +340,9 @@ export default { new_item: '+ new item', new_request_plus: '+ new request', add_visit: 'Add Visit', - search: 'Search' + search: 'Search', + edit: 'Edit', + add_line_item: 'Add Line Item' }, login: { messages: { @@ -656,5 +675,22 @@ export default { please_select_a_visit: 'Please select a visit', note_label: 'Note' } + }, + billing: { + alerts: { + no_invoice_found: 'No invoices found', + delete_invoice: 'Are you sure you wish to delete {{invoice_number}}?' + }, + buttons: { + create_invoice: 'Create an invoice?' + }, + labels: { + external_invoice_number: 'External Invoice #', + payment_profile: 'Payment Profile', + actual_charges: 'Actual Charges', + phil_health: 'PhilHealth', + hmo_com: 'HMO/COM', + payments_deposits: 'Payments/Deposits' + } } }; From ca941e29b3e0e002ba472bf4c57c395501e396d1 Mon Sep 17 00:00:00 2001 From: Mitch Ellis Date: Thu, 26 May 2016 22:22:33 +0800 Subject: [PATCH 2/3] [TRANSLATION] Billing Pricing Routes Translated --- app/locales/en/translations.js | 17 +++++++++++++---- app/pricing/delete/template.hbs | 2 +- app/pricing/edit/template.hbs | 20 ++++++++++---------- app/pricing/index/template.hbs | 12 ++++++------ app/pricing/override/template.hbs | 4 ++-- app/pricing/profiles/template.hbs | 8 ++++---- app/pricing/search/template.hbs | 4 ++-- 7 files changed, 38 insertions(+), 29 deletions(-) diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index f0a9bbc001..199c3bc5d2 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -298,7 +298,8 @@ export default { grand: 'Grand', remarks: 'Remarks', payments: 'Payments', - category: 'Category' + category: 'Category', + department: 'Department' }, messages: { no_items_found: 'No items found.', @@ -420,6 +421,7 @@ export default { name: 'Name', mark_as_consumed: 'Mark as Consumed', new_item: 'New Item', + all_items: 'All Items', original_quantity: 'Original Quantity', print: 'Print', print_barcode: 'Print Barcode', @@ -679,10 +681,13 @@ export default { billing: { alerts: { no_invoice_found: 'No invoices found', - delete_invoice: 'Are you sure you wish to delete {{invoice_number}}?' + delete_item: 'Are you sure you wish to delete {{item}}?', + no_pricing_items: 'No pricing items found.', + no_pricing_profiles: 'No pricing profiles found.' }, buttons: { - create_invoice: 'Create an invoice?' + create_invoice: 'Create an invoice?', + add_override: 'Add Override' }, labels: { external_invoice_number: 'External Invoice #', @@ -690,7 +695,11 @@ export default { actual_charges: 'Actual Charges', phil_health: 'PhilHealth', hmo_com: 'HMO/COM', - payments_deposits: 'Payments/Deposits' + payments_deposits: 'Payments/Deposits', + pricing_panel_overrides: 'Pricing profile overrides', + pricing_profile: 'Pricing Profile', + discount_amount: 'Discount Amount', + discount_percentage: 'Discount Percentage' } } }; diff --git a/app/pricing/delete/template.hbs b/app/pricing/delete/template.hbs index 0eb27f7c05..e4ebbd77e6 100644 --- a/app/pricing/delete/template.hbs +++ b/app/pricing/delete/template.hbs @@ -5,6 +5,6 @@ updateButtonText=updateButtonText }}
- Are you sure you wish to delete {{model.name}}? + {{t 'billing.alerts.delete_item' item=model.name}}
{{/modal-dialog}} diff --git a/app/pricing/edit/template.hbs b/app/pricing/edit/template.hbs index bb16f303c7..f19d76c2ee 100644 --- a/app/pricing/edit/template.hbs +++ b/app/pricing/edit/template.hbs @@ -1,22 +1,22 @@ {{#edit-panel editPanelProps=editPanelProps}} {{#em-form model=model submitButton=false }} - {{em-input label="Name" property="name" class="required price-name"}} + {{em-input label=(t 'labels.name') property="name" class="required price-name"}}
- {{em-input label="Price" property="price" class="required col-xs-2 price-amount"}} - {{select-or-typeahead property="expenseAccount" label="Department" list=expenseAccountList selection=model.expenseAccount className="col-xs-4 price-department"}} + {{em-input label=(t 'labels.price') property="price" class="required col-xs-2 price-amount"}} + {{select-or-typeahead property="expenseAccount" label=(t 'labels.department') list=expenseAccountList selection=model.expenseAccount className="col-xs-4 price-department"}}
- {{em-select label="Category" class="required col-xs-4 price-category" + {{em-select label=(t 'labels.category') class="required col-xs-4 price-category" property="category" content=categories selected=model.category }} - {{select-or-typeahead property="pricingType" label="Type" list=pricingTypes selection=model.pricingType className="col-xs-4 price-type" prompt=" "}} + {{select-or-typeahead property="pricingType" label=(t 'labels.type') list=pricingTypes selection=model.pricingType className="col-xs-4 price-type" prompt=" "}}

- Pricing profile overrides + {{t 'billing.labels.pricing_panel_overrides'}} {{#if showUpdateButton}} - + {{/if}}

@@ -24,8 +24,8 @@ - - + + {{#if showUpdateButton}} {{/if}} @@ -38,7 +38,7 @@ {{#if showUpdateButton}} {{/if}} diff --git a/app/pricing/index/template.hbs b/app/pricing/index/template.hbs index 110ca580cb..0efce3cb69 100644 --- a/app/pricing/index/template.hbs +++ b/app/pricing/index/template.hbs @@ -3,12 +3,12 @@
Pricing ProfilePrice{{t 'billing.labels.pricing_profile'}}{{t 'labels.price'}}{{t 'labels.actions'}}
{{#if showCategory}} - + {{/if}} - - - + + + {{#if showActions}} {{/if}} @@ -29,7 +29,7 @@ {{/if}} {{#if canDelete}} {{/if}} @@ -39,7 +39,7 @@
Category{{t 'labels.category'}}{{t 'labels.name'}}PriceTypeExpense To{{t 'labels.price'}}{{t 'labels.type'}}{{t 'labels.expense_to'}}{{t 'labels.actions'}}
{{else}}
-

No pricing items found. {{#if canAdd}}Create a new record?{{/if}}

+

{{t 'billing.alerts.no_pricing_items'}} {{#if canAdd}}{{t 'messages.create_new_record'}}{{/if}}

{{/if}} {{/item-listing}} diff --git a/app/pricing/override/template.hbs b/app/pricing/override/template.hbs index 74349a0fb4..df3da7ffce 100644 --- a/app/pricing/override/template.hbs +++ b/app/pricing/override/template.hbs @@ -4,7 +4,7 @@ updateButtonAction=updateButtonAction updateButtonText=updateButtonText }} {{#em-form model=model submitButton=false}} - {{em-select label="Pricing Profile" + {{em-select label=(t 'billing.labels.pricing_profile') property="profile" content=pricingProfiles optionValuePath="selectObject" @@ -12,6 +12,6 @@ class="required pricing-profile" prompt=" " }} - {{em-input label="Price" property="price" class="required pricing-override-price"}} + {{em-input label=(t 'labels.price') property="price" class="required pricing-override-price"}} {{/em-form}} {{/modal-dialog}} diff --git a/app/pricing/profiles/template.hbs b/app/pricing/profiles/template.hbs index 627ea6e1ef..edf71c33b7 100644 --- a/app/pricing/profiles/template.hbs +++ b/app/pricing/profiles/template.hbs @@ -3,8 +3,8 @@ - - + + {{#if showActions}} {{/if}} @@ -20,7 +20,7 @@ {{/if}} {{#if canDelete}} - + {{/if}} {{/if}} @@ -29,7 +29,7 @@
{{t 'labels.name'}}Discount AmountDiscount Percentage{{t 'billing.labels.discount_amount'}}{{t 'billing.labels.discount_percentage'}}{{t 'labels.actions'}}
{{else}}
-

No pricing profiles found. {{#if canAdd}}Create a new record?{{/if}}

+

{{t 'billing.alerts.no_pricing_profiles'}}. {{#if canAdd}}{{t 'messages.create_new_record'}}{{/if}}

{{/if}} {{/item-listing}} diff --git a/app/pricing/search/template.hbs b/app/pricing/search/template.hbs index 10f520f907..ef71ae6434 100644 --- a/app/pricing/search/template.hbs +++ b/app/pricing/search/template.hbs @@ -1,3 +1,3 @@ -{{#search-listing newButtonText="New Item" allButtonText="All Items"}} +{{#search-listing newButtonText=(t 'labels.new_item') allButtonText=(t 'labels.all_items')}} {{partial 'pricing/index'}} -{{/search-listing}} \ No newline at end of file +{{/search-listing}} From a9225005f3c42cb438949390fba430710eec26ee Mon Sep 17 00:00:00 2001 From: billybonks Date: Sat, 18 Jun 2016 14:13:30 +0200 Subject: [PATCH 3/3] update test --- tests/acceptance/invoices-test.js | 2 +- tests/acceptance/pricing-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/invoices-test.js b/tests/acceptance/invoices-test.js index 8111382a28..84a6a58bcd 100644 --- a/tests/acceptance/invoices-test.js +++ b/tests/acceptance/invoices-test.js @@ -61,7 +61,7 @@ test('delete invoice', function(assert) { waitToAppear('.modal-dialog'); }); andThen(() => { - assert.equal(find('.alert').text().trim(), 'Are you sure you wish to delete inv00001?', 'Invoice deletion confirm displays'); + assert.equal(find('.alert').text().trim(), 'Are you sure you wish to delete inv00001?', 'Invoice deletion confirm displays'); }); click('button:contains(Delete):last'); waitToDisappear('.invoice-number:contains(inv00001)'); diff --git a/tests/acceptance/pricing-test.js b/tests/acceptance/pricing-test.js index 9765e5d96d..16889374a8 100644 --- a/tests/acceptance/pricing-test.js +++ b/tests/acceptance/pricing-test.js @@ -136,7 +136,7 @@ test('delete price', function(assert) { }); waitToAppear('.modal-dialog'); andThen(() => { - assert.equal(find('.alert').text().trim(), 'Are you sure you wish to delete Blood test?', 'Pricing item is displayed for deletion'); + assert.equal(find('.alert').text().trim(), 'Are you sure you wish to delete Blood test?', 'Pricing item is displayed for deletion'); }); click('button:contains(Delete):last'); waitToDisappear('.price-name:contains(Blood test)');