Bug 18779 - Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC)
Summary: Translatability: Get rid of exposed tt directives in authorities-search-resul...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-12 06:19 UTC by Marc Véron
Modified: 2019-10-14 19:57 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC) (3.29 KB, patch)
2017-06-12 06:24 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC) (3.36 KB, patch)
2017-08-01 14:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC) (3.43 KB, patch)
2017-08-30 19:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2017-06-12 06:19:34 UTC
The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc exposes template directives to translation where translators should not be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "
Comment 1 Marc Véron 2017-06-12 06:24:18 UTC
Created attachment 64190 [details] [review]
Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC)

The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc exposes template directives to translation where translators should not be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "

To test:
- Apply patch
- Verify that Authority search in OPAC works as before
- Bonus test: create a new language 'aa-AA', verify that line above does not
show up in aa-AA-opac-bootstrap.po
Comment 2 Katrin Fischer 2017-06-12 06:26:06 UTC
Hm, could we generally exclude every element starting with [%% instead of doing those one by one?
Comment 3 Marc Véron 2017-06-12 07:44:07 UTC
(In reply to Katrin Fischer from comment #2)
> Hm, could we generally exclude every element starting with [%% instead of
> doing those one by one?

Line breaks inside template directives are not easy to cover by the translation process. You can not skip them because they can contain particles that should be translated. 

See following comment:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16559#c1

Jonathan recently added a test to QA tools. The newest version checks for line breaks inside tt directives.

It makes sense to weed out such tt directives because translators should not be exposed to such code internals. 

BTW: For OPAC, all occurences of "[%%" are fixed with my series of patches (search for: translatability).

For staff, most work is done as well.
Comment 4 Marc Véron 2017-07-20 08:09:58 UTC
Still applies on current master
Comment 5 Owen Leonard 2017-08-01 14:31:57 UTC
Created attachment 65398 [details] [review]
[SIGNED-OFF] Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC)

The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc
exposes template directives to translation where translators should not
be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "

To test:
- Apply patch
- Verify that Authority search in OPAC works as before
- Bonus test: create a new language 'aa-AA', verify that line above
  does not show up in aa-AA-opac-bootstrap.po

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Jonathan Druart 2017-08-30 19:36:33 UTC
Created attachment 66642 [details] [review]
Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC)

The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc
exposes template directives to translation where translators should not
be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "

To test:
- Apply patch
- Verify that Authority search in OPAC works as before
- Bonus test: create a new language 'aa-AA', verify that line above
  does not show up in aa-AA-opac-bootstrap.po

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2017-08-30 20:00:39 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-09-29 13:50:59 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 9 Katrin Fischer 2017-10-01 22:31:48 UTC
This patch has been pushed to 16.11.x and will be in 16.11.13.
Comment 10 Mason James 2017-11-23 22:11:06 UTC
Pushed to 16.05.x, for 16.05.18 release