Bug 26719 - Replace MSG_NO_RECORD_SELECTED with translatable string
Summary: Replace MSG_NO_RECORD_SELECTED with translatable string
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 25351
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-16 18:08 UTC by Owen Leonard
Modified: 2021-06-14 21:33 UTC (History)
6 users (show)

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


Attachments
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string (5.87 KB, patch)
2020-10-16 18:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string (5.91 KB, patch)
2020-10-16 19:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string (5.97 KB, patch)
2020-10-20 13:13 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-10-16 18:08:11 UTC
The patch for Bug 25351 removed definition of the MSG_NO_RECORD_SELECTED variable but didn't correct all the instances where the variable is used. These instances need to be fixed with a string wrapped in the new i18n function.
Comment 1 Owen Leonard 2020-10-16 18:38:18 UTC
Created attachment 111932 [details] [review]
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string

This patch cleans up some loose ends left by Bug 25351, replacing
instances where the undefined variable MSG_NO_RECORD_SELECTED is used.

To test, apply the patch and perform a catalog search in the OPAC.

- On the search results page, without checking any checkboxes, use the
  "Select titles to..." menu to try to add to cart and add to a list. In
  each case you should get a "No item was selected" message.
- View a list which contains one or more titles. Click the "Remove
  from list" link. You should get a "No item was selected" link.

Other instances have been corrected even though they will only be
triggered if something has broken. For instance, toolbar items in the
cart window which are disabled shouldn't register the click that might
trigger the error. And selecting an item for an item-level hold
shouldn't ever give a warning because at least one radio button should
always be selected.
Comment 2 David Nind 2020-10-16 19:43:30 UTC
Created attachment 111933 [details] [review]
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string

This patch cleans up some loose ends left by Bug 25351, replacing
instances where the undefined variable MSG_NO_RECORD_SELECTED is used.

To test, apply the patch and perform a catalog search in the OPAC.

- On the search results page, without checking any checkboxes, use the
  "Select titles to..." menu to try to add to cart and add to a list. In
  each case you should get a "No item was selected" message.
- View a list which contains one or more titles. Click the "Remove
  from list" link. You should get a "No item was selected" link.

Other instances have been corrected even though they will only be
triggered if something has broken. For instance, toolbar items in the
cart window which are disabled shouldn't register the click that might
trigger the error. And selecting an item for an item-level hold
shouldn't ever give a warning because at least one radio button should
always be selected.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2020-10-16 20:10:02 UTC
I've added bug 26720 as the your lists buttons don't seem to be displaying correctly.
Comment 4 Katrin Fischer 2020-10-20 13:12:16 UTC
Hi Owen, is there a chance we could add context here or use another word than "item"?

A list item and a record's item require different translation in German.
Comment 5 Katrin Fischer 2020-10-20 13:13:53 UTC
Created attachment 112033 [details] [review]
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string

This patch cleans up some loose ends left by Bug 25351, replacing
instances where the undefined variable MSG_NO_RECORD_SELECTED is used.

To test, apply the patch and perform a catalog search in the OPAC.

- On the search results page, without checking any checkboxes, use the
  "Select titles to..." menu to try to add to cart and add to a list. In
  each case you should get a "No item was selected" message.
- View a list which contains one or more titles. Click the "Remove
  from list" link. You should get a "No item was selected" link.

Other instances have been corrected even though they will only be
triggered if something has broken. For instance, toolbar items in the
cart window which are disabled shouldn't register the click that might
trigger the error. And selecting an item for an item-level hold
shouldn't ever give a warning because at least one radio button should
always be selected.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2020-10-25 23:08:38 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass 2020-11-13 21:02:44 UTC
does not apply clean to 20.05.x, no backport

if needed please rebase