Bugzilla – Attachment 71102 Details for
Bug 11827
Untranslatable "Cancel Rating" in jQuery rating plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow translating "Cancel Rating", and use string formatting for couple other strings
0001-Bug-11827-Untranslatable-Cancel-Rating-in-jQuery-rat.patch (text/plain), 2.60 KB, created by
paxed
on 2018-02-01 06:40:03 UTC
(
hide
)
Description:
Allow translating "Cancel Rating", and use string formatting for couple other strings
Filename:
MIME Type:
Creator:
paxed
Created:
2018-02-01 06:40:03 UTC
Size:
2.60 KB
patch
obsolete
>From bf6f963c80a56e8165b4e7d5359de1eaf8809d42 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Thu, 25 Jan 2018 13:04:09 +0200 >Subject: [PATCH] Bug 11827: Untranslatable "Cancel Rating" in jQuery rating > plugin > >- Make the "Cancel rating" text translatable (and change > capitalization to conform to Koha coding guidelines) >- Improve the two other messages to use formatted strings > instead of concatenation. >- Use the exact same text for the "your rating" text, so it > only appears once in the po-file. > >Test plan: > >1. See that the "Cancel rating" -text doesn't appear in > po/xx-YY-opac-bootstrap.po >2. Note how there's two versions of the your rating -text > ("your rating: %s, " and "your rating:") in the po-file >3. Apply patch >4. Update the xx-YY translation >5. Check the po-file. It should now contain the "Cancel rating" > and a single "your rating: %s, " >6. Translate those texts, and update & install the language. >7. Go to the OPAC detail page of a biblio, and check the > rating texts. >8. Hovering over the rating minus -sign should show the translated > "Cancel rating" >9. Check that the text after the stars is correct with and without > your rating > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 270fc08a18..27bf665550 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1654,6 +1654,7 @@ > > $(function () { > $(".auto-submit-star").rating({ >+ cancel: _('Cancel rating'), > callback: function (value, link) { > > // if the new value equals the old value, dont execute callback... >@@ -1676,12 +1677,12 @@ > $("#rating_value").val(data.rating_value); > > if (data.rating_value) { >- $("#rating_value_text").text(_("your rating: ") + data.rating_value + ", "); >+ $("#rating_value_text").text(_("your rating: %s, ").format(data.rating_value)); > } else { > $("#rating_value_text").text(''); > } > >- $("#rating_text").text(_("average rating: ") + data.rating_avg + " (" + data.rating_total + ' ' + _("votes") + ")"); >+ $("#rating_text").text(_("average rating: %s (%s votes)").format(data.rating_avg, data.rating_total)); > > } > }, "json"); >-- >2.11.0 >
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 11827
:
71019
|
71102
|
71111
|
71172
|
71225