Bug 22783 - 'Location' not picked up by translation toolchain
Summary: 'Location' not picked up by translation toolchain
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
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: 2020-06-04 20:33 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
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, Mark Tompsett
Details | Diff | Splinter Review
Bug 22783: Make 'OPAC News' string translatable (1.25 KB, patch)
2019-06-17 15:03 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 22783: (follow up) not SET for anonymous BLOCK (1.29 KB, patch)
2019-06-17 15:03 UTC, Mark 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 Mark 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 Mark Tompsett 2019-06-17 15:00:08 UTC
Created attachment 90674 [details] [review]
Bug 22783: (follow up) not SET for anonymous BLOCK
Comment 5 Mark 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 Mark 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 Mark 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