Bug 24068 - Koha::Template::Plugin::I18N->tnpx should call Koha::I18->__npx
Summary: Koha::Template::Plugin::I18N->tnpx should call Koha::I18->__npx
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 15395
Blocks: 23591
  Show dependency treegraph
 
Reported: 2019-11-19 16:25 UTC by Jonathan Druart
Modified: 2019-11-22 15:00 UTC (History)
2 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


Attachments
Bug 24068: Fix I18 plugin - tnpx must call __npx (1.52 KB, patch)
2019-11-19 16:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24068: Fix I18 plugin - tnpx must call __npx (1.59 KB, patch)
2019-11-22 14:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24068: (RM follow-up) Enhance the POD (3.28 KB, patch)
2019-11-22 14:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24068: (RM follow-up) Enhance the POD (3.41 KB, patch)
2019-11-22 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2019-11-19 16:25:16 UTC
It calls __np
Comment 1 Jonathan Druart 2019-11-19 16:31:20 UTC
Created attachment 95578 [details] [review]
Bug 24068: Fix I18 plugin - tnpx must call __npx

Test plan:
Use the following code to test this change
    [% PROCESS 'i18n.inc' %]
    [% SET nb_stuffs = 1 %]
    [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw  %]
    [% SET nb_stuffs = 42 %]
    [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw  %]

Compare with and without the patch
Comment 2 Martin Renvoize 2019-11-22 14:48:24 UTC
Created attachment 95729 [details] [review]
Bug 24068: Fix I18 plugin - tnpx must call __npx

Test plan:
Use the following code to test this change
    [% PROCESS 'i18n.inc' %]
    [% SET nb_stuffs = 1 %]
    [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw  %]
    [% SET nb_stuffs = 42 %]
    [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw  %]

Compare with and without the patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2019-11-22 14:48:27 UTC
Created attachment 95730 [details] [review]
Bug 24068: (RM follow-up) Enhance the POD
Comment 4 Martin Renvoize 2019-11-22 14:49:57 UTC
Works well and is an obvious correction to a typo.. Signing off and Passing QA in one hit...  I've also enhanced the documentation for the module a bit.
Comment 5 Martin Renvoize 2019-11-22 14:51:14 UTC
Created attachment 95731 [details] [review]
Bug 24068: (RM follow-up) Enhance the POD
Comment 6 Martin Renvoize 2019-11-22 14:58:34 UTC
Nice work!

Pushed to master for 19.11.00