Bugzilla – Attachment 194611 Details for
Bug 41769
", by" in suggestions table in the staff interface is not translated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41769: Make ', by' string translatable in suggestions
Bug-41769-Make--by-string-translatable-in-suggesti.patch (text/plain), 2.92 KB, created by
David Nind
on 2026-03-06 03:11:04 UTC
(
hide
)
Description:
Bug 41769: Make ', by' string translatable in suggestions
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-03-06 03:11:04 UTC
Size:
2.92 KB
patch
obsolete
>From 1801fd222c812349c8d760c541e12e802173b34a Mon Sep 17 00:00:00 2001 >From: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> >Date: Mon, 2 Mar 2026 16:54:09 -0500 >Subject: [PATCH] Bug 41769: Make ', by' string translatable in suggestions > >This fixes a translation issue in the purchase suggestions >table in the staff interface - a ", by" is added between the >title and the author in the suggestion column, the "by" is >not translated when the language for the staff interface >is a language other than English. > >Test plan: > >1. Add another language to Koha: > ./misc/translator/translate install fr-CA > >2. Enable the new language in StaffInterfaceLanguages: > 2.1. Go to Administration > System preferences > 2.2. Search for StaffInterfaceLanguages > 2.3. Check the new language > 2.4. Click Save all I18N/L10N preferences > >3. Create a new purchase suggestion: > 3.1. Go to More > Suggestions > 3.2. Click New purchase suggestion > 3.3. Fill out the title AND the author at least > 3.4. Click Submit your suggestion > >4. View the suggestion in the table > --> It says title, by author > >5. Switch language > --> The ", by" is still in English > >6. Apply patch. > >7. Run these commands to update the translation: > 7.1 ./misc/translator/translate update fr-CA > 7.2 ./misc/translator/translate install fr-CA > >8. Reload page. > >9. Notice that ", by" is now translated. > --> in this instance, you will see ", par" > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index ad53e2dea8..47bdf45599 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1370,7 +1370,9 @@ > orderable: true, > render: function (data, type, row, meta) { > let node = '<a href="suggestion.pl?suggestionid=%s&op=show" title="%s">%s'.format(row.suggestion_id, _("suggestion"), row.title); >- if(row.author) node += ', by %s'.format(row.author); >+ if(row.author) { >+ node += ", %s %s".format(_("by"),row.author.escapeHtml()); >+ } > node += '</a><br />'; > if(row.copyright_date) node += ' © <span class="suggestion_copyrightdate">%s</span>'.format(row.copyright_date); > if(row.volume_desc) node += '; <span class="suggestion_volume">%s:<em>%s</em></span>'.format(_("Volume"), row.volume_desc); >-- >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 41769
:
192541
|
192545
|
192546
|
192579
|
194366
|
194367
|
194368
|
194562
|
194563
| 194611 |
194623