Browse Source

Bug 21715: Ease translation of account and account offset type descriptions

This patch moves accounts-related descriptions into a single file to
ease finding them, and also encloses descriptions inside <span> tags to
make it easier to translate.

To test:
- Apply this patch
- Verify the templates work as expected
=> SUCCESS: No behaviour change
- Sign off :-D

Bonus: there were two cases in which the INCLUDE line used 'accountline'
as parameter, making it fail to pick the right account type!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Tomás Cohen Arazi 4 years ago
committed by Nick Clemens
parent
commit
9670becc16
  1. 10
      koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc
  2. 39
      koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
  3. 24
      koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc
  4. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt
  5. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
  6. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
  7. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
  8. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt

10
koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc

@ -1,10 +0,0 @@
[% SWITCH account_offset.type %]
[% CASE 'Credit Applied' %]Credit applied
[% CASE 'Payment' %]Payment
[% CASE 'Manual Credit' %]Manual credit
[% CASE 'Manual Debit' %]Manual invoice
[% CASE 'Lost Item' %]Lost item returned
[% CASE 'Writeoff' %]Writeoff
[% CASE 'Void Payment' %]Void payment
[% CASE %][% account_offset.type | html %]
[%- END -%]

39
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

@ -0,0 +1,39 @@
[%- BLOCK account_type_description -%]
[%- SWITCH account.accounttype -%]
[%- CASE 'Pay' -%]<span>Payment, thanks</span>
[%- CASE 'Pay00' -%]<span>Payment, thanks (cash via SIP2)</span>
[%- CASE 'Pay01' -%]<span>Payment, thanks (VISA via SIP2)</span>
[%- CASE 'Pay02' -%]<span>Payment, thanks (credit card via SIP2)</span>
[%- CASE 'VOID' -%]<span>Voided</span>
[%- CASE 'N' -%]<span>New card</span>
[%- CASE 'F' -%]<span>Fine</span>
[%- CASE 'A' -%]<span>Account management fee</span>
[%- CASE 'M' -%]<span>Sundry</span>
[%- CASE 'L' -%]<span>Lost item</span>
[%- CASE 'W' -%]<span>Writeoff</span>
[%- CASE 'FU' -%]<span>Accruing fine</span>
[%- CASE 'HE' -%]<span>Hold waiting too long</span>
[%- CASE 'Rent' -%]<span>Rental fee</span>
[%- CASE 'FOR' -%]<span>Forgiven</span>
[%- CASE 'LR' -%]<span>Lost item fee refund</span>
[%- CASE 'PF' -%]<span>Processing fee</span>
[%- CASE 'PAY' -%]<span>Payment</span>
[%- CASE 'WO' -%]<span>Writeoff</span>
[%- CASE 'C' -%]<span>Credit</span>
[%- CASE 'CR' -%]<span>Credit</span>
[%- CASE -%][% account.accounttype | html %]
[%- END -%]
[%- END -%]
[%- BLOCK offset_type_description -%]
[%- SWITCH account_offset.type -%]
[%- CASE 'Credit Applied' -%]<span>Credit applied</span>
[%- CASE 'Payment' -%]<span>Payment</span>
[%- CASE 'Manual Credit' -%]<span>Manual credit</span>
[%- CASE 'Manual Debit' -%]<span>Manual invoice</span>
[%- CASE 'Lost Item' -%]<span>Lost item returned</span>
[%- CASE 'Writeoff' -%]<span>Writeoff</span>
[%- CASE 'Void Payment' -%]<span>Void payment</span>
[%- CASE -%][% account_offset.type | html %]
[%- END -%]
[%- END -%]

24
koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc

@ -1,24 +0,0 @@
[% SWITCH account.accounttype %]
[% CASE 'Pay' %]Payment, thanks
[% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
[% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
[% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
[% CASE 'VOID' %]Voided
[% CASE 'N' %]New card
[% CASE 'F' %]Fine
[% CASE 'A' %]Account management fee
[% CASE 'M' %]Sundry
[% CASE 'L' %]Lost item
[% CASE 'W' %]Writeoff
[% CASE 'FU' %]Accruing fine
[% CASE 'HE' %]Hold waiting too long
[% CASE 'Rent' %]Rental fee
[% CASE 'FOR' %]Forgiven
[% CASE 'LR' %]Lost item fee refund
[% CASE 'PF' %]Processing fee
[% CASE 'PAY' %]Payment
[% CASE 'WO' %]Writeoff
[% CASE 'C' %]Credit
[% CASE 'CR' %]Credit
[% CASE %][% account.accounttype | html %]
[%- END -%]

8
koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt

@ -3,6 +3,8 @@
[%- USE AuthorisedValues -%]
[%- USE Branches -%]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -41,7 +43,7 @@
<span title="[% accountline.date | html %]">[% accountline.date |$KohaDates %]</span>
</td>
<td>
[%- INCLUDE 'accounttype.inc' account => accountline -%]
[%- PROCESS account_type_description account=accountline -%]
[%- IF accountline.payment_type -%]
, [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %]
[%- END =%]
@ -109,12 +111,12 @@
<td>[% offset_accountline.timestamp | $KohaDates with_hours => 1 | html %]</td>
<td>[% offset_accountline.amount | $Price %]</td>
<td>[% offset_accountline.amountoutstanding | $Price %]</td>
<td>[% INCLUDE 'accounttype.inc' account => offset_accountline %]</td>
<td>[% PROCESS account_type_description account=offset_accountline %]</td>
<td>[% offset_accountline.note | html %]</td>
<td>[% IF offset_accountline.manager_id %]<a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | uri %]">[% offset_accountline.manager_id | html %]</a>[% END %]</td>
<td>[% ao.created_on | $KohaDates with_hours => 1 | html %]</td>
<td>[% ao.amount | $Price %]</td>
<td>[% INCLUDE 'account_offset_type.inc' account_offset => ao %]</td>
<td>[% PROCESS offset_type_description account_offset=ao %]</td>
<td><a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a></td>
</tr>
[% END %]

5
koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt

@ -8,6 +8,9 @@
[% USE Price %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -57,7 +60,7 @@
<tr>
<td><span title="[% account.date | html %]">[% account.date |$KohaDates %]</span></td>
<td>
[% INCLUDE 'accounttype.inc' accountline => account %]
[% PROCESS account_type_description account=account %]
[%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
[%- IF account.description %], [% account.description | html %][% END %]
&nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&amp;itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td>

5
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt

@ -3,6 +3,9 @@
[% USE KohaDates %]
[% USE Price %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Summary for [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -109,7 +112,7 @@
<tr>
<td>[% account.date | $KohaDates %]</td>
<td>
[% INCLUDE 'accounttype.inc' accountline => account %]
[% PROCESS account_type_description account=account %]
[%- IF account.payment_type %]
, [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %]
[% END %]

5
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt

@ -5,6 +5,9 @@
[% USE Branches %]
[% USE Price %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Print receipt for [% patron.cardnumber | html %]</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -51,7 +54,7 @@
<tr class="highlight">
<td>[% account.date | $KohaDates %]</td>
<td>
[% INCLUDE 'accounttype.inc' account => account %]
[% PROCESS account_type_description account=account %]
[%- IF account.description %], [% account.description | html %][% END %]
</td>
<td>[% account.note | html %]</td>

5
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt

@ -5,6 +5,9 @@
[% USE KohaDates %]
[% USE Price %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Print receipt for [% patron.cardnumber | html %]</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -51,7 +54,7 @@
<tr class="highlight">
<td>[% account.date | $KohaDates%]</td>
<td>
[% INCLUDE 'accounttype.inc' account => account %]
[% PROCESS account_type_description account=account %]
[%- IF account.description %], [% account.description | html %][% END %]
</td>
<td>[% account.note | html %]</td>

Loading…
Cancel
Save