[i18n] missing gettext messages

Michael M Slusarz slusarz at horde.org
Mon Apr 7 17:16:59 UTC 2014


Quoting Hiromi Kimura <hiromi at tac.tsukuba.ac.jp>:

> Some IMP library files missing gettext messages.
> I made the patch, please check it.
> -=-=-=-=-
> Hiromi Kimura, Tandem Accelerator Complex, University of Tsukuba, JAPAN

These strings do not need to be run through gettext, since they are  
error messages intended for developers/admins and not for display to  
users (if they ever leak to users, that is an error and should be  
fixed):

+            $error = new IMP_Imap_Exception(_("Could not load server  
configuration."));
+            throw new BadMethodCallException(sprintf(_("%s: Invalid  
method call \"%s\"."), __CLASS__, $method));
+                    $error = new IMP_Imap_Exception(_("The POP3  
server does not support the REQUIRED UIDL capability."));
+            throw new IMP_Exception(_("Mailbox name must not be empty."));
+        throw new BadMethodCallException(_("Not supported"));
+        throw new BadMethodCallException(_("Not supported"));
(This string could only be reached if someone manually tried to link  
an attachment despite the current UI settings, so it doesn't need to  
be translated:)
+            throw new IMP_Exception(_("Linked attachments are forbidden.));
+        throw new Horde_Mail_Exception(_("Invalid Message-ID."));
+        throw new IMP_Exception(_("No backend found to generate  
contact image."));
+        throw new Exception(_("Missing implementation for url method."));
+            throw new IMP_Exception(_("No server parameters found."));
+            throw new IMP_Exception(_("Quota config missing driver  
parameter."));
+            throw new InvalidArgumentException(_("Missing imap_ob  
parameter"));
+                throw new InvalidArgumentException(_("Search query  
requires at least one mailbox."));
+                throw new InvalidArgumentException(_("Search query  
requires at least one mailbox."));
+            throw new InvalidArgumentException(_("Invalid filter ID  
given."));
+            throw new InvalidArgumentException(_("$value must be a  
query object."));
+        throw new InvalidArgumentException(_("Creating search queries  
by array index is not supported. Use createQuery() instead."));
+            throw new Exception(_("Cache version change"));
+            throw new InvalidArgumentException(_("Missing mongo_db  
parameter."));
+        throw new LogicException(_("Object can not be serialized."));
+            throw new InvalidArgumentException(_("Missing iterator."));
+            throw new InvalidArgumentException(_("Constructor  
requires an account ID."));
+            throw new InvalidArgumentException(_("Constructor  
requires an account ID."));

Might be good idea to define an exception/pick one of the existing SPL  
exceptions where, if it bubbles up to the top of the program, the user  
will see a generic error message instead of the exception message  
(which will be logged for admin use).

Regardless, I should probably change the IMP_Exception thrown issues  
above to something different.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the i18n mailing list