Template directives should not be exposed in translation, but lines like the following pop up in the translation tool: Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %] All
Created attachment 63584 [details] [review] Bug 18641 - Translatability: Get rid of template directives in translations for *reserves.tt files Template directives should not be exposed in translation, but lines like the following pop up in the translation tool: Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %] All This patch fixes it. To test: - Apply patch - Verify that code changes make sense - Verify that submit buttons of pendingreserves.tt and waitingreserves.tt still work and display the same string as before
Created attachment 63608 [details] [review] [SIGNED-OFF] Bug 18641 - Translatability: Get rid of template directives in translations for *reserves.tt files Template directives should not be exposed in translation, but lines like the following pop up in the translation tool: Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %] All This patch fixes it. To test: - Apply patch - Verify that code changes make sense - Verify that submit buttons of pendingreserves.tt and waitingreserves.tt still work and display the same string as before Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 63625 [details] [review] Bug 18649: Translatability: Get rid of tt directive in translation for admin/categories.tt and onboardingstep2.tt Translation tool shows [% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %] for en/modules/admin/categories.tt and koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt This patch fixes it. To test: - Apply patch - Verify that code changes make sense - Verify that template directive is no longer picked by translation
Comment on attachment 63625 [details] [review] Bug 18649: Translatability: Get rid of tt directive in translation for admin/categories.tt and onboardingstep2.tt Sorry for the noise, I mistaked in Bug number...
Created attachment 63928 [details] [review] Bug 18641 - Translatability: Get rid of template directives in translations for *reserves.tt files Template directives should not be exposed in translation, but lines like the following pop up in the translation tool: Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %] All This patch fixes it. To test: - Apply patch - Verify that code changes make sense - Verify that submit buttons of pendingreserves.tt and waitingreserves.tt still work and display the same string as before Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
And what not something more readable like [% IF %] input [% ELSE %] other input [% END %] ?
Created attachment 63965 [details] [review] Bug 18641: (RM-followup) for waitingreserves.tt Code changed for waitingreserves.tt as asked for in comment #7
Marcel, what do you think?
(In reply to Jonathan Druart from comment #9) > Marcel, what do you think? Looks good to me
(In reply to Marcel de Rooy from comment #10) > (In reply to Jonathan Druart from comment #9) > > Marcel, what do you think? > > Looks good to me Yes I know :) But do you think the BLOCK method is acceptable, or we should stick to the IF/ELSE usual style? I am asking for the other bug reports.
(In reply to Jonathan Druart from comment #11) > (In reply to Marcel de Rooy from comment #10) > > (In reply to Jonathan Druart from comment #9) > > > Marcel, what do you think? > > > > Looks good to me > > Yes I know :) > But do you think the BLOCK method is acceptable, or we should stick to the > IF/ELSE usual style? > I am asking for the other bug reports. In most cases we may be able to avoid BLOCK just as we do here now, but it might not be that easy everywhere..
For the pendingreserves changes: Before the patch, I got #. %1$s: HoldsToPullStartDate. #. %2$s: IF ( HoldsToPullEndDate ). #. %3$s: HoldsToPullEndDate. #. %4$s: ELSE. #. %5$s: END. #: intranet-tmpl/prog/en/modules/circ/pendingreserves.tt:198 #, c-format msgid "" "(Inclusive, default is %s days ago to %s%s days ahead%stoday%s, set other " "date ranges as needed. )" now I get: #. %1$s: BLOCK range_msg. #. %2$s: HoldsToPullStartDate. #. %3$s: IF ( HoldsToPullEndDate ). #. %4$s: HoldsToPullEndDate. #. %5$s: ELSE. #. %6$s: END. #. %7$s: END. #: intranet-tmpl/prog/en/modules/circ/pendingreserves.tt:197 #, fuzzy, c-format msgid "" "%s(Inclusive, default is %s days ago to %s%s days ahead%stoday%s, set other " "date ranges as needed.)%s " Seems worst...
Created attachment 64078 [details] [review] Bug 18641: Followup for pendingreserves.tt (less %s) Change as of comment #13 to reduce %s After creating a new translation for a "language" aa-AA, we have the following in the file aa-AA-staff-prog.po msgid "" "(Inclusive, default is %s days ago to %s days ahead. Set other date ranges " "as needed.)" msgstr "" msgid "" "(Inclusive, default is %s days ago to today. Set other date ranges as " "needed.)" msgstr ""
Hope it's OK to set this back to PQA
Pushed to master for 17.11, thanks to everybody involved!
I have squashed the 3 patches for readability.
Squashed patch from 17.05 has been pushed to 16.11.x and will be in 16.11.09.
Pushed to 16.05.x, for 16.05.15 release