Bugzilla – Attachment 95729 Details for
Bug 24068
Koha::Template::Plugin::I18N->tnpx should call Koha::I18->__npx
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24068: Fix I18 plugin - tnpx must call __npx
Bug-24068-Fix-I18-plugin---tnpx-must-call-npx.patch (text/plain), 1.59 KB, created by
Martin Renvoize (ashimema)
on 2019-11-22 14:48:24 UTC
(
hide
)
Description:
Bug 24068: Fix I18 plugin - tnpx must call __npx
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-11-22 14:48:24 UTC
Size:
1.59 KB
patch
obsolete
>From 0ee38ea001c2217ecd1dc490c55f2040e0803c77 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 19 Nov 2019 17:26:52 +0100 >Subject: [PATCH] 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> >--- > Koha/Template/Plugin/I18N.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Template/Plugin/I18N.pm b/Koha/Template/Plugin/I18N.pm >index 976c13927f..37ef1ea5ec 100644 >--- a/Koha/Template/Plugin/I18N.pm >+++ b/Koha/Template/Plugin/I18N.pm >@@ -117,7 +117,7 @@ sub tpx { > > =head2 tnp > >- [% I18N.tnp("context", "item", "items") %] >+ [% I18N.tnp("context", "item", "items", count) %] > > =cut > >@@ -128,13 +128,13 @@ sub tnp { > > =head2 tnpx > >- [% I18N.tnpx("context", "{count} item", "{count} items", { count = count }) %] >+ [% I18N.tnpx("context", "{count} item", "{count} items", count, { count = count }) %] > > =cut > > sub tnpx { > my ($self, $msgctxt, $msgid, $msgid_plural, $count, $vars) = @_; >- return __np($msgctxt, $msgid, $msgid_plural, $count, %$vars); >+ return __npx($msgctxt, $msgid, $msgid_plural, $count, %$vars); > } > > 1; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24068
:
95578
| 95729 |
95730
|
95731