Bugzilla – Attachment 168956 Details for
Bug 36357
Add Template::Toolkit filters for internationalization (I18N)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36357: Tidy xgettext-tt2.t
Bug-36357-Tidy-xgettext-tt2t.patch (text/plain), 3.19 KB, created by
Victor Grousset/tuxayo
on 2024-07-15 03:17:04 UTC
(
hide
)
Description:
Bug 36357: Tidy xgettext-tt2.t
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-07-15 03:17:04 UTC
Size:
3.19 KB
patch
obsolete
>From 64b88f03faaf71122948a687d3c28a56bba55da2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 20 Mar 2024 11:10:39 +0000 >Subject: [PATCH] Bug 36357: Tidy xgettext-tt2.t > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > t/db_dependent/misc/translator/xgettext-tt2.t | 36 +++++++++---------- > 1 file changed, 18 insertions(+), 18 deletions(-) > >diff --git a/t/db_dependent/misc/translator/xgettext-tt2.t b/t/db_dependent/misc/translator/xgettext-tt2.t >index 3f8e4b0069..d9493051f4 100755 >--- a/t/db_dependent/misc/translator/xgettext-tt2.t >+++ b/t/db_dependent/misc/translator/xgettext-tt2.t >@@ -4,16 +4,16 @@ use Modern::Perl; > > use File::Slurp; > use File::Temp qw(tempdir); >-use FindBin qw($Bin); >+use FindBin qw($Bin); > use Locale::PO; > use Test::More tests => 43; > >-my $tempdir = tempdir(CLEANUP => 1); >+my $tempdir = tempdir( CLEANUP => 1 ); > >-write_file("$tempdir/files", "$Bin/sample.tt"); >+write_file( "$tempdir/files", "$Bin/sample.tt" ); > >-my $xgettext_cmd = "$Bin/../../../../misc/translator/xgettext-tt2 --from-code=UTF-8 " >- . "-o $tempdir/Koha.pot -f $tempdir/files"; >+my $xgettext_cmd = >+ "$Bin/../../../../misc/translator/xgettext-tt2 --from-code=UTF-8 " . "-o $tempdir/Koha.pot -f $tempdir/files"; > > system($xgettext_cmd); > my $pot = Locale::PO->load_file_asarray("$tempdir/Koha.pot"); >@@ -26,30 +26,30 @@ my @expected = ( > msgid => '"hello {name}"', > }, > { >- msgid => '"item"', >+ msgid => '"item"', > msgid_plural => '"items"', > }, > { >- msgid => '"{count} item"', >+ msgid => '"{count} item"', > msgid_plural => '"{count} items"', > }, > { >- msgid => '"hello"', >+ msgid => '"hello"', > msgctxt => '"context"', > }, > { >- msgid => '"hello {name}"', >+ msgid => '"hello {name}"', > msgctxt => '"context"', > }, > { >- msgid => '"item"', >+ msgid => '"item"', > msgid_plural => '"items"', >- msgctxt => '"context"', >+ msgctxt => '"context"', > }, > { >- msgid => '"{count} item"', >+ msgid => '"{count} item"', > msgid_plural => '"{count} items"', >- msgctxt => '"context"', >+ msgctxt => '"context"', > }, > { > msgid => '"status is {status}"', >@@ -67,17 +67,17 @@ my @expected = ( > msgid => '"with filter"', > }, > { >- msgid => '"filter singular"', >+ msgid => '"filter singular"', > msgid_plural => '"filter plural"', > }, > ); > >-for (my $i = 0; $i < @expected; $i++) { >+for ( my $i = 0 ; $i < @expected ; $i++ ) { > for my $key (qw(msgid msgid_plural msgctxt)) { >- my $expected = $expected[$i]->{$key}; >+ my $expected = $expected[$i]->{$key}; > my $expected_str = defined $expected ? $expected : 'not defined'; >- is($pot->[$i + 1]->$key, $expected, "$i: $key is $expected_str"); >+ is( $pot->[ $i + 1 ]->$key, $expected, "$i: $key is $expected_str" ); > } > } > >-is(@$pot, 1 + @expected, "No more strings than expected"); >+is( @$pot, 1 + @expected, "No more strings than expected" ); >-- >2.45.2
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 36357
:
163380
|
163381
|
163521
|
163522
|
163523
|
163524
|
163597
|
168955
| 168956 |
168957
|
168958
|
168959
|
168962
|
168963