Bugzilla – Attachment 192541 Details for
Bug 41769
", by" in suggestions is untranslatable
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.47 KB, created by
Ayoub Glizi-Vicioso
on 2026-02-05 19:08:06 UTC
(
hide
)
Description:
Bug 41769: Make ', by' string translatable in suggestions
Filename:
MIME Type:
Creator:
Ayoub Glizi-Vicioso
Created:
2026-02-05 19:08:06 UTC
Size:
2.47 KB
patch
obsolete
>From 04a68dbf35fa1ed9a7a4d18510ade493a361b58a Mon Sep 17 00:00:00 2001 >From: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> >Date: Thu, 5 Feb 2026 14:03:39 -0500 >Subject: [PATCH] Bug 41769: Make ', by' string translatable in suggestions > >To test: > >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. Reload page. > >8. Notice that ", by" is now translated. > --> in this instance, you will see ", par" >--- > .../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 806d9a1b26..165dfb9a95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1354,7 +1354,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, by %s%s").format("", "", 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.52.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 41769
:
192541
|
192545
|
192546
|
192579