Bug 25118 - Return claims has some translation issues
Summary: Return claims has some translation issues
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:
: 24783 (view as bug list)
Depends on: 14697
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-12 21:48 UTC by Katrin Fischer
Modified: 2020-11-30 21:46 UTC (History)
6 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:
20.05.00, 19.11.06
Circulation function:


Attachments
Bug 25118: Return claims has some translation issues (6.59 KB, patch)
2020-04-14 13:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25118: Return claims has some translation issues (6.59 KB, patch)
2020-04-20 11:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25118: Return claims has some translation issues (6.79 KB, patch)
2020-04-20 18:48 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 25118: Return claims has some translation issues (6.85 KB, patch)
2020-04-22 23:30 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25188: Make circulation notes more prominent on the patron details tab (1.90 KB, patch)
2020-05-04 16:04 UTC, David Roberts
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-04-12 21:48:09 UTC
The tool tip "Double click to edit" in the new'ish claims tab is not translatable.

koha-tmpl/intranet-tmpl/prog/js/checkouts.js:                                + '<i style="float:right" class="fa fa-pencil-square-o" title="Double click to edit"></i>';

I also wonder why we introduce a new behaviour here (double click is not needed anywhere else in Koha). Why not use a single click?
Comment 1 Katrin Fischer 2020-04-13 04:23:49 UTC
Another issue in the same file:
let desc = '<strong>' + oObj.resolution_data.lib + '</strong> on <i>' + oObj.resolved_on + '</i>';
Comment 2 Katrin Fischer 2020-04-13 04:24:15 UTC
                + ' <a class="btn btn-default btn-xs claim-returned-notes-editor-submit" data-return-claim-id="' + id + '"><i class="fa fa-save"></i> Update</a>'
                + ' <a class="claim-returned-notes-editor-cancel" data-return-claim-id="' + id + '" href="#">Cancel</a>'
Comment 3 Katrin Fischer 2020-04-13 04:28:09 UTC
                    {
                        "mDataProp": function ( oObj ) {
                            let delete_html = oObj.resolved_on
                                ? '<li><a href="#" class="return-claim-tools-delete" data-return-claim-id="' + oObj.id + '"><i class="fa fa-trash"></i> Delete</a></li>'
                                : "";
                            let resolve_html = ! oObj.resolution
                                ? '<li><a href="#" class="return-claim-tools-resolve" data-return-claim-id="' + oObj.id + '"><i class="fa fa-check-square"></i> Resolve</a></li>'
                                : "";

                            return  '<div class="btn-group">'
                                  + ' <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
                                  + '  Actions <span class="caret"></span>'
                                  + ' </button>'
                                  + ' <ul class="dropdown-menu">'
                                  + '  <li><a href="#" class="return-claim-tools-editnotes" data-return-claim-id="' + oObj.id + '"><i class="fa fa-edit"></i> Edit notes</a></li>'
                                  + resolve_html
                                  + delete_html
                                  + ' </ul>'
                                  + ' </div>';
                        }
Comment 4 Katrin Fischer 2020-04-13 04:28:47 UTC
I am stopping to look now... I was actually trying to fix the problem with the date formats :(
Comment 5 Katrin Fischer 2020-04-13 15:22:04 UTC
*** Bug 24783 has been marked as a duplicate of this bug. ***
Comment 6 Owen Leonard 2020-04-14 13:19:53 UTC Comment hidden (obsolete)
Comment 7 Bernardo Gonzalez Kriegel 2020-04-17 19:34:24 UTC
Hi Owen,
with the patch as is I found no new strings.
But some pops if you replace _() with __() (two underscores)

Is that what you intended?
Comment 8 Owen Leonard 2020-04-20 11:44:12 UTC
Created attachment 103281 [details] [review]
Bug 25118: Return claims has some translation issues

This patch adds the right function calls to checkouts.js so that English
strings can be picked up by the translator. The resolution message has
been reformatted so that it can be clear without including "on" and
"by" in the middle of the string.

To test you should have a patron with at least one return claim. Open
the checkout page for that patron and open the "Claims" tab. Test the
process of editing, deleting, and resolving claims.

TESTING TRANSLATABILITY

- Update a translation:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for the staff
  client: misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from checkouts.js for translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:920
  msgid "Double click to edit"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

Switch to the udpated translation and test the functionality under the
"Claims" tab again to confirm that your translated strings appear.

Note that "untranslatable string" failures reported by the QA script are
false positives.
Comment 9 Bernardo Gonzalez Kriegel 2020-04-20 18:48:11 UTC
Created attachment 103313 [details] [review]
Bug 25118: Return claims has some translation issues

This patch adds the right function calls to checkouts.js so that English
strings can be picked up by the translator. The resolution message has
been reformatted so that it can be clear without including "on" and
"by" in the middle of the string.

To test you should have a patron with at least one return claim. Open
the checkout page for that patron and open the "Claims" tab. Test the
process of editing, deleting, and resolving claims.

TESTING TRANSLATABILITY

- Update a translation:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for the staff
  client: misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from checkouts.js for translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:920
  msgid "Double click to edit"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

Switch to the udpated translation and test the functionality under the
"Claims" tab again to confirm that your translated strings appear.

Note that "untranslatable string" failures reported by the QA script are
false positives.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, 7 new strings, after translation and install translated
strings found on koha-tmpl/intranet-tmpl/prog/xx-YY/js/locale_data.js
Comment 10 Katrin Fischer 2020-04-22 23:30:14 UTC
Created attachment 103523 [details] [review]
Bug 25118: Return claims has some translation issues

This patch adds the right function calls to checkouts.js so that English
strings can be picked up by the translator. The resolution message has
been reformatted so that it can be clear without including "on" and
"by" in the middle of the string.

To test you should have a patron with at least one return claim. Open
the checkout page for that patron and open the "Claims" tab. Test the
process of editing, deleting, and resolving claims.

TESTING TRANSLATABILITY

- Update a translation:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for the staff
  client: misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from checkouts.js for translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:920
  msgid "Double click to edit"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

Switch to the udpated translation and test the functionality under the
"Claims" tab again to confirm that your translated strings appear.

Note that "untranslatable string" failures reported by the QA script are
false positives.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, 7 new strings, after translation and install translated
strings found on koha-tmpl/intranet-tmpl/prog/xx-YY/js/locale_data.js

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Martin Renvoize (ashimema) 2020-04-27 10:18:37 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 12 David Roberts 2020-05-04 16:04:40 UTC
Created attachment 104311 [details] [review]
Bug 25188: Make circulation notes more prominent on the patron details tab

This patch adds a more prominent circulation note to the moremember.pl
details screen.

To test:

1) Add a circulation note to a patron record.
2) Note that it displays prominently on the checkout tab, but only under
the Library Use block on the details tab.
3) Apply the patch.
4) Check that the note is now displayed prominently at the top of the
details (moremember.pl) screen.
Comment 13 David Roberts 2020-05-04 16:06:14 UTC
Whoops, sorry - I attached a patch to the wrong bug.
Comment 14 Joy Nelson 2020-05-08 20:37:39 UTC
Backported to 19.11.x for 19.11.06
Comment 15 Lucas Gass (lukeg) 2020-05-14 20:57:05 UTC
Missing dependencies for 19.05.x, no backport