Bug 35081 - "Your concern was sucessfully submitted." untranslatable
Summary: "Your concern was sucessfully submitted." untranslatable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 31028
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-17 15:45 UTC by Caroline Cyr La Rose
Modified: 2024-07-04 20:37 UTC (History)
3 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:
23.11.00,23.05.05
Circulation function:


Attachments
Bug 35081: Make it possible to translate catalog concern status messages (4.82 KB, patch)
2023-10-18 11:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35081: Make it possible to translate catalog concern status messages (4.88 KB, patch)
2023-10-18 20:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35081: Make it possible to translate catalog concern status messages (4.93 KB, patch)
2023-10-19 20:11 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-10-17 15:45:52 UTC
I was looking for this string to translate it, and I can't find it in any po file.

To get the string:
1. Enable OPACCatalogConcerns
2. Go to the OPAC and log in
3. Go to a bibliographic record
4. Click on "Report a concern"
5. Fill out the form and submit
--> "Your concern was sucessfully submitted."

I did 

gulp po:update --lang fr-CA

then

cd misc/translator/po

git grep "Your concern was sucessfully submitted"

and there is no result
Comment 1 Owen Leonard 2023-10-18 11:12:52 UTC
Created attachment 157306 [details] [review]
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.
Comment 2 Katrin Fischer 2023-10-18 20:22:06 UTC
Created attachment 157358 [details] [review]
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>
Comment 3 Victor Grousset/tuxayo 2023-10-19 20:11:51 UTC
Created attachment 157479 [details] [review]
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>
Comment 4 Victor Grousset/tuxayo 2023-10-19 20:12:21 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 5 Tomás Cohen Arazi (tcohen) 2023-10-20 14:04:07 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-25 21:45:34 UTC
Pushed to 23.05.x for 23.05.05
Comment 7 Fridolin Somers 2023-10-25 21:46:00 UTC
Depends in Bug 31028 not in 22.11.x