/** * Constructor. * * @param string $app The application that the shares belong * to * @param string $user The current user * @param Horde_Perms_Base $perms The permissions object * @param Horde_Group_Base $groups The Horde_Group driver. * */ public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups) { switch ($app) { case 'mnemo': case 'jonah': $this->_type = 'note'; break; case 'kronolith': $this->_type = 'event'; break; case 'turba': $this->_type = 'contact'; break; case 'nag': $this->_type = 'task'; break; default: throw new Horde_Share_Exception(sprintf(Horde_Share_Translation::t("The Horde/Kolab integration engine does not support \"%s\""), $app)); } parent::__construct($app, $user, $perms, $groups); }
/** * 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. */ public static function ngettext($singular, $plural, $number) { self::$_domain = 'Horde_Share'; self::$_directory = '@data_dir@' == '@' . 'data_dir' . '@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Share/locale'; return parent::ngettext($singular, $plural, $number); }