Bugzilla – Attachment 103281 Details for
Bug 25118
Return claims has some translation issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25118: Return claims has some translation issues
Bug-25118-Return-claims-has-some-translation-issue.patch (text/plain), 6.59 KB, created by
Owen Leonard
on 2020-04-20 11:44:12 UTC
(
hide
)
Description:
Bug 25118: Return claims has some translation issues
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-04-20 11:44:12 UTC
Size:
6.59 KB
patch
obsolete
>From 99246ae8088b926acf78bf5c1815cfef608d6eac Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 14 Apr 2020 11:52:17 +0000 >Subject: [PATCH] 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. >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index e18c2a24c9..8f93aadaf8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -917,7 +917,7 @@ $(document).ready(function() { > "sClass": "return-claim-notes-td", > "mDataProp": function ( oObj ) { > return '<span id="return-claim-notes-static-' + oObj.id + '" class="return-claim-notes" data-return-claim-id="' + oObj.id + '">' + oObj.notes + '</span>' >- + '<i style="float:right" class="fa fa-pencil-square-o" title="Double click to edit"></i>'; >+ + '<i style="float:right" class="fa fa-pencil-square-o" title="' + __("Double click to edit") + '"></i>'; > } > }, > { >@@ -940,26 +940,27 @@ $(document).ready(function() { > "mDataProp": function ( oObj ) { > if ( ! oObj.resolution ) return ""; > >- let desc = '<strong>' + oObj.resolution_data.lib + '</strong> on <i>' + oObj.resolved_on + '</i>'; >- if (oObj.resolved_by_data) desc += ' by <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + oObj.resolved_by_data.borrowernumber + '">' + ( oObj.resolved_by_data.firstname || "" ) + ( oObj.resolved_by_data.surname || "" ) + '</a>'; >+ let desc = '<strong>' + oObj.resolution_data.lib + '</strong> <i>('; >+ if (oObj.resolved_by_data) desc += '<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + oObj.resolved_by_data.borrowernumber + '">' + ( oObj.resolved_by_data.firstname || "" ) + " " + ( oObj.resolved_by_data.surname || "" ) + '</a>'; >+ desc += ', ' + oObj.resolved_on + ')</i>'; > return desc; > } > }, > { > "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>' >+ ? '<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>' >+ ? '<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 type="button" class="btn btn-default btn-xs 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>' >+ + ' <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>' >@@ -1001,8 +1002,8 @@ $(document).ready(function() { > ' <span id="return-claim-notes-editor-' + id + '">' > + ' <textarea id="return-claim-notes-editor-textarea-' + id + '">' + note + '</textarea>' > + ' <br/>' >- + ' <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>' >+ + ' <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>' > + '</span>'; > elt.hide(); > $(editor).insertAfter( elt ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25118
:
102929
|
103281
|
103313
|
103523
|
104311