Bugzilla – Attachment 175013 Details for
Bug 38450
Missing translation string in catalogue_detail.inc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38450: Fix some translation pickups
Bug-38450-Fix-some-translation-pickups.patch (text/plain), 5.96 KB, created by
David Nind
on 2024-11-27 21:13:08 UTC
(
hide
)
Description:
Bug 38450: Fix some translation pickups
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-11-27 21:13:08 UTC
Size:
5.96 KB
patch
obsolete
>From 189fbe75634d696670daae4f4134795b9fe27695 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Nov 2024 10:57:22 +0100 >Subject: [PATCH] Bug 38450: Fix some translation pickups > >_("This %s is picked").format(foo) >_("This %s is NOT picked".format(bar)) > >Both constructs are valid, but our translation script does not pick the >second one. > >I found very few occurrences (using `git grep '.".format('`) that are >displayed on the UI. I don't have the time right now to deep dive into >the translation script to fix this problem, easier to adjust the >occurrences. > >How to prevent that in the future however? We could raise a warning from >the QA script. > >Test plan: >Do not apply this patch >Generate the strings (`gulp po:update --lang LANG`) >cd misc/translator/po && git commit -a -m"wip" >Apply this patch, regenerate the strings >cd misc/translator/po && git diff > >Notice the changes, you should see new translations added to the .po >files. >Ideally translate them, install the templates and confirm that the new >strings are translated on the UI. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../includes/html_helpers/tables/items/catalogue_detail.inc | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 +- > koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js | 4 ++-- > 4 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 9fa81b87f7..1f98822996 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -528,9 +528,9 @@ > if ( row.first_hold ) { > if ( row.first_hold.waiting_date ) { > if ( row.first_hold.desk ) { >- nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.".format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date)))); >+ nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.").format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date))); > } else { >- nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s since %s.".format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date)))); >+ nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s since %s.").format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date))); > } > [% IF Koha.Preference('canreservefromotherbranches') %] > if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >index fd8463ba3a..8b7ca40bed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >@@ -38,7 +38,7 @@ > } > > if ( name.replace(' ', '').length == 0 ) { >- return _("A patron from %s".format(patron.library.name)); >+ return _("A patron from %s").format(patron.library.name); > } > > if ( config && config.hide_patron_name ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 6d0bfc179c..ce72d941f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -386,7 +386,7 @@ function LoadIssuesTable() { > } else if ( oObj.can_renew_error == "on_reserve" ) { > return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("On hold") + "</a>"; > } else if ( oObj.materials ) { >- return __("Confirm (%s)".format(oObj.materials.escapeHtml())); >+ return __("Confirm (%s)").format(oObj.materials.escapeHtml()); > } else { > return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>"; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >index affe6ac4e0..b975d34173 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >@@ -149,7 +149,7 @@ $(document).ready(function () { > var search_field_name = $(line).find('input[data-id="search_field_name"]').val(); > let already_exists = dt.data().filter((row, idx) => row[0]['@data-order'] === search_field_name); > if ( already_exists.length ) { >- alert(__("Search field '%s' already exists".format(search_field_name))); >+ alert(__("Search field '%s' already exists").format(search_field_name)); > return; > } > if (search_field_name.length > 0) { >@@ -171,7 +171,7 @@ $(document).ready(function () { > let dt_data = dt.data(); > let already_exists = dt_data.filter((row, idx) => row[1] === search_field_name); > if ( already_exists.length ) { >- alert(__("Facet '%s' already exists".format(search_field_name))); >+ alert(__("Facet '%s' already exists").format(search_field_name)); > return; > } > if (search_field_name.length > 0) { >-- >2.39.5
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 38450
:
174672
|
175013
|
175256