Untranslatable Last Billing Type values

Bug #1773191 reported by Eva Cerninakova
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

Untranslatable Last Billing Types and Transaction Types values

The Last Billing Type values (like Overdue Materials, Lost Materials etc.) and Transaction Type values (grocery, circulation) are not translated.
I went through Launchpad translation templates and found Overdue Materials or Lost materials in db.seed. and Grocery in lang.dtd.

This bug is complication for "non-English" countries because the problem concerns (except the web staff client interface) also the printed payment receipts.

Revision history for this message
Eva Cerninakova (ece) wrote :
Revision history for this message
Eva Cerninakova (ece) wrote :

Also "Payment Type" values (like credit_payment, cash_payment...) in the patron payment history interface are untranslated. However, in this case I don´t think those values have ever been available for translation.

Revision history for this message
Eva Cerninakova (ece) wrote :

Confirmed in 3.1.3
I have added the “webstaffblocker” tag. This one is an obstacle to using the web client in production for the non-English speaking users. As another "localization webstaffblockers" the bug is critical for circulating staff who must quickly respond to various difficult situations in contact with patrons.

tags: added: webstaffblocker
Revision history for this message
Remington Steed (rjs7) wrote :

One complication with "Last Billing Type" is that those values are stored as text in money.materialized_billable_xact_summary. So while the normal translation process might apply to the values in config.billing_type, it probably doesn't apply to the money table.

Revision history for this message
Bill Erickson (berick) wrote :

Last Billing Type strings are multiple layers of un-translatable. Many originate in the code and then, as Remington points out, they are stamped as plain text on the transaction summary with no option for run-time translation.

Perhaps we should add a last_billing_btype column to money.materialized_billable_xact_summary to track the ID of the config.billing_type row so it can be translated in real time? Alternatively, the client could fetch the most recent billing and extract the label from there.

Transaction Type values are essentially codes and were never intended for UI display. They'll need in-template translations.

Revision history for this message
Mike Rylander (mrylander) wrote :

Bill,

I think adding the btype column (and attendant IDL change) is probably the simplest and most flexible thing we can do. Branch forthcoming for (at least) the infrastructure bits.

Revision history for this message
Mike Rylander (mrylander) wrote :

I've pushed the db+IDL changes I think will be required to a WIP collab branch available at:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/miker/lp-1773191-WIP-materialize-btype

I may not be able to get back to this today, but hopefully it's a jumping off point...

Revision history for this message
Mike Rylander (mrylander) wrote :

I've pushed some more commits that improve the upgrade script and make use of the newly linked mbts.last_btype field. Still WIP, but the more eyes the merrier.

Revision history for this message
Eva Cerninakova (ece) wrote :

I am not sure what is the state of the issue. However, in 3.3.2 in the patron billing interface grids and in the print templates the values of billing and payment types and the transaction types are still untranslated, see the attachment.

Nevertheless, for the print templates, we use quite easy solution. In the customized print templates, we have changed the value of English strings to Czech strings using ng-switch, e.g.:
      <div ng-switch="payment_type">
        <div ng-switch-when="cash_payment">[% l('Cash') %]</div>
        <div ng-switch-when="check_payment">[% l('Check') %]</div>
        <div ng-switch-when="credit_card_payment">[% l('Credit Card') %]</div>
        <div ng-switch-when="credit_payment">[% l('Patron Credit') %]</div>
        <div ng-switch-when="work_payment">[% l('Work') %]</div>
        <div ng-switch-when="forgive_payment">[% l('Forgive') %]</div>
        <div ng-switch-when="goods_payment">[% l('Goods') %]</div>
      </div>

Revision history for this message
Chris Sharp (chrissharp123) wrote :

Mike,

Testing your branch, I get caught installing the DB with the following errors:

psql:080.schema.money.sql:222: ERROR: aggregate functions are not allowed in GROUP BY
LINE 36: COALESCE(SUM(debit.amount),0) - COALESCE(SUM(credit.amount...
                    ^
psql:080.schema.money.sql:263: ERROR: syntax error at or near "last"
LINE 25: last(billing.btype) AS btype

I haven't done any troubleshooting of the first error yet, but the second error appears to be a missing comma.

Revision history for this message
Chris Sharp (chrissharp123) wrote :
Revision history for this message
Linda Jansova (skolkova-s) wrote :

Chris, does it seem okay after you have done some more tests?

Although we (me and Eva Cerninakova) can agree with the removal of the webstaffblocker tag (discussed yesterday on the open-ils-dev mailing list), it would significantly improve both staff and user experience if the translations were applied :-).

Dan Wells (dbw2)
tags: removed: webstaffblocker
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
tags: added: billing
removed: webstaffclient
tags: added: circ-billing
removed: billing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.