[Koha-bugs] [Bug 26392] Wrap all translatable strings in opac-main.tt

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 14 01:01:11 CET 2020


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

--- Comment #30 from David Cook <dcook at prosentient.com.au> ---
(In reply to Julian Maurice from comment #27)
> I really don't see how what you're describing is a better solution than what
> we already have. This is looking worse actually. Correct me if I'm wrong but
> are you're suggesting that
> 
> [% t('Hello, World!') %]
> 
> should be replaced by
> 
> $template->param('hello_world_str' => fetch('hello_world_str'))
> 
> in Perl script and
> 
> [% hello_world_str %]
> 
> in template ? I don't find that very clean.

I would say that the latter example is actually much *cleaner*. I think that
you mean that it is less *convenient*. 

A different example could be:

<p>[% opac_access_denied %]</p>

vs 

<p>[% t('Sorry, the system doesn\'t think you have permission to access this
page.') %]</p>

That being said... I suppose using t() does make it easier to automate string
extraction from templates rather than forcing developers to put their strings
into translation files and to reference them correctly in the Perl.

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


More information about the Koha-bugs mailing list