[Koha] Koha bug in item search

David Cook dcook at prosentient.com.au
Wed Feb 26 12:21:52 NZDT 2025


I'm not super familiar with the translation mechanisms, but I reckon that whatever replaces the text in _() constructs should perform some escaping (at the very least of double quotes). I'll raise a Bugzilla issue for that...

David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899

-----Original Message-----
Date: Tue, 25 Feb 2025 07:27:18 -0500
From: Owen Leonard <oleonard at myacpl.org>
To: Info LibraryITSolutions <info at libraryitsolutions.com>
Cc: "koha at lists.katipo.co.nz" <koha at lists.katipo.co.nz>
Subject: Re: [Koha] Koha bug in item search
Message-ID:
	<CAO4qe2OEHNB+_ATzxLKLpFFNe7eR0ECO7D=hmDgo2Z-8RQ0ifg at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

It looks like there is problem with the Russian translation which is causing a JavaScript error on the item search page. The translation file (ru-RU-staff-prog.po) has this:

#: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:379
#: koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt:100
#, c-format
msgid "Not for loan status"
msgstr "Статус \"на дом не выдается\""

This creates double quotes in the JS section of the template which trigger the error. In other parts of the templates this kind of string might work with no problems, but because this generates JavaScript it is a problem. I'm not sure how we could improve this process for translators.

A manual fix to the .po file (if you're able to rebuild the translated
templates) would look like this:

msgstr "Статус 'на дом не выдается'"

A manual fix to the template would change this line:

+ ' <th id="items_status" data-colname="notforloan_status">' +
_("Статус "на дом не выдается"") + '</th>'

...to this:

+ ' <th id="items_status" data-colname="notforloan_status">' +
_("Статус 'на дом не выдается'") + '</th>'

-- Owen




More information about the Koha mailing list