Bugzilla – Attachment 81651 Details for
Bug 21715
Ease translation of account and account offset type descriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21715: Ease translation of account and account offset type descriptions
Bug-21715-Ease-translation-of-account-and-account-.patch (text/plain), 12.47 KB, created by
Katrin Fischer
on 2018-10-31 07:15:57 UTC
(
hide
)
Description:
Bug 21715: Ease translation of account and account offset type descriptions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-31 07:15:57 UTC
Size:
12.47 KB
patch
obsolete
>From 1d558a85bfe0463178cc36e2cc6995d816de69d9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 29 Oct 2018 12:15:19 -0300 >Subject: [PATCH] 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> >--- > .../prog/en/includes/account_offset_type.inc | 10 ------ > .../intranet-tmpl/prog/en/includes/accounts.inc | 39 ++++++++++++++++++++++ > .../intranet-tmpl/prog/en/includes/accounttype.inc | 24 ------------- > .../prog/en/modules/members/accountline-details.tt | 8 +++-- > .../prog/en/modules/members/boraccount.tt | 5 ++- > .../prog/en/modules/members/moremember-print.tt | 5 ++- > .../prog/en/modules/members/printfeercpt.tt | 5 ++- > .../prog/en/modules/members/printinvoice.tt | 5 ++- > 8 files changed, 60 insertions(+), 41 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc >deleted file mode 100644 >index 94edb239f4..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc >+++ /dev/null >@@ -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 -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >new file mode 100644 >index 0000000000..cf388239fb >--- /dev/null >+++ b/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 -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc >deleted file mode 100644 >index 0d30f65356..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc >+++ /dev/null >@@ -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 -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt >index dc5ad32a74..ae66f7ed52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt >+++ b/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 › Patrons › 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 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index 44015bb14c..a36954021d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/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 › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -61,7 +64,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 %] > [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >index 9deff583ef..3df5ab4ee5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >+++ b/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 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >index 74fbc2559c..45d6eda698 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >+++ b/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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >index 33ae62cfdf..a28ac03e34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >+++ b/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> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21715
:
81519
|
81524
|
81544
| 81651