@@ -, +, @@ 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. po/xx-YY-opac-bootstrap.po ("your rating: %s, " and "your rating:") in the po-file and a single "your rating: %s, " rating texts. "Cancel rating" your rating --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/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"); --