[Bug 18665] New: Translatability: Add tt filter to allow html tags inside tt directives
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Bug ID: 18665 Summary: Translatability: Add tt filter to allow html tags inside tt directives Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr HTML tags inside template toolkit directives are not allowed because of translation issues. Instead of having many workaround in tt files it would be nice to have a filter that handles HTML tags. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 63697 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63697&action=edit Bug 18665 - Translatability: Add tt filter to allow html tags inside tt directives HTML tags inside template toolkit directives are not allowed because of translation issues. Add a filter that handles HTML tags. To test: - Apply patch - Add [% USE HtmlTags %] to the top of a tt file - Add something like [% My nice title | $HtmlTags tag="h1" %] to the tt file - Verify that in output 'My nice title' has h1 tags - Change template directive to something like [% My nice title | $HtmlTags tag="h1" attributes='title="This is a nice title attribute"' %] - Verify that title attribute displays in output (source code or tooltip on 'My nice title') Notes: - Tests are planned for a second patch - Update for Wiki coding guidelines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff --- Comment #2 from Marc Véron <veron@veron.ch> --- Setting to NSO to get comments. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 63721 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63721&action=edit Bug 18665: Add test for HtmlTags.pm This patch adds tests for the tt filter HtmlTags.pm To test: prove -v t/HtmlTags.t should pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18629 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18629 [Bug 18629] Translatability: Fix problems with web installer 17.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18684 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18684 [Bug 18684] Get rid of %%] in translation for currency.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 63754 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63754&action=edit Bug 15465: Fix typo in bugs.k-c.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63754|0 |1 is obsolete| | --- Comment #5 from Marc Véron <veron@veron.ch> --- Comment on attachment 63754 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63754 Bug 15465: Fix typo in bugs.k-c.org Hmm, mistaked... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63697|0 |1 is obsolete| | --- Comment #6 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 63765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63765&action=edit Bug 18665 - Translatability: Add tt filter to allow html tags inside tt directives HTML tags inside template toolkit directives are not allowed because of translation issues. Add a filter that handles HTML tags. Note you need to write quotes ' around the text you want displayed as a heading To test: - Apply patch - Add [% USE HtmlTags %] to the top of a tt file - Add something like [% 'My nice title' | $HtmlTags tag="h1" %] to the tt file - Verify that in output 'My nice title' has h1 tags - Change template directive to something like [% 'My nice title' | $HtmlTags tag="h1" attributes='title="This is a nice title attribute"' %] - Verify that title attribute displays in output (source code or tooltip on 'My nice title') Notes: - Tests are planned for a second patch - Update for Wiki coding guidelines Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63721|0 |1 is obsolete| | --- Comment #7 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 63766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63766&action=edit Bug 18665: Add test for HtmlTags.pm This patch adds tests for the tt filter HtmlTags.pm To test: prove -v t/HtmlTags.t should pass Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |alexbuckley@catalyst.net.nz --- Comment #8 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Marc I tested and found that the patches work nicely and all tests pass but your test plan is missing that you need to write quote marks ' around the text My nice title in order for it to be displayed correctly with this patch applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 --- Comment #9 from Marc Véron <veron@veron.ch> --- (In reply to Alex Buckley from comment #8)
Hi Marc
I tested and found that the patches work nicely and all tests pass but your test plan is missing that you need to write quote marks ' around the text My nice title in order for it to be displayed correctly with this patch applied.
Thanks for testing, Alex, and thanks for fixing my test plan! Marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63765|0 |1 is obsolete| | Attachment #63766|0 |1 is obsolete| | --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 64415 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64415&action=edit Bug 18665 - Translatability: Add tt filter to allow html tags inside tt directives HTML tags inside template toolkit directives are not allowed because of translation issues. Add a filter that handles HTML tags. Note you need to write quotes ' around the text you want displayed as a heading To test: - Apply patch - Add [% USE HtmlTags %] to the top of a tt file - Add something like [% 'My nice title' | $HtmlTags tag="h1" %] to the tt file - Verify that in output 'My nice title' has h1 tags - Change template directive to something like [% 'My nice title' | $HtmlTags tag="h1" attributes='title="This is a nice title attribute"' %] - Verify that title attribute displays in output (source code or tooltip on 'My nice title') Notes: - Tests are planned for a second patch - Update for Wiki coding guidelines Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 --- Comment #11 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 64416 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64416&action=edit Bug 18665: Add test for HtmlTags.pm This patch adds tests for the tt filter HtmlTags.pm To test: prove -v t/HtmlTags.t should pass Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org