Bugzilla – Attachment 73325 Details for
Bug 18791
Add the ability for librarians to easily copy, download or print DataTables based tables in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18791 (follow up) Translation of copy messages
Bug-18791-follow-up-Translation-of-copy-messages.patch (text/plain), 3.59 KB, created by
Owen Leonard
on 2018-03-27 15:39:26 UTC
(
hide
)
Description:
Bug 18791 (follow up) Translation of copy messages
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-03-27 15:39:26 UTC
Size:
3.59 KB
patch
obsolete
>From 7127a9b8d945cf495e4f737230df4cfdbbe28d8f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 27 Mar 2018 15:09:08 +0000 >Subject: [PATCH] Bug 18791 (follow up) Translation of copy messages > >This patch updates DataTables configuration so that more strings are >translatable: > >https://datatables.net/extensions/buttons/examples/html5/copyi18n.html > >To test, apply the patch and clear your browser cache. > >- Open the account tab for a patron who has only one fine. >- Confirm that the new DataTables buttons appear. >- Click the 'Copy' button and confirm that a "Copied 1 row to clipboard" > message appears. >- Test again with a patron who has multiple fines, confirm that the > message reads "Copied X rows to clipboard." > >To test the translation: > >- Confirm that "Copied 1 row to clipboard" is missing from the language > file you're testing with (misc/translator/po/xx-YY-staff-prog.po). >- Run 'translate update xx-YY' >- Check that the clipboard strings are now in the po file. >- Add translations for those strings. >- Run 'translate update xx-YY' and 'translate install xx-YY' >- Switch to the translated language and clear your browser cache. >- Test the 'Copy' button again. Your translated text should appear. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc | 4 ++++ > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 10 +++++++++- > 2 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >index 57b3719..9361879 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >@@ -23,6 +23,10 @@ > var MSG_DT_ZERO_RECORDS = _("No matching records found"); > var MSG_DT_ALL = _("All"); > var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the"); >+ var MSG_DT_COPY_TITLE = _("Copy to clipboard"); >+ var MSG_DT_COPY_KEYS = _("Press ctrl or â + C to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape."); >+ var MSG_DT_COPY_SUCCESS_ONE = _("Copied one row to clipboard"); >+ var MSG_DT_COPY_SUCCESS_X = _("Copied %d rows to clipboard"); > //]]> > </script> > <script type="text/javascript" src="[% interface %]/[% theme %]/js/datatables_[% KOHA_VERSION %].js"></script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 99aec83..9c3caf1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -21,7 +21,15 @@ var dataTablesDefaults = { > "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", > "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", > "sSearch" : window.MSG_DT_SEARCH || "Search:", >- "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" >+ "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found", >+ buttons: { >+ "copyTitle" : window.MSG_DT_COPY_TITLE || "Copy to clipboard", >+ "copyKeys" : window.MSG_DT_COPY_KEYS || "Press <i>ctrl</i> or <i>â</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.", >+ "copySuccess": { >+ _: window.MSG_DT_COPY_SUCCESS_X || "Copied %d rows to clipboard", >+ 1: window.MSG_DT_COPY_SUCCESS_ONE || "Copied one row to clipboard" >+ } >+ } > }, > "dom": '<"top pager"ilpfB>tr<"bottom pager"ip>', > "buttons": [], >-- >2.1.4
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 18791
:
64233
|
72615
|
72616
|
72618
|
73325
|
73995
|
73996
|
73997
|
74085
|
74086
|
74087
|
74174