From 5038089a82e158e2b8cac22cfb54bebc13cc2ae8 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Sat, 23 Oct 2010 01:13:51 +0200 Subject: [PATCH] Add the translation static. --- framework/Itip/lib/Horde/Itip/Translation.php | 50 +++++++++++++++++++++++++++ framework/Itip/package.xml | 12 ++++--- 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 framework/Itip/lib/Horde/Itip/Translation.php diff --git a/framework/Itip/lib/Horde/Itip/Translation.php b/framework/Itip/lib/Horde/Itip/Translation.php new file mode 100644 index 000000000..716df81dc --- /dev/null +++ b/framework/Itip/lib/Horde/Itip/Translation.php @@ -0,0 +1,50 @@ + + * @package Itip + */ +class Horde_Itip_Translation 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_Itip'; + self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? '../../../locale' : '@data_dir@/Itip/locale'; + return parent::t($message); + } + + /** + * Returns the plural translation of a message. + * + * @param string $singular The singular version to translate. + * @param string $plural The plural version to translate. + * @param integer $number The number that determines singular vs. plural. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + static public function ngettext($singular, $plural, $number) + { + self::$_domain = 'Horde_Itip'; + self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? '../../../locale' : '@data_dir@/Itip/locale'; + return parent::ngettext($singular, $plural, $number); + } +} diff --git a/framework/Itip/package.xml b/framework/Itip/package.xml index 2551fe33a..36444d35a 100644 --- a/framework/Itip/package.xml +++ b/framework/Itip/package.xml @@ -1,5 +1,5 @@ - + Itip pear.horde.org iTip invitation response handling. @@ -23,8 +23,8 @@ jan@horde.org yes - 2010-10-22 - + 2010-10-23 + 0.1.0 0.1.0 @@ -68,6 +68,9 @@ + + + @@ -388,6 +391,7 @@ + @@ -506,7 +510,7 @@ alpha alpha - 2010-10-22 + 2010-10-23 LGPL * Extracted package from Kolab_Resource. -- 2.11.0