missing gettext messages
Hiromi Kimura <[email protected]> Sun, 06 Apr 2014 18:08:55 +0900 (JST)
| Newsgroups | gmane.comp.horde.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Some IMP library files missing gettext messages. I made the patch, please check it. -=-=-=-=- Hiromi Kimura, Tandem Accelerator Complex, University of Tsukuba, JAPAN -- i18n mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
imp-missmsg.diff
(text/x-patch, 10.8 KB)
--- imp/lib/Imap.php.orig 2014-04-04 08:30:29.000000000 +0900
+++ imp/lib/Imap.php 2014-04-06 15:24:22.000000000 +0900
@@ -248,7 +248,7 @@
}
if (($config = $this->loadServerConfig($skey)) === false) {
- $error = new IMP_Imap_Exception('Could not load server configuration.');
+ $error = new IMP_Imap_Exception(_("Could not load server configuration."));
Horde::log($error);
throw $error;
}
@@ -667,11 +667,11 @@
return $ob;
}
- throw new Horde_Exception_AuthenticationFailure('IMP is marked as authenticated, but no credentials can be found in the session.', Horde_Auth::REASON_SESSION);
+ throw new Horde_Exception_AuthenticationFailure(_("IMP is marked as authenticated, but no credentials can be found in the session."), Horde_Auth::REASON_SESSION);
}
if (!method_exists($this->_ob, $method)) {
- throw new BadMethodCallException(sprintf('%s: Invalid method call "%s".', __CLASS__, $method));
+ throw new BadMethodCallException(sprintf(_("%s: Invalid method call \"%s\"."), __CLASS__, $method));
}
switch ($method) {
@@ -759,7 +759,7 @@
if (!$this->_ob->getParam('imp:login')) {
/* Check for POP3 UIDL support. */
if ($this->isPop3() && !$this->queryCapability('UIDL')) {
- $error = new IMP_Imap_Exception('The POP3 server does not support the REQUIRED UIDL capability.');
+ $error = new IMP_Imap_Exception(_("The POP3 server does not support the REQUIRED UIDL capability."));
Horde::log($error);
throw $error;
}
--- imp/lib/Mailbox.php.orig 2014-04-04 08:30:29.000000000 +0900
+++ imp/lib/Mailbox.php 2014-04-06 15:32:18.000000000 +0900
@@ -243,7 +243,7 @@
public function __construct($mbox)
{
if (strlen($mbox) === 0) {
- throw new IMP_Exception('Mailbox name must not be empty.');
+ throw new IMP_Exception(_("Mailbox name must not be empty."));
}
$this->_mbox = $mbox;
--- imp/lib/Mailbox/List.php.orig 2014-04-04 08:30:29.000000000 +0900
+++ imp/lib/Mailbox/List.php 2014-04-06 17:31:52.000000000 +0900
@@ -871,7 +871,7 @@
*/
public function offsetSet($offset, $value)
{
- throw new BadMethodCallException('Not supported');
+ throw new BadMethodCallException(_("Not supported"));
}
/**
@@ -879,7 +879,7 @@
*/
public function offsetUnset($offset)
{
- throw new BadMethodCallException('Not supported');
+ throw new BadMethodCallException(_("Not supported"));
}
/* Countable methods. */
--- imp/lib/Compose/LinkedAttachment.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Compose/LinkedAttachment.php 2014-04-06 17:19:48.000000000 +0900
@@ -58,7 +58,7 @@
/* Sanity checking. */
if (empty($conf['compose']['link_attachments'])) {
- throw new IMP_Exception('Linked attachments are forbidden.');
+ throw new IMP_Exception(_("Linked attachments are forbidden.));
}
$this->_atc = $injector->getInstance('IMP_Factory_ComposeAtc')->create($user, $id);
--- imp/lib/Compose/References.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Compose/References.php 2014-04-06 17:20:30.000000000 +0900
@@ -88,7 +88,7 @@
}
}
- throw new Horde_Mail_Exception('Invalid Message-ID.');
+ throw new Horde_Mail_Exception(_("Invalid Message-ID."));
}
}
--- imp/lib/Contacts/Image.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Contacts/Image.php 2014-04-06 17:21:57.000000000 +0900
@@ -84,7 +84,7 @@
}
}
- throw new IMP_Exception('No backend found to generate contact image.');
+ throw new IMP_Exception(_("No backend found to generate contact image."));
}
}
--- imp/lib/Dynamic/Base.php.orig 2014-04-04 08:30:27.000000000 +0900
+++ imp/lib/Dynamic/Base.php 2014-04-06 17:23:38.000000000 +0900
@@ -202,7 +202,7 @@
static public function url(array $opts = array())
{
- throw new Exception('Missing implementation for url method.');
+ throw new Exception(_("Missing implementation for url method."));
}
/**
--- imp/lib/Factory/AuthImap.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Factory/AuthImap.php 2014-04-06 17:25:04.000000000 +0900
@@ -34,12 +34,12 @@
$admin = $injector->getInstance('IMP_Factory_Imap')->create()->config->admin;
if (!$admin) {
- throw new IMP_Exception('Admin access not enabled.');
+ throw new IMP_Exception(_("Admin access not enabled."));
}
$params = $registry->callByPackage('imp', 'server');
if (is_null($params)) {
- throw new IMP_Exception('No server parameters found.');
+ throw new IMP_Exception(_("No server parameters found."));
}
$params_map = array(
--- imp/lib/Factory/Quota.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Factory/Quota.php 2014-04-06 17:26:11.000000000 +0900
@@ -34,7 +34,7 @@
$qparams = $imap_ob->config->quota;
if (!isset($qparams['driver'])) {
- throw new IMP_Exception('Quota config missing driver parameter.');
+ throw new IMP_Exception(_("Quota config missing driver parameter."));
}
$driver = $qparams['driver'];
--- imp/lib/Quota/Imap.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Quota/Imap.php 2014-04-06 17:32:54.000000000 +0900
@@ -31,7 +31,7 @@
public function __construct(array $params = array())
{
if (!isset($params['imap_ob'])) {
- throw new InvalidArgumentException('Missing imap_ob parameter');
+ throw new InvalidArgumentException(_("Missing imap_ob parameter"));
}
parent::__construct($params);
--- imp/lib/Search.php.orig 2014-04-04 08:30:29.000000000 +0900
+++ imp/lib/Search.php 2014-04-06 15:36:02.000000000 +0900
@@ -115,14 +115,14 @@
case self::CREATE_QUERY:
$cname = 'IMP_Search_Query';
if (empty($opts['mboxes']) && empty($opts['subfolders'])) {
- throw new InvalidArgumentException('Search query requires at least one mailbox.');
+ throw new InvalidArgumentException(_("Search query requires at least one mailbox."));
}
break;
case self::CREATE_VFOLDER:
$cname = 'IMP_Search_Vfolder';
if (empty($opts['mboxes']) && empty($opts['subfolders'])) {
- throw new InvalidArgumentException('Search query requires at least one mailbox.');
+ throw new InvalidArgumentException(_("Search query requires at least one mailbox."));
}
break;
}
@@ -248,7 +248,7 @@
public function applyFilter($id, array $mboxes, $mid = null)
{
if (!$this->isFilter($id)) {
- throw new InvalidArgumentException('Invalid filter ID given.');
+ throw new InvalidArgumentException(_("Invalid filter ID given."));
}
if (!is_null($mid)) {
@@ -487,7 +487,7 @@
public function offsetSet($offset, $value)
{
if (!($value instanceof IMP_Search_Query)) {
- throw new InvalidArgumentException('$value must be a query object.');
+ throw new InvalidArgumentException(_("$value must be a query object."));
}
$id = $this->_strip($offset);
@@ -508,7 +508,7 @@
}
}
- throw new InvalidArgumentException('Creating search queries by array index is not supported. Use createQuery() instead.');
+ throw new InvalidArgumentException(_("Creating search queries by array index is not supported. Use createQuery() instead."));
}
/**
--- imp/lib/Search/Element.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Search/Element.php 2014-04-06 17:33:49.000000000 +0900
@@ -96,7 +96,7 @@
if (!is_array($data) ||
!isset($data[0]) ||
($data[0] != self::VERSION)) {
- throw new Exception('Cache version change');
+ throw new Exception(_("Cache version change"));
}
$this->_data = $data[1];
--- imp/lib/Search/Query.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Search/Query.php 2014-04-06 17:34:36.000000000 +0900
@@ -359,7 +359,7 @@
if (!is_array($data) ||
!isset($data['v']) ||
($data['v'] != self::VERSION)) {
- throw new Exception('Cache version change');
+ throw new Exception(_("Cache version change"));
}
if (isset($data['c'])) {
--- imp/lib/Sentmail/Mongo.php.orig 2014-04-04 08:30:29.000000000 +0900
+++ imp/lib/Sentmail/Mongo.php 2014-04-06 17:35:29.000000000 +0900
@@ -62,7 +62,7 @@
public function __construct(array $params = array())
{
if (!isset($params['mongo_db'])) {
- throw new InvalidArgumentException('Missing mongo_db parameter.');
+ throw new InvalidArgumentException(_("Missing mongo_db parameter."));
}
parent::__construct(array_merge(array(
--- imp/lib/Ftree/Element.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Ftree/Element.php 2014-04-06 17:28:34.000000000 +0900
@@ -84,7 +84,7 @@
*/
public function __sleep()
{
- throw new LogicException('Object can not be serialized.');
+ throw new LogicException(_("Object can not be serialized."));
}
/**
--- imp/lib/Ftree/IteratorFilter.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Ftree/IteratorFilter.php 2014-04-06 17:29:08.000000000 +0900
@@ -139,7 +139,7 @@
public function rewind()
{
if (!isset($this->iterator)) {
- throw new InvalidArgumentException('Missing iterator.');
+ throw new InvalidArgumentException(_("Missing iterator."));
}
$i = $this->iterator;
--- imp/lib/Ftree/Account/Remote.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Ftree/Account/Remote.php 2014-04-06 17:36:55.000000000 +0900
@@ -30,7 +30,7 @@
public function __construct($id = null)
{
if (is_null($id)) {
- throw new InvalidArgumentException('Constructor requires an account ID.');
+ throw new InvalidArgumentException(_("Constructor requires an account ID."));
}
parent::__construct($id);
--- imp/lib/Ftree/Account/Vfolder.php.orig 2014-04-04 08:30:28.000000000 +0900
+++ imp/lib/Ftree/Account/Vfolder.php 2014-04-06 17:37:17.000000000 +0900
@@ -30,7 +30,7 @@
public function __construct($id = null)
{
if (is_null($id)) {
- throw new InvalidArgumentException('Constructor requires an account ID.');
+ throw new InvalidArgumentException(_("Constructor requires an account ID."));
}
parent::__construct($id);