I suggest we modify the way we display counts on the checkouts page tabs (checkouts, holds, claims, etc). I suggest we use the new pluralization template syntax (Bug 21156) to show counts on the tabs. Example screenshot: https://zivotdesign.com/p/#1/15980387474009 Besides avoiding parentheses in labels like "10 Checkout(s)," this change would show the count of only unresolved claims and enrolled clubs.
+1 :)
Created attachment 123338 [details] [review] 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.
Created attachment 123350 [details] [review] 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. Signed-off-by: David Nind <david@davidnind.com>
This patch set adds a few warns to the logs, but I believe that these will likely appear on other pages using the plural translations: Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285. Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285. Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285. So I am moving them to a separate bug 28877.
Created attachment 123932 [details] [review] 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. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Looking at this again I can see that it removes the divided display of unresolved/resolved claims with the colored mark-up. I think as this was explicitly added after the initial feature request, this could be missed. Setting back to FQA for now. completely different question: should it be 1 checkout or 1 Checkout?
You must html filter the tn (not raw).
Hmm, I think I actually prefer the consistency of bug 30695 to the pluralisation this introduces personally.. Example Holds (0) Holds (5) vs 0 Holds 1 Hold 2 Holds Whilst the latter which this introduces is nice enough, given we have the bracketed approach elsewhere fairly consistently I currently prefer that for wider consistency.. I also feel that works better with the (X/Y) approaches (though the `([X] [Y])` block does make me wince a little)
(In reply to Martin Renvoize from comment #8) > Hmm, I think I actually prefer the consistency of bug 30695 to the > pluralisation this introduces personally.. > > Example > > Holds (0) > Holds (5) > > vs > > 0 Holds > 1 Hold > 2 Holds > > Whilst the latter which this introduces is nice enough, given we have the > bracketed approach elsewhere fairly consistently I currently prefer that for > wider consistency.. I also feel that works better with the (X/Y) approaches > (though the `([X] [Y])` block does make me wince a little) It would be interesting to have end-user's opinions on that. You certainly prefer "Holds (X)" because of your developer's brain :D
I think I have developer's brain too ;) But from a UX perspective I like it because the more important information is first. You want to know what to click for 'holds' the number is useful, but secondary and we read left to right.