From a03978d656c573776729859d54c2b904fb55e797 Mon Sep 17 00:00:00 2001 From: Mauro Cassani Date: Mon, 21 Mar 2022 10:41:11 +0100 Subject: [PATCH] SprinfLocker (added hu-HU) --- src/Filters/Sprintf/language/hu-HU/not_allowed.php | 13 ++----------- tests/MateCatSubFilteringTest.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Filters/Sprintf/language/hu-HU/not_allowed.php b/src/Filters/Sprintf/language/hu-HU/not_allowed.php index 7a6386c..44f53fa 100644 --- a/src/Filters/Sprintf/language/hu-HU/not_allowed.php +++ b/src/Filters/Sprintf/language/hu-HU/not_allowed.php @@ -1,16 +1,7 @@ [ - 'type' => 'exact' - ], - '%-ot' => [ - 'type' => 'exact' - ], - '%-kal' => [ - 'type' => 'exact' - ], - '%-ban' => [ - 'type' => 'exact' + '%-[a-zA-Z]{1,3}' => [ + 'type' => 'regex' ], ]; \ No newline at end of file diff --git a/tests/MateCatSubFilteringTest.php b/tests/MateCatSubFilteringTest.php index 00698a8..78c9664 100644 --- a/tests/MateCatSubFilteringTest.php +++ b/tests/MateCatSubFilteringTest.php @@ -245,7 +245,8 @@ public function testHTMLFromLayer2() { ************************** */ - public function testSprintf() { + public function testSprintf() + { $channel = new Pipeline( 'hu-HU', 'az-AZ' ); $channel->addLast( new SprintfToPH() ); @@ -258,6 +259,14 @@ public function testSprintf() { $seg_transformed = $channel->transform( $segment ); $this->assertEquals( $segment, $seg_transformed ); + + $channel = new Pipeline( 'hu-HU', 'it-IT' ); + $channel->addLast( new SprintfToPH() ); + + $segment = 'Legalább 10%-aaa befejezett foglalás 20%-bbb VAGY'; + $seg_transformed = $channel->transform( $segment ); + + $this->assertEquals( $segment, $seg_transformed ); } /**