From b6862f8d972b777ada5500850e1784608f137f00 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sat, 22 Aug 2020 13:01:51 +0000 Subject: [PATCH] Bug 26979: Show correctly-pluralized labels on checkouts page tabs This patch modifies the tabs shown on the checkout and patron detail page so that counts of checkouts, etc. have the correct pluralization. This avoids the use of labels like "Checkout(s)" To test, apply the patch and check out to a patron. - The tabs showing checkouts, holds, claims, etc. should show the correct plural or singular on each label, e.g.: 14 Checkouts 20 Holds 0 Article requests 1 Club - Test that each plural/singular changes appropriately when you add checkouts, holds, clubs, etc. To test translation, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation: > gulp po:update > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from the templates e.g. misc/translator/po/fr-FR-messages.po - Locate strings pulled from circulation.tt and moremember.tt translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt:770 msgid "Relatives' checkout" msgid_plural "Relatives' checkouts" msgstr[0] "" msgstr[1] "" - Edit the "msgstr[0]" and "msgstr[1]" strings however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR In the staff client, switch to the language you're testing. Confirm that your translated strings appear correctly in singular and plural cases. --- .../prog/en/modules/circ/circulation.tt | 51 ++++++---------- .../prog/en/modules/members/moremember.tt | 59 ++++++++----------- 2 files changed, 41 insertions(+), 69 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 1771a941f0..cc764595d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -8,6 +8,7 @@ [% USE ItemTypes %] [% USE Price %] [% USE AuthorisedValues %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] @@ -761,65 +762,49 @@