From 1ffc07528692ada56a2021663d0ca2337adc330a Mon Sep 17 00:00:00 2001 From: caroline Date: Wed, 6 Nov 2019 18:24:13 -0500 Subject: [PATCH] Bug 23983: Contextualization of 'Order' (verb) vs 'Order' (noun) This patch adds context (word class, either verb or noun) to the word 'Order' when it is displayed alone in the acquisitions module. The following files have been modified: basket.tt neworderbiblio.tt newordersubscription.tt newordersuggestion.tt ordered.tt parcel.tt spent.tt transferorder.tt uncertainprice.tt z3950_search.tt To test, check all those pages in English to make sure there is no change. 1- Go to Acquisitions 2- Create a basket 3- Add to basket from an existing record (neworderbiblio) 4- Add to basket from a subscription (newordersubscription) 5- Add to basket from a suggestion (newordersuggestion) 6- Add to basket from an external source (z3950_search) 7- In one of the orders, check the uncertain price box 8- Check the basket display table (basket) 9- Click transfer on one of the orders (transferorder) 10- Go to the vendor page and click on 'Uncertain prices' (uncertainprice) 11- Click on 'Receive parcel' (parcel) 12- Go to the Acquisitions home page and click on the amount for 'ordered' (ordered) 13- Go to the Acquisitions home page and click on the amount for 'spent' (spent) Next, install a new language (fr-CA used as example) 1- translate create fr-CA 2- open fr-CA-messages.po and add a translation for Order (verb) and Order (noun) (it doesn't have to be real, just write something different for each) 3- translate install fr-CA 4- in the system preferences, enable the french language in 'language' 5- change interface language to french Redo the tests above to make sure the word you put in the translation for the verb is in the places where 'Order' should be a verb and that the translation you put in for the noun is in the places where 'Order' should be a noun --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 6 ++++-- .../intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt | 4 +++- .../prog/en/modules/acqui/newordersubscription.tt | 4 +++- .../prog/en/modules/acqui/newordersuggestion.tt | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 4 +++- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 4 +++- .../intranet-tmpl/prog/en/modules/acqui/transferorder.tt | 6 ++++-- .../intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt | 4 +++- .../intranet-tmpl/prog/en/modules/acqui/z3950_search.tt | 6 ++++-- 10 files changed, 35 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 379b974eb7..fab69b08e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1,5 +1,7 @@ [% USE raw %] [% USE Asset %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% BLOCK csv_export %]
Export as CSV @@ -393,7 +395,7 @@ No. - Order + [% tp('noun', 'Order') %] RRP tax exc. Actual cost tax exc. ecost tax exc. @@ -588,7 +590,7 @@ No. - Order + [% tp('noun', 'Order') %] RRP tax exc. ecost tax exc. RRP tax inc. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt index 7cd031cdf7..58562bdbaf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt @@ -1,5 +1,7 @@ [% USE raw %] [% USE Asset %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Search existing records @@ -68,7 +70,7 @@ View MARC - Order + [% tp('verb', 'Order') %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index fbb4d21e65..d4443aecfd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -3,6 +3,8 @@ [% USE KohaDates %] [% USE Branches %] [% USE Koha %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials [% biblionumber | html %] @@ -73,7 +75,7 @@ [% END %] [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %] - Order + [% tp('verb', 'Order') %] [% ELSE %] Cannot be ordered diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt index cad0dd26e0..6f6ba03f67 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -2,6 +2,8 @@ [% USE Branches %] [% USE Price %] [% USE Asset %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Add order from a suggestion @@ -78,9 +80,9 @@ [% IF ( suggestions_loo.biblionumber ) %] - Order + [% tp('verb', 'Order') %] [% ELSE %] - Order + [% tp('verb', 'Order') %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index fb6c98e851..2cbe13d4f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -3,6 +3,8 @@ [% USE KohaDates %] [% USE ItemTypes %] [% USE Price %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Ordered @@ -27,7 +29,7 @@ Title - Order + [% tp('noun', 'Order') %] Vendor Item types Left on order diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 29d5edb8ac..1016a60760 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -4,6 +4,8 @@ [% USE KohaDates %] [% USE Price %] [% USE currency = format('%.2f') -%] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( date ) %] @@ -165,7 +167,7 @@ [% END %] </td> <td> - <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% loop_order.ordernumber | uri %]" class="previewData">Order</a><br> + <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% loop_order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') %]</a><br> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber | uri %]" class="previewData">MARC</a><br> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber | uri %]" class="previewData">Card</a> </td> @@ -329,7 +331,7 @@ [% END %] </td> <td> - <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">Order</a><br> + <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') %]</a><br> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | uri %]" class="previewData">MARC</a><br> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber | uri %]" class="previewData">Card</a> </td> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt index 60dee0f22e..f52bcac7bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -3,6 +3,8 @@ [% USE KohaDates %] [% USE ItemTypes %] [% USE Price %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] <title>Koha › Acquisitions › Spent @@ -27,7 +29,7 @@ Title - Order + [% tp('noun', 'Order') %] Vendor Invoice Item types diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt index d4142cadfb..d73e703405 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -1,3 +1,5 @@ +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Transfer order @@ -13,7 +15,7 @@
[% ELSE %] @@ -65,7 +67,7 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index de3bd54d20..a9646189e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -1,6 +1,8 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername | html %][% ELSE %]Orders with uncertain prices[% END %] @@ -77,7 +79,7 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index 8df3b5c5a7..bf5b13a783 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -1,5 +1,7 @@ [% USE raw %] [% USE Asset %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source › Search results[% END %] @@ -115,7 +117,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% IF ( breeding_loo.breedingid ) %] - + @@ -143,7 +145,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : - + [% END %] [% END %] -- 2.17.1
Order[% tp('noun', 'Order') %] Summary  
BasketOrder[% tp('noun', 'Order') %] By Uncertain Price
[% breeding_loo.server | html %] [% breeding_loo.server | html %] [% breeding_loo.title | html %] [% breeding_loo.author | html %] [% breeding_loo.isbn | html %] Order [% tp('verb', 'Order') %]