Bug 34834: Add translation context for "Order"

This patch adds context for translation to the term "Order". It is
sometimes used as a verb (e.g. to order) and sometimes as a noun (e.g.
an order).

To test:
1. Go to the various pages and make sure Order appears correctly in
   English

   -  orderreceive: when receiving multiple orders, the table heading
   -  parcel: when receiving an order, there is a "View" menu with
      "Order", "MARC", and "Card"
   -  z3950_search: when adding an order from an external source, if
      you hover the mouse on the Order option, there is a thing that
      opens (a tooltip?) with the word "Order"

2. Apply patch

3. Redo step 1 in English, make sure the pages still work

4. Update the translation files

   gulp po:update --lang fr-CA

5. View the messages.po file and make sure the term is translated for
   both verb and noun context (you can put anything, just something
   different to tell them apart)

6. View the pages in the other language, the terms should be

   -  orderreceive: noun
   -  parcel: noun
   -  z3950_search: verb

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Caroline Cyr La Rose 2023-09-20 10:24:02 -04:00 committed by Tomas Cohen Arazi
parent 05f33b4fcb
commit 76b0dbc8a0
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 3 additions and 3 deletions

View file

@ -108,7 +108,7 @@
<table id="multiple_orders" class="table table-bordered table-striped"> <table id="multiple_orders" class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th>Order</th> <th>[% tp('noun', 'Order') | html %]</th>
<th>Title</th> <th>Title</th>
<th>Author</th> <th>Author</th>
<th>ISBN</th> <th>ISBN</th>

View file

@ -532,7 +532,7 @@
result += ' <span class="caret"></span> '; result += ' <span class="caret"></span> ';
result += '</button>'; result += '</button>';
result += '<ul class="dropdown-menu" aria-labelledby="view' + row.order_id + '">'; result += '<ul class="dropdown-menu" aria-labelledby="view' + row.order_id + '">';
result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _("Order") + '</a></li>'; result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">[% tp("noun", "Order") | html %]</a></li>';
result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a></li>'; result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a></li>';
result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a></li>'; result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a></li>';
result += '</ul>'; result += '</ul>';

View file

@ -218,7 +218,7 @@ tr.selected td {
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]"> <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]">
<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData" data-action="show_marc"><i class="fa-solid fa-eye"></i> MARC</a></li> <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData" data-action="show_marc"><i class="fa-solid fa-eye"></i> MARC</a></li>
<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData" data-action="show_card"><i class="fa-solid fa-eye"></i> Card</a></li> <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData" data-action="show_card"><i class="fa-solid fa-eye"></i> Card</a></li>
<li><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]" class="chosen" title="Order" data-action="order"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li> <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]" class="chosen" title="[% tp('verb', 'Order') | html %]" data-action="order"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li>
</ul> </ul>
</div> </div>
</td> </td>