From 923aab2774a51741aab6c056255d84fd1f556f03 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose 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 Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- 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 8ce6f1658b..ef0f43d8d5 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 @@ -395,7 +397,7 @@ No. - Order + [% tp('noun', 'Order') | html %] RRP tax exc. Actual cost tax exc. ecost tax exc. @@ -590,7 +592,7 @@ No. - Order + [% tp('noun', 'Order') | html %] 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..6c04b2ac99 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') | html %] [% 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..3e14e75775 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') | html %] [% 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..4286e382e9 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') | html %] [% ELSE %] - Order + [% tp('verb', 'Order') | html %] [% 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..f5169b0696 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') | html %] 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..dde19d60a9 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') | html %]</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') | html %]</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..1c6c7510b6 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') | html %] 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..df3b1cf0bc 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 @@
  • From vendor: [% booksellerfromname | html %]
  • Basket: [% basketfromname | html %]
  • -
  • Order: [% ordernumber | html %]
  • +
  • [% tp('noun', 'Order') | html %]: [% ordernumber | html %]
[% 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..eb3fdeb1d9 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..3fe1674949 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.39.5
Order[% tp('noun', 'Order') | html %] Summary  
BasketOrder[% tp('noun', 'Order') | html %] 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') | html %]