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

--- Comment #6 from Marc VĂ©ron <[email protected]> ---
(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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to