Bugzilla – Attachment 149287 Details for
Bug 33323
Select button in patron search modal is not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33323: Select button in patron search modal is not translatable
Bug-33323-Select-button-in-patron-search-modal-is-.patch (text/plain), 4.51 KB, created by
David Nind
on 2023-04-07 18:29:40 UTC
(
hide
)
Description:
Bug 33323: Select button in patron search modal is not translatable
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-04-07 18:29:40 UTC
Size:
4.51 KB
patch
obsolete
>From ac0ca235dc304ad3d7b7015c82a4bcd88b8fd170 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 23 Mar 2023 17:42:46 +0000 >Subject: [PATCH] Bug 33323: Select button in patron search modal is not > translatable >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch modifies the JS which generates some markup during some kinds >of patron searches so that the strings labeling submit buttons can be >translated. > >To test, apply the patch and go to Administration -> Funds. >- Add a fund or edit an existing one. >- Test the "Select owner" link > - A popup should appear, and after performing a patron search which > returns results you should see a "Select" column in the last column > of the patron search results table. >- Test the "Add users" link > - Perform the same test as above. The button in the last column should > be "Add" >- The template accommodates two other cases, "Edit" and "Check out" but > I was unable to find a place where they were used. > >- To test translatability, run the translation tool for any language, > e.g. > > perl misc/translator/translate update fr-FR > > Search the regenerated po file (in this example > misc/translator/po/fr-FR-staff-prog.po) to confirm that the > correct strings are there: "Select", "Add", "Edit, and "Check out" > should each have entries for line 234, e.g. > > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc:234 > c-format > msgid "Select" > msgstr "Sélectionner" > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index 6651424b83..dbfcdfb475 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -613,14 +613,14 @@ > [% SWITCH action %] > [% CASE 'select' %] > let patron_str = JSON.stringify(row); >- action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">Select</a>'; >+ action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">' + _("Select") + '</a>'; > let input_node = $('<input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '"/>'); > $(input_node).val(patron_str); > action_node += $(input_node).prop('outerHTML'); > [% CASE 'add' %] >- action_node += '<a href="#" class="btn btn-default btn-xs add_user" data-borrowernumber="' + patron_id + '" data-firstname="' + encodeURIComponent(row.firstname) + '" data-surname="' + encodeURIComponent(row.surname) + '">Add</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" />'; >+ action_node += '<a href="#" class="btn btn-default btn-xs add_user" data-borrowernumber="' + patron_id + '" data-firstname="' + encodeURIComponent(row.firstname) + '" data-surname="' + encodeURIComponent(row.surname) + '">' + _("Add") + '</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" />'; > [% CASE 'edit' %] >- action_node += '<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=' + patron_id + '" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>'; >+ action_node += '<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=' + patron_id + '" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> ' + _("Edit") + '</a>'; > [% CASE 'checkout' %] > [% IF CAN_user_circulate_circulate_remaining_permissions %] > action_node += '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + patron_id + '"><i class="fa fa-barcode"></i> ' + _("Check out") + '</a>'; >-- >2.30.2
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 33323
:
148655
|
148656
|
149287
|
149317