Bug 34081: Contextualization of "Approved" (one term) vs "Approved" (more than one term), and other tag statuses

To test:

1. Apply patch

2. Install language

   ./misc/translator/translate install xx-XX

3. Update po files

   ./misc/translator/translate update xx-XX

4. View the xx-XX-messages.po file

   --> Strings for tag statuses for one tag should be separated from
       strings for statuses for multiple tags, with context Tags
       (single) or Tags (multiple)

5. Change the strings so you know which is which

   For example, in French, the approved status for a single tag would
   be "Approuvé" and for multiple tags would be "Approuvés" (with the
   plural s at the end)

6. Apply translations

   ./misc/translator/translate install xx-XX

7. Add tags through the OPAC
   7.1. In another tab, go to the OPAC
   7.2. Log in
   7.3. Search for a record
   7.4. From the detailed record, click Add tags
   7.5. Enter a tag and click Add

8. In the staff interface, go to Tools > Tags

9. Approve/Reject the tag
   --> The status in the table and on the button should be the singular
       status, the status in the summary on the right should be plural

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Caroline Cyr La Rose 2023-06-21 12:27:12 -04:00 committed by Tomas Cohen Arazi
parent 9254af7b41
commit 5d23be933f
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -1,6 +1,7 @@
[% USE raw %]
[% USE Asset %]
[% USE KohaDates %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( do_it ) %]Review[% ELSE %]Review tags[% END %] &rsaquo; Tags &rsaquo; Tools &rsaquo; Koha</title>
@ -110,15 +111,15 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
<td>
[% IF ( tagloo.approved == -1 ) %]
<label for="checkbox[% offset + loop.count | html %]">
<span class="rejected status[% offset + loop.count | html %]">Rejected</span>
<span class="rejected status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Rejected') | html %]</span>
</label>
[% ELSIF ( tagloo.approved == 1 ) %]
<label for="checkbox[% offset + loop.count | html %]">
<span class="approved status[% offset + loop.count | html %]">Approved</span>
<span class="approved status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Approved') | html %]</span>
</label>
[% ELSE %]
<label for="checkbox[% offset + loop.count | html %]">
<span class="pending status[% offset + loop.count | html %]">Pending</span>
<span class="pending status[% offset + loop.count | html %]">[% tp('Tags (single)', 'Pending') | html %]</span>
</label>
[% END %]
</td>
@ -130,9 +131,9 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
<td class="actions"><span class="ajax_buttons" style="visibility:hidden">
[% IF ( tagloo.approved == -1 ) %]
<button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs" type="submit" title="[% tagloo.term | html %]" value="Approve" name="approve"><i class="fa fa-check"></i> Approve</button>
<button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Rejected" name="reject"><i class="fa fa-times"></i> Rejected</button>
<button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Rejected" name="reject"><i class="fa fa-times"></i> [% tp('Tags (single)', 'Rejected') | html %]</button>
[% ELSE %]
<button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs" disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Approved" name="approve"><i class="fa fa-check"></i> Approved</button>
<button data-num="[% offset + loop.count | html %]" class="approval_btn ok btn btn-default btn-xs" disabled="disabled" type="submit" title="[% tagloo.term | html %]" value="Approved" name="approve"><i class="fa fa-check"></i> [% tp('Tags (single)', 'Approved') | html %]</button>
<button data-num="[% offset + loop.count | html %]" class="approval_btn rej btn btn-default btn-xs" type="submit" title="[% tagloo.term | html %]" value="Reject" name="reject"><i class="fa fa-times"></i> Reject</button>
[% END %]
</span>
@ -167,13 +168,13 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
<fieldset class="brief">
<h4>Terms summary</h4>
<ul>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>:
<li><a href="/cgi-bin/koha/tags/review.pl?approved=1">[% tp('Tags (multiple)', 'Approved') | html %]</a>:
<span id="terms_summary_approved_count">[% approved_count | html %]</span>
</li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>:
<li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">[% tp('Tags (multiple)', 'Rejected') | html %]</a>:
<span id="terms_summary_rejected_count">[% rejected_count | html %]</span>
</li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>:
<li><a href="/cgi-bin/koha/tags/review.pl?approved=0">[% tp('Tags (multiple)', 'Pending') | html %]</a>:
<span id="terms_summary_unapproved_count">[% unapproved_count | html %]</span>
</li>
<li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>: