Bug 18776 - Translatability: Get rid of exposed tt directives in opac-advsearch.tt
Summary: Translatability: Get rid of exposed tt directives in opac-advsearch.tt
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-11 14:32 UTC by Marc Véron
Modified: 2017-10-01 22:28 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt (6.03 KB, patch)
2017-06-11 14:59 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt (6.10 KB, patch)
2017-06-30 00:08 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt (6.16 KB, patch)
2017-08-30 19:40 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-11 14:32:11 UTC
The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with.
Example in po file:
"[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')."
"size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and "
"OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) "
"%%] "
Comment 1 Marc Véron 2017-06-11 14:59:15 UTC
Created attachment 64181 [details] [review]
Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt

The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with.
Example in po file:
"[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')."
"size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and "
"OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) "
"%%] "

To test:
- Apply patch
- Verify that advanced search in OPAC behaves as before
- 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
Comment 2 M. Tompsett 2017-06-30 00:08:33 UTC
Created attachment 64734 [details] [review]
[SIGNED-OFF] Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt

The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with.
Example in po file:
"[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')."
"size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and "
"OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) "
"%%] "

To test:
- Apply patch
- Verify that advanced search in OPAC behaves as before
- 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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 M. Tompsett 2017-06-30 00:08:53 UTC
TEST PLAN ON KOHADEVBOX
-----------------------
sudo koha-shell -c bash kohadev
echo $PERL5LIB
-- notice that misc/translator is missing
export PERL5LIB=$PERL5LIB:/home/vagrant/kohaclone/misc/translator
cd /home/vagrant/kohaclone/misc/translator
perl translate create aa-AA
exit
git bz apply 18776
sudo koha-shell -c bash kohadev
export PERL5LIB=$PERL5LIB:/home/vagrant/kohaclone/misc/translator
cd /home/vagrant/kohaclone/misc/translator
perl translate create aa-AB
diff po/aa-AA-opac-bootstrap.po po/aa-AB-opac-bootstrap.po
-- notice that only AA has differences, except for a generation date.
-- be confused that 3 weren't in AA in the first place, even though
   they have the same line breaks, and formatting.
qa -v 2 -c 1
cd po
rm -f aa-A*
exit
-- sign off
Comment 4 Jonathan Druart 2017-08-30 19:40:49 UTC
Created attachment 66647 [details] [review]
Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt

The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with.
Example in po file:
"[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')."
"size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and "
"OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) "
"%%] "

To test:
- Apply patch
- Verify that advanced search in OPAC behaves as before
- 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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2017-08-30 19:59:51 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin SOMERS 2017-09-29 13:46:46 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 7 Katrin Fischer 2017-10-01 22:28:41 UTC
This patch has been pushed to 16.11.x and will be in 16.11.13.