Bug 18648 - Translatability: Get rid of tt directives in translation for macles.tt
Summary: Translatability: Get rid of tt directives in translation for macles.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:
: 18769 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-21 17:43 UTC by Marc Véron
Modified: 2017-07-31 11:17 UTC (History)
6 users (show)

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


Attachments
Bug 18648 - Translatability: Get rid of tt directives in translation for macles.tt (1.82 KB, patch)
2017-05-21 17:50 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18648 - Translatability: Get rid of tt directives in translation for macles.tt (1.88 KB, patch)
2017-05-22 08:20 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18648: Translatability: Get rid of tt directives in translation for macles.tt (1.90 KB, patch)
2017-05-30 19:13 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18648: Translatability: Get rid of tt directives in translation for macles.tt (1.98 KB, patch)
2017-06-05 20:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18648: Fix syntax 'unexpected end of input' (1.32 KB, patch)
2017-06-06 14:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18648: Restore hyphen (1.41 KB, patch)
2017-06-09 16:04 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18648: Restore hyphen (1.30 KB, patch)
2017-06-09 16:24 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-05-21 17:43:27 UTC
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt contains template directives inside a div tag:
<span title="[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]">
This is exposed in translation tool.
Comment 1 Marc Véron 2017-05-21 17:50:16 UTC
Created attachment 63592 [details] [review]
Bug 18648 - Translatability: Get rid of tt directives in translation for macles.tt

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt contains
template directives inside a div tag:
<span title="[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]">
This is exposed in translation tool.

To test:
- Carefully examine code changes
- Apply patch, verify that the directive is no longer exposed (picked for
  po files)
- If you know where / how this macles is used, verify that it behaves as before
Comment 2 Josef Moravec 2017-05-22 08:20:38 UTC
Created attachment 63599 [details] [review]
[SIGNED-OFF] Bug 18648 - Translatability: Get rid of tt directives in translation for macles.tt

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt contains
template directives inside a div tag:
<span title="[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]">
This is exposed in translation tool.

To test:
- Carefully examine code changes
- Apply patch, verify that the directive is no longer exposed (picked for
  po files)
- If you know where / how this macles is used, verify that it behaves as before

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Marc Véron 2017-05-30 18:36:18 UTC
Found an issue - needs some more workk...
Comment 4 Marc Véron 2017-05-30 19:13:39 UTC
Created attachment 63853 [details] [review]
Bug 18648: Translatability: Get rid of tt directives in translation for macles.tt

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt contains
template directives inside a div tag:
<span title="[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]">
This is exposed in translation tool.

To test:
- Carefully examine code changes
- Apply patch, verify that the directive is no longer exposed (picked for
  po files), e.g. by creating a new "language" aa-AA and examing aa-AA-staff-prog.po
- If you know where / how this macles is used, verify that it behaves as before

(Note: New patch, needs new sign off)
Comment 5 Jonathan Druart 2017-06-05 20:01:12 UTC
Created attachment 63987 [details] [review]
Bug 18648: Translatability: Get rid of tt directives in translation for macles.tt

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt contains
template directives inside a div tag:
<span title="[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]">
This is exposed in translation tool.

To test:
- Carefully examine code changes
- Apply patch, verify that the directive is no longer exposed (picked for
  po files), e.g. by creating a new "language" aa-AA and examing aa-AA-staff-prog.po
- If you know where / how this macles is used, verify that it behaves as before

(Note: New patch, needs new sign off)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2017-06-05 20:17:35 UTC
Trivial, skipping QA.
Comment 7 Jonathan Druart 2017-06-06 14:06:59 UTC
Created attachment 64060 [details] [review]
Bug 18648: Fix syntax 'unexpected end of input'
Comment 8 Jonathan Druart 2017-06-06 19:02:15 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 9 Jonathan Druart 2017-06-06 19:03:14 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 10 Fridolin SOMERS 2017-06-09 15:03:00 UTC
This patch removes the hyphen separator : 
[% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]
replaced by :
[% FOREACH lib IN cell.libs %][% lib.lib |html %][% END %]

Is is normal ?
Comment 11 Marc Véron 2017-06-09 15:29:05 UTC
(In reply to Fridolin SOMERS from comment #10)
> This patch removes the hyphen separator : 
> [% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]
> replaced by :
> [% FOREACH lib IN cell.libs %][% lib.lib |html %][% END %]
> 
> Is is normal ?

No, sorry, that's my error, thanks for pointing it out.
Since it is already pushed to master I will file a new bug.
Comment 12 Marc Véron 2017-06-09 15:39:01 UTC
*** Bug 18769 has been marked as a duplicate of this bug. ***
Comment 13 Marc Véron 2017-06-09 15:41:02 UTC
(In reply to Marc Véron from comment #11)
> (In reply to Fridolin SOMERS from comment #10)
> > This patch removes the hyphen separator : 
> > [% FOREACH lib IN cell.libs %][% lib.lib |html %] - [% END %]
> > replaced by :
> > [% FOREACH lib IN cell.libs %][% lib.lib |html %][% END %]
> > 
> > Is is normal ?
> 
> No, sorry, that's my error, thanks for pointing it out.
> Since it is already pushed to master I will file a new bug.

Patch follows on this bug
Comment 14 Marc Véron 2017-06-09 16:04:54 UTC
Created attachment 64160 [details] [review]
Bug 18648: Restore hyphen

See comment #10
Hyphen restored and moved as string inside the tt directive to avoid that it
is picked for translation.
Comment 15 Jonathan Druart 2017-06-09 16:24:43 UTC
Created attachment 64162 [details] [review]
Bug 18648: Restore hyphen
Comment 16 Jonathan Druart 2017-06-09 16:26:43 UTC
(In reply to Marc Véron from comment #14)
> Created attachment 64160 [details] [review] [review]
> Bug 18648: Restore hyphen
> 
> See comment #10
> Hyphen restored and moved as string inside the tt directive to avoid that it
> is picked for translation.

This patch did not work:
Template process failed: file error - parse error - /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tt line 56: unexpected token (_)
Comment 17 Jonathan Druart 2017-06-09 16:27:00 UTC
(In reply to Jonathan Druart from comment #15)
> Created attachment 64162 [details] [review] [review]
> Bug 18648: Restore hyphen

Pushed to master!
Comment 18 Fridolin SOMERS 2017-06-12 08:33:05 UTC
Pushed to 17.05.x, will be in 17.05.01
Comment 19 Katrin Fischer 2017-06-13 05:32:08 UTC
This patch has been pushed to 16.11.x and will be in 16.11.09.
Comment 20 Mason James 2017-07-31 11:17:48 UTC
Pushed to 16.05.x, for 16.05.15 release