Bugzilla – Attachment 119813 Details for
Bug 27644
Add button to SQL report editor for inserting runtime parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27644: (follow-up) Wrap strings in translation function
Bug-27644-follow-up-Wrap-strings-in-translation-fu.patch (text/plain), 7.53 KB, created by
Katrin Fischer
on 2021-04-18 00:08:57 UTC
(
hide
)
Description:
Bug 27644: (follow-up) Wrap strings in translation function
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-04-18 00:08:57 UTC
Size:
7.53 KB
patch
obsolete
>From be234f2815c235a68d92228f2a7c5d8a7579b4f9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 7 Apr 2021 18:09:09 +0000 >Subject: [PATCH] Bug 27644: (follow-up) Wrap strings in translation function >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch updates the in-template JavaScript so that some English >strings which were previously untranslatable. This patch wraps them in >the _() function. > >To test, apply the patch and test that the correct strings are >translatable. In this example I'm testing fr-FR: > >- Update a translation: > > > gulp po:update > > cd misc/translator > > perl translate update fr-FR > >- Open the corresponding .po file for the strings pulled from > JavaScript e.g. misc/translator/po/fr-FR-staff-prog.po >- Locate strings pulled from reports/guided_reports_start.tt for > translation, e.g.: > > #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:1324 > #, fuzzy, c-format > msgid "Authorized value category:" > msgstr "Catégorie de valeur autorisée : " > >- Edit the "msgstr" string if necessary, or remove the "fuzzy," before > "c-format" >- Install the updated translation: > > > perl translate install fr-FR > >In the staff interface, switch to the language you're testing. Confirm >that your translated strings appear. In this case, test in particular: > > - The controls on the modal window when you preview a report's SQL from > the list of saved reports. > - The controls and modal dialog for inserting a runtime parameter. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../en/modules/reports/guided_reports_start.tt | 26 +++++++++++----------- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 0e4de62084..915757ebf3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1498,33 +1498,33 @@ > switch ( category ){ > case "insertAuthVal": > modalTitle.text( _("Insert authorized value parameter") ); >- $("#paramLabel").val("Authorized value") >+ $("#paramLabel").val( _("Authorized value") ); > $("#authorised_value_category").show(); > $("#authorised_value").prop("required", true ).attr("required", "required"); > break; > case "insertDate": > modalTitle.text( _("Insert date parameter") ); >- $("#paramLabel").val("Date") >+ $("#paramLabel").val( _("Date") ); > $("#param_category").val("date"); > break; > case "insertItemtypes": > modalTitle.text( _("Insert item types parameter") ); >- $("#paramLabel").val("Item type") >+ $("#paramLabel").val( _("Item type") ); > $("#param_category").val("itemtypes"); > break; > case "insertBranches": > modalTitle.text( _("Insert libraries parameter") ); >- $("#paramLabel").val("Library") >+ $("#paramLabel").val( _("Library") ); > $("#param_category").val("branches"); > break; > case "insertCategorycode": > modalTitle.text( _("Insert patron category parameter") ); >- $("#paramLabel").val("Patron category") >+ $("#paramLabel").val( _("Patron category") ); > $("#param_category").val("categorycode"); > break; > case "insertText": > modalTitle.text( _("Insert text parameter") ); >- $("#paramLabel").val("Text") >+ $("#paramLabel").val( _("Text") ); > $("#param_category").val(""); > break; > } >@@ -1554,7 +1554,7 @@ > > $("body").on('click',".fetch_chart_data",function(){ > if( [% unlimited_total || 0 | $raw %] > 1000 ){ >- if( confirm("Fetching full chart data for reports with many rows can cause performance issues. Are you sure you with to chart this report?") ){ >+ if( confirm( _("Fetching full chart data for reports with many rows can cause performance issues. Are you sure you with to chart this report?") ) ){ > return true; > } else { > return false; >@@ -2164,12 +2164,12 @@ > </div>\ > <div class="modal-body"><textarea id="code' + reportid + '">' + message + '</textarea>\ > <div class="modal-footer">\ >- <a id="preview-modal-editreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Edit%20SQL"><i class="fa fa-pencil"></i> Edit</a>\ >- <a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from existing&report_id=' + reportid + '"><i class="fa fa-copy"></i> Duplicate</a>\ >- <a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/tools/scheduler.pl?id=' + reportid + '"><i class="fa fa-clock-o"></i> Schedule</a>\ >- <a id="preview-modal-delete" class="delete btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Delete%20Saved"><i class="fa fa-trash"></i> Delete</a>\ >- <a id="preview-modal-runreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Run%20this%20report"><i class="fa fa-play"></i> Run report</a>\ >- <a href="#" id="preview-sql-modal-cancel" data-dismiss="modal" class="btn btn-default"><i class="fa fa-remove" aria-hidden="true"></i> Close</a>\ >+ <a id="preview-modal-editreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Edit%20SQL"><i class="fa fa-pencil"></i> ' + _("Edit") + '</a>\ >+ <a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from existing&report_id=' + reportid + '"><i class="fa fa-copy"></i> ' + _("Duplicate") + '</a>\ >+ <a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/tools/scheduler.pl?id=' + reportid + '"><i class="fa fa-clock-o"></i> ' + _("Schedule") + '</a>\ >+ <a id="preview-modal-delete" class="delete btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Delete%20Saved"><i class="fa fa-trash"></i> ' + _("Delete") + '</a>\ >+ <a id="preview-modal-runreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?reports=' + reportid + '&phase=Run%20this%20report"><i class="fa fa-play"></i> ' + _("Run report") + '</a>\ >+ <a href="#" id="preview-sql-modal-cancel" data-dismiss="modal" class="btn btn-default"><i class="fa fa-remove" aria-hidden="true"></i> ' + _("Close") + '</a>\ > </div>\ > </div>\ > </div>\ >-- >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 27644
:
116429
|
116496
|
118973
|
119039
|
119311
|
119812
| 119813 |
119814