Bug 22783 - 'Location' not picked up by translation toolchain
Summary: 'Location' not picked up by translation toolchain
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 22318
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-26 13:50 UTC by Martin Renvoize
Modified: 2019-07-03 17:55 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.11.02


Attachments
Bug 22783: Make 'OPAC News' string translatable (1.22 KB, patch)
2019-04-26 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22783: (follow up) not SET for anonymous BLOCK (1.15 KB, patch)
2019-06-17 15:00 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 22783: Make 'OPAC News' string translatable (1.25 KB, patch)
2019-06-17 15:03 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 22783: (follow up) not SET for anonymous BLOCK (1.29 KB, patch)
2019-06-17 15:03 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 22783: Make 'OPAC News' string translatable (1.30 KB, patch)
2019-06-17 20:30 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22783: (follow up) not SET for anonymous BLOCK (1.35 KB, patch)
2019-06-17 20:30 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-04-26 13:50:28 UTC
(In reply to paxed from bug 22318 comment #28)
> This is not picked up by the translation toolchain:
> 
> koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt:                 
> [% SET location = "OPAC news" %]

Moving this to it's own bug to get some attention.
Comment 1 Martin Renvoize 2019-04-26 13:50:54 UTC
Suggested fix (also from paxed) is:

[% SET location = BLOCK %]OPAC news[% END %]
Comment 2 Martin Renvoize 2019-04-26 13:53:29 UTC
Created attachment 88923 [details] [review]
Bug 22783: Make 'OPAC News' string translatable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 M. Tompsett 2019-06-17 14:42:52 UTC
Software error:
Template process failed: file error - parse error - /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt line 284: unexpected token (BLOCK)
  [% SET location = BLOCK %] at /home/vagrant/kohaclone/C4/Templates.pm line 122.

Same kind of explosion with plack.
Comment 4 M. Tompsett 2019-06-17 15:00:08 UTC
Created attachment 90674 [details] [review]
Bug 22783: (follow up) not SET for anonymous BLOCK
Comment 5 M. Tompsett 2019-06-17 15:03:46 UTC
Created attachment 90675 [details] [review]
Bug 22783: Make 'OPAC News' string translatable

The idea was to use an anonymous block

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 6 M. Tompsett 2019-06-17 15:03:48 UTC
Created attachment 90676 [details] [review]
Bug 22783: (follow up) not SET for anonymous BLOCK

Fixed syntax.
http://www.template-toolkit.org/docs/manual/Directives.html#section_BLOCK

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 7 M. Tompsett 2019-06-17 15:06:39 UTC
Test plan is to navigate in the staff client to the News

Home -> Tools -> News
And have at least one item that is in the OPAC News, not NavRight, position.
Before and after should be the same, if no translation is done.
If translation is done, Opac News can be translated after the patch is applied.
Comment 8 Katrin Fischer 2019-06-17 20:30:29 UTC
Created attachment 90696 [details] [review]
Bug 22783: Make 'OPAC News' string translatable

The idea was to use an anonymous block

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2019-06-17 20:30:33 UTC
Created attachment 90697 [details] [review]
Bug 22783: (follow up) not SET for anonymous BLOCK

Fixed syntax.
http://www.template-toolkit.org/docs/manual/Directives.html#section_BLOCK

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Martin Renvoize 2019-06-18 09:07:42 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin SOMERS 2019-07-02 09:09:11 UTC
Pushed to 19.05.x for 19.05.02
Comment 12 Lucas Gass 2019-07-03 17:55:21 UTC
missing dependency for 18.11.x series, no backport