[Koha-bugs] [Bug 18649] Translatability: Get rid of tt directive in translation for admin/ categories.tt and onboardingstep2.tt

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 26 15:09:55 CEST 2017


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

--- Comment #6 from Marc Véron <veron at veron.ch> ---
(In reply to Marcel de Rooy from comment #5)
> Hi Marc,
> 
> What is the advantage of 
> value="[%- category.enrolmentperiod IF category.enrolmentperiod -%]"
> above e.g.
> value="[% category.enrolmentperiod %]"  ?
> I guess that if period == 0, the first one will leave the field empty?
> Null and empty string will probably respond the same.
> 
> Note that the trailing IF does not increase readability. Before making this
> kind of changes everywhere, is there a consensus to do so?
> 
> Also noting that you add chomps here (%-). Do we need them here?

Hi Marcel

- This bug is about translatability, and does not contain a change in behavior.
I might be wrong, but the functionality is precisely the same. 

- At the moment, the translation tool picks the following line for translation:
[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]
That makes no sense for translators, confuses them, and can lead to errors.
Translators should not have to care about code internals.

To verify, search for that string for any language on
translate.koha-community.org for version 17.05

Or create a translation e.g. for a 'language' aa-AA and then search in
aa-AA-staff-prog.po for

#. INPUT type=text name=enrolmentperiod
#: intranet-tmpl/prog/en/modules/admin/categories.tt:92
#: intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt:104
msgid ""
"[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]"
msgstr ""

Then apply patch, translate aa-AA again and verify that the line 
[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]
no longer appears.

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


More information about the Koha-bugs mailing list