When looking at the patron account details or checkouts tab in the staff interface, the tab Claims is missing the numbers in translated templates. Verified on master for German and Greek. I had filed bug 26561 about this a while ago, but the issue reappered and I don't see how to fix it in the po files. Also we have a second language where it's broken now. I wonder if it's the problem with 0 in templates showing here again.
Created attachment 140631 [details] Screenshot of German interface
This shows that the 0 are lost in the translation process: English: <li role="presentation"> <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> Claims (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span> <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>) </a> </li> French: <li role="presentation"> <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> Réclamations (<span class="label label-default" id="return-claims-count-resolved" title="Réclamations résolues"></span>) <span class="label label-default" id="return-claims-count-unresolved" title="Réclamations non résolues"></span></a> </li>
Created attachment 146462 [details] [review] Bug 31563: Make zero claims show correctly for translations A tag that only contains 0 is turned into an empty tag by the translation scripts. This turns "Claims ( 0 0 )" into "Claims ( )" in translated templates. To test: * Install an additional language (fr-FR, es-ES) and activate it in the system preferences * Look at the checkouts and details tabs in any patron account in the staff interface * Verify the claims tab shows without the zeros as described above * Apply the patch * Update the translation so the templates are recreated with the change * Verify that the 0 0 now show correctly.
Created attachment 146518 [details] [review] Bug 31563: Make zero claims show correctly for translations A tag that only contains 0 is turned into an empty tag by the translation scripts. This turns "Claims ( 0 0 )" into "Claims ( )" in translated templates. To test: * Install an additional language (fr-FR, es-ES) and activate it in the system preferences * Look at the checkouts and details tabs in any patron account in the staff interface * Verify the claims tab shows without the zeros as described above * Apply the patch * Update the translation so the templates are recreated with the change * Verify that the 0 0 now show correctly. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Works perfectly, thanks Katrin! I hadn't noticed, but it goes as least as far as 22.05.
(In reply to Caroline Cyr La Rose from comment #5) > Works perfectly, thanks Katrin! > > I hadn't noticed, but it goes as least as far as 22.05. Thanks to you!
Created attachment 147170 [details] [review] Bug 31563: Make zero claims show correctly for translations A tag that only contains 0 is turned into an empty tag by the translation scripts. This turns "Claims ( 0 0 )" into "Claims ( )" in translated templates. To test: * Install an additional language (fr-FR, es-ES) and activate it in the system preferences * Look at the checkouts and details tabs in any patron account in the staff interface * Verify the claims tab shows without the zeros as described above * Apply the patch * Update the translation so the templates are recreated with the change * Verify that the 0 0 now show correctly. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
That's definitely a bug in the translation script, but I am lazy to dig into it now.
Created attachment 147223 [details] [review] Bug 31563: Make zero claims show correctly for translations A tag that only contains 0 is turned into an empty tag by the translation scripts. This turns "Claims ( 0 0 )" into "Claims ( )" in translated templates. To test: * Install an additional language (fr-FR, es-ES) and activate it in the system preferences * Look at the checkouts and details tabs in any patron account in the staff interface * Verify the claims tab shows without the zeros as described above * Apply the patch * Update the translation so the templates are recreated with the change * Verify that the 0 0 now show correctly. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Looks like I broke jenkins. Providing a follow up for missing filters.
Created attachment 147409 [details] [review] Bug 31563: (follow-up) Add missing TT filters
Follow-up pushed to master. I noticed this, but didn't know it would break the tests. It is obviously a false negative as we are setting the variable a couple lines above and doesn't need the filter.
(In reply to Tomás Cohen Arazi from comment #13) > Follow-up pushed to master. > > I noticed this, but didn't know it would break the tests. It is obviously a > false negative as we are setting the variable a couple lines above and > doesn't need the filter. All variables displayed must be filtered. There is no false negative here.
Nice work everyone! Pushed to stable for 22.11.x
Doesn't apply clean in 22.05.x, no backport. If needed please rebase.