[Koha-bugs] [Bug 29695] Centralize columns' descriptions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 21 11:27:59 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29695

--- Comment #43 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Tomás Cohen Arazi from comment #42)
> (In reply to Jonathan Druart from comment #41)
> > Why is it bad to use __()?
> > It will get translated the usual way by translators.
> 
> I might be wrong, but have the feeling that any place in which all (say)
> borrower table columns need to be displayed, will imply N file accesses if
> there's no caching of the file.

You are wrong. Translations are cached, see Koha::I18N->init

> I tested it to work correctly and didn't notice any drawbacks, but got me
> thinking of the approach.

This is the correct way, we need to let perl code access the translation of
columns. Think CSV headers for instance, now we have to use TT for that, and
build the CSV manually when we could use a dedicated library (Text::CSV_XS in
our case). See also the code for reports to see how easy it is now.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list