Bugzilla – Attachment 95578 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.52 KB, created by
Jonathan Druart
on 2019-11-19 16:31:20 UTC
(
hide
)
Description:
Bug 24068: Fix I18 plugin - tnpx must call __npx
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-19 16:31:20 UTC
Size:
1.52 KB
patch
obsolete
>From cb539507e15551391ac1666d93d450f592719c6e 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 >--- > 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.11.0
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