Bugzilla – Attachment 17496 Details for
Bug 10049
Comments tab shows ( ) instead of ( 0 ) on translated templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates
SIGNED-OFF-Bug-10049-Alternate-Comments-tab-shows-.patch (text/plain), 2.20 KB, created by
Magnus Enger
on 2013-04-17 10:24:34 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2013-04-17 10:24:34 UTC
Size:
2.20 KB
patch
obsolete
>From 113082d410de4a6e0fea425ab5fdedf1c8436607 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 15 Apr 2013 09:23:58 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 10049 [Alternate] Comments tab shows ( ) instead of ( 0 ) on translated templates > >This patch is an alternate solution to the problem of "0" not appearing >on the comment tab in translated templates. It uses the Template Toolkit >option of specifying a default value for a variable: > >[% reviews.size || 0 %] > >This syntax is already in use elsewhere in the template. > >Same test plan: > >1) Make sure comments/reviews are activated >2) Find a record with 0 comments/reviews in the opac >3) The tab shows: Comments ( 0 ) >4) Switch to any other languages. >5) Tab now shows: <translation of Comments> ( ) >6) Apply patch >7) Check English templates stil work correctly >8) Rerun 'perl translate install <langcode> >9) Check display is now correct. >10) Also check that number shows correctly for records > with comments. > >Signed-off-by: Magnus Enger <magnus@enger.priv.no> >Tested with nb-NO. English still works after the patch. Norwegian >was showing "Comments" untranslated, which had me a bit unnerved. >Turns out the string to be translated changed from "Comments ( %s%s%s%s )" >to "Comments ( %s )", so to make sure all was well, I had to update >the nb-NO translation, fix the number of %s's in the Norwegian string, >make sure it was not marked as fuzzy and then install nb-NO. And it >works! >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 3c37bd1..a8dabf3 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -946,7 +946,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </li> > [% END %] > [% IF ( reviewson ) %] >- <li id="tab_comments"><a href="#comments">Comments ( [% IF reviews.defined %][% reviews.size %][% ELSE %]0[% END %] )</a></li> >+ <li id="tab_comments"><a href="#comments">Comments ( [% reviews.size || 0 %] )</a></li> > [% END %] > > [% IF ( NovelistSelectProfile ) %] >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10049
:
17423
|
17424
|
17455
|
17496
|
17544