Bug 11827 - Untranslatable "Cancel Rating" in jQuery rating plugin
Summary: Untranslatable "Cancel Rating" in jQuery rating plugin
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: paxed
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-24 10:49 UTC by paxed
Modified: 2019-10-14 19:55 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Allow translating "Cancel Rating", and use string formatting for couple other strings (2.54 KB, patch)
2018-01-29 11:17 UTC, paxed
Details | Diff | Splinter Review
Allow translating "Cancel Rating", and use string formatting for couple other strings (2.60 KB, patch)
2018-02-01 06:40 UTC, paxed
Details | Diff | Splinter Review
Bug 11827: Untranslatable "Cancel Rating" in jQuery rating plugin (2.64 KB, patch)
2018-02-01 14:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11827: Untranslatable "Cancel Rating" in jQuery rating plugin (2.65 KB, patch)
2018-02-04 11:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 11827: (follow-up) Use double quote instead of simple-quote (950 bytes, patch)
2018-02-05 12:57 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-02-24 10:49:08 UTC
The jQuery rating plugin has a string "Cancel Rating" which is not picked up by the translation toolchain.
Comment 1 paxed 2018-01-29 11:17:37 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2018-01-31 14:32:12 UTC
This looks fine, and works correctly. I request one small fix: Our capitalization rules (https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML4:_Upper_and_lower_cases_in_strings) say that only the first letter of the first word should be capitalized. I realize that the patch matches what the plugin has in its code, but we should follow the rules if we're adding it to our template.
Comment 3 paxed 2018-02-01 06:40:03 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2018-02-01 14:20:06 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2018-02-04 11:49:59 UTC
Created attachment 71172 [details] [review]
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>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Jonathan Druart 2018-02-05 12:57:02 UTC
Created attachment 71225 [details] [review]
Bug 11827: (follow-up) Use double quote instead of simple-quote
Comment 7 Jonathan Druart 2018-02-05 12:58:19 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 8 Nick Clemens 2018-02-16 02:29:42 UTC
Awesome work all, pushed to stable for 17.11.03