From: Gunnar Wrobel
Date: Fri, 22 Oct 2010 23:13:51 +0000 (+0200)
Subject: Add the translation static.
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5038089a82e158e2b8cac22cfb54bebc13cc2ae8;p=horde.git
Add the translation static.
---
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 @@
-