From: Jan Schneider Date: Fri, 22 Oct 2010 14:11:00 +0000 (+0200) Subject: bin/ is the new scripts/. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2c90546167ee7ce108584a314d11b780dd568f8b;p=horde.git bin/ is the new scripts/. --- diff --git a/components/bin/horde-components b/components/bin/horde-components new file mode 100755 index 000000000..8bc171f65 --- /dev/null +++ b/components/bin/horde-components @@ -0,0 +1,18 @@ +#!/usr/bin/env php +ngettext($singular, $plural, $number); } diff --git a/framework/Translation/test/Horde/Translation/WrapperTest.php b/framework/Translation/test/Horde/Translation/WrapperTest.php index 53402e6c3..0084b112c 100644 --- a/framework/Translation/test/Horde/Translation/WrapperTest.php +++ b/framework/Translation/test/Horde/Translation/WrapperTest.php @@ -13,25 +13,24 @@ class Horde_Translation_WrapperTest extends Horde_Translation_TestBase { public function testWrappers() { - $this->assertEquals('Heute', Horde_Translation_TestWrapper::t('Today')); $this->assertEquals('1 Woche', sprintf(Horde_Translation_TestWrapper::ngettext('%d week', '%d weeks', 1), 1)); + $this->assertEquals('Heute', Horde_Translation_TestWrapper::t('Today')); } } class Horde_Translation_TestWrapper extends Horde_Translation { - /** - * Returns the translation of a message. - * - * @var string $message The string to translate. - * - * @return string The string translation, or the original string if no - * translation exists. - */ static public function t($message) { self::$_domain = 'Horde_Translation'; self::$_directory = 'locale'; return parent::t($message); } + + static public function ngettext($singular, $plural, $number) + { + self::$_domain = 'Horde_Translation'; + self::$_directory = 'locale'; + return parent::ngettext($singular, $plural, $number); + } }