Description
Marc Véron
2017-05-23 15:09:21 UTC
Created attachment 63658 [details] [review] Bug 18660: Translatability: Get rid of template directives [%% in translation for patroncards-errors.inc Translation for koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc contains a lot of (partial) template directives like: %%]%s %sLayout: [%% This patch fixes it To test: - Verify that code changes make sense - Apply patch - Create a translation (cd misc/translator , then: perl translate create aa-AA - Verify that in po/aa-AA-staff-prog.po contains no fragments like %%] or [%% for patroncards-errors.inc - Try to get an error: Try a link like http://[YOUR SERVER]/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=1&template_id=999&layout_id=999&start_card=1 ...where template_id and layout_id do not exist Marc, The block now displays like: 551 msgid "" 552 "%s %s %s %s The database returned an error while %ssaving %s %s%sattempting " 553 "a save operation%s. %s %s The database returned an error while %sdeleting %s " 554 "%s%s%s%sattempting a delete operation%s. %s %s An unsupported operation was " 555 "attempted%s on %s %s%s. %s %s An error has occurred. %s %s A non-existent or " 556 "invalid library code was supplied. Please verify that you have a library " 557 "set. " Adding <span> around the strings will avoid the %s and we will get one entry per message. (In reply to Jonathan Druart from comment #2) (...) > > Adding <span> around the strings will avoid the %s and we will get one entry > per message. Good idea. Created attachment 64014 [details] [review] Bug 18660: Translatability: Get rid of template directives [%% in translation for patroncards-errors.inc Translation for koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc contains a lot of (partial) template directives like: %%]%s %sLayout: [%% This patch fixes it To test: - Verify that code changes make sense - Apply patch - Create a translation (cd misc/translator , then: perl translate create aa-AA - Verify that in po/aa-AA-staff-prog.po contains no fragments like %%] or [%% for patroncards-errors.inc - Try to get an error: Try a link like http://[YOUR SERVER]/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=1&template_id=999&layout_id=999&start_card=1 ...where template_id and layout_id do not exist (Amended for comment #2 2017-06-05 mv) Still applies on current master I still see some problematic areas: #. %1$s: IF ( element_id ) #. %2$s: card_element #. %3$s: element_id #. %4$s: END #: intranet-tmpl/prog/en/includes/patroncards-errors.inc:30 #, c-format msgid "An unsupported operation was attempted%s on %s %s%s. " msgstr "" I notice some lines where there is a placeholder which doesn't belong. I think some simple whitespace problems? #. %1$s: END #: intranet-tmpl/prog/en/includes/patroncards-errors.inc:28 #, c-format msgid "The database returned an error while attempting a delete operation%s. " msgstr "" Created attachment 65427 [details] [review] Bug 18660: Translatability: Get rid of template directives [%% in translation for patroncards-errors.inc Translation for koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc contains a lot of (partial) template directives like: %%]%s %sLayout: [%% This patch fixes it To test: - Verify that code changes make sense - Apply patch - Create a translation (cd misc/translator , then: perl translate create aa-AA - Verify that in po/aa-AA-staff-prog.po contains no fragments like %%] or [%% for patroncards-errors.inc - Try to get an error: Try a link like http://[YOUR SERVER]/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=1&template_id=999&layout_id=999&start_card=1 ...where template_id and layout_id do not exist (Amended for comment #2 2017-06-05 mv) (Amended for comment #6 2017-08-02 mv) Created attachment 65433 [details] [review] [SIGNED-OFF] Bug 18660: Translatability: Get rid of template directives [%% in translation for patroncards-errors.inc Translation for koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc contains a lot of (partial) template directives like: %%]%s %sLayout: [%% This patch fixes it To test: - Verify that code changes make sense - Apply patch - Create a translation (cd misc/translator , then: perl translate create aa-AA - Verify that in po/aa-AA-staff-prog.po contains no fragments like %%] or [%% for patroncards-errors.inc - Try to get an error: Try a link like http://[YOUR SERVER]/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=1&template_id=999&layout_id=999&start_card=1 ...where template_id and layout_id do not exist (Amended for comment #2 2017-06-05 mv) (Amended for comment #6 2017-08-02 mv) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 66639 [details] [review] Bug 18660: Translatability: Get rid of template directives [%% in translation for patroncards-errors.inc Translation for koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc contains a lot of (partial) template directives like: %%]%s %sLayout: [%% This patch fixes it To test: - Verify that code changes make sense - Apply patch - Create a translation (cd misc/translator , then: perl translate create aa-AA - Verify that in po/aa-AA-staff-prog.po contains no fragments like %%] or [%% for patroncards-errors.inc - Try to get an error: Try a link like http://[YOUR SERVER]/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=1&template_id=999&layout_id=999&start_card=1 ...where template_id and layout_id do not exist (Amended for comment #2 2017-06-05 mv) (Amended for comment #6 2017-08-02 mv) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x, will be in 17.05.04. This patch has been pushed to 16.11.x and will be in 16.11.12. Pushed to 16.05.x, for 16.05.17 release |