Bug 35081: Make it possible to translate catalog concern status messages
authorOwen Leonard <oleonard@myacpl.org>
Tue, 17 Oct 2023 17:43:45 +0000 (17:43 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Oct 2023 14:02:53 +0000 (11:02 -0300)
commitbd30e81f126020e79663b4030326fc7ad1932108
treee663418e00e8d7aeccccd326bfde68bad16a3253
parenteec5d7e4be7d092f07e47468c50a4ec48b842dc1
Bug 35081: Make it possible to translate catalog concern status messages

The JavaScript in both OPAC and staff interface for submitting catalog
concerns contains English strings which are not properly wrapped with
the __() function to allow for translation. This patch fixes both
affected files.

The patch also modifies the dialog classes used in the staff interface
so that the messages are styled consistently.

To test, apply the patch and update a translation, e.g. fr-FR:
   - perl misc/translator/translate update fr-FR
- Edit the updated po file for the language you chose, e.g.
  misc/translator/po/fr-FR-messages-js.po, to fill in translated
  strings for the two catalog concern entries. For example:

  koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js:38
  koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js:55
  msgid "Your concern was sucessfully submitted."
  msgstr ""

- Install the updated po file:
   - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Enable the " CatalogConcerns" preference if necessary.
- Locate a bibliographic record in the staff interface and view the
  detail page
  - From the toolbar, choose New -> New catalog concern.
  - Test submitting the form. When the form is submitted a message
    should display on the page: "Your concern was sucessfully submitted"

- Perform the same test in the OPAC, where the "Report a concern" link
  is in the right-hand sidebar menu of the bibliographic detail page.

- Perform the same tests, in both OPAC and staff interface, in your
  translated language to confirm that the translations show up
  correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js
koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js