[Bug 18754] New: Translatability: Get rid of exposed tt directives in opac-detail.tt
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Bug ID: 18754 Summary: Translatability: Get rid of exposed tt directives in opac-detail.tt Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial 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 The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with. Some examples from po file are: $[% SUBFIELD.code %] [% SUBFIELD.value %] %s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => " "normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%] See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END " "%] -- 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=18754 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 64132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64132&action=edit Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt Work in progress, not yet ready for testing. -- 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=18754 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=18754 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64132|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 64178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64178&action=edit Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with. Some examples from po file are: $[% SUBFIELD.code %] [% SUBFIELD.value %] %s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => " "normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%] See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END " "%] To test: - Apply patch - Do a search in OPAC that has more than 1 results - Go to the detail page of one of the items found - Verify that the details display as before and that you can browse the results with Previous and Next - In staff client, change OPACXSLTDetailsDisplay from 'default' to empty for "no xslt" and repeat steps above - In staff client, set HTML5MediaEnabled to 'OPAC' or 'OPAC and staff client' - Verify that media catalogued in field 856 still work - Create a new translation for a 'language' aa-AA (perl translate create aa-AA) - Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #3 from Marc Véron <veron@veron.ch> --- Still applies on current master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64178|0 |1 is obsolete| | --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 65412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65412&action=edit Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with. Some examples from po file are: $[% SUBFIELD.code %] [% SUBFIELD.value %] %s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => " "normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%] See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END " "%] To test: - Apply patch - Do a search in OPAC that has more than 1 results - Go to the detail page of one of the items found - Verify that the details display as before and that you can browse the results with Previous and Next - In staff client, change OPACXSLTDetailsDisplay from 'default' to empty for "no xslt" and repeat steps above - In staff client, set HTML5MediaEnabled to 'OPAC' or 'OPAC and staff client' - Verify that media catalogued in field 856 still work - Create a new translation for a 'language' aa-AA (perl translate create aa-AA) - Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po Followed test plan which works as intended 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=18754 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I am wondering if constructions like those below should be considered as improvements to the template (recognizing translation benefits). But as always, we have to find some balance. [% IF ( collectionvolume ) %] [% ' ; ' _ collectionvolume %] [% END %] [% ' ( ' _ (itemloop.size || 0) _ ' )' %] Another QA/RM opinion please. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Given the number of hard-to-read lines, I would not mark this one as trivial btw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #7 from Marc Véron <veron@veron.ch> --- (In reply to Marcel de Rooy from comment #6)
Given the number of hard-to-read lines, I would not mark this one as trivial btw.
Who can better deal with code - translators or developers? We should avoid to expose code or code fragents to translators IMO, otherwise we risk that translators break something. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- I would vote for added complexity in the templates in order to make translation easier. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Just a note about BLOCK..INCLUDE versus BLOCK..PROCESS: The PROCESS directive is slightly faster than INCLUDE because it avoids the need to localise (i.e. copy) the variable stash before processing the template. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=18754 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65412|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 65504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65504&action=edit Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with. Some examples from po file are: $[% SUBFIELD.code %] [% SUBFIELD.value %] %s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => " "normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%] See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END " "%] To test: - Apply patch - Do a search in OPAC that has more than 1 results - Go to the detail page of one of the items found - Verify that the details display as before and that you can browse the results with Previous and Next - In staff client, change OPACXSLTDetailsDisplay from 'default' to empty for "no xslt" and repeat steps above - In staff client, set HTML5MediaEnabled to 'OPAC' or 'OPAC and staff client' - Verify that media catalogued in field 856 still work - Create a new translation for a 'language' aa-AA (perl translate create aa-AA) - Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po Followed test plan which works as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 65505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65505&action=edit Bug 18754: [QA Follow-up] Tiny corrections Converted one INCLUDE directive to PROCESS; we are not changing variables here. (The PROCESS directive is slightly faster than INCLUDE because it avoids the need to localise (i.e. copy) the variable stash before processing the template.) Removed one vim inserted letter i. Error in [% IF ( XISBN.publicationyear ) _ ', ' _ XISBN.publicationyear %][% END %] The concatenation became part of the condition. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Severity|trivial |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marc Véron from comment #7)
(In reply to Marcel de Rooy from comment #6)
Given the number of hard-to-read lines, I would not mark this one as trivial btw.
Who can better deal with code - translators or developers? We should avoid to expose code or code fragents to translators IMO, otherwise we risk that translators break something.
(In reply to Owen Leonard from comment #8)
I would vote for added complexity in the templates in order to make translation easier.
Okay. Send it to the next level. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 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=18754 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.13. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #16 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.18 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19913 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19913 [Bug 19913] Embedded HTML5 videos are broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18754 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org