VirtualMailManager/Domain.py
changeset 34 6d74e20c5b3b
parent 32 ceb700bc4a80
child 35 22cc616aef61
--- a/VirtualMailManager/Domain.py	Thu May 15 19:24:11 2008 +0000
+++ b/VirtualMailManager/Domain.py	Sun May 18 04:51:12 2008 +0000
@@ -116,13 +116,14 @@
         else:
             hasAlias = False
         if hasUser and hasAlias:
-            raise VMMDomainException(('There are accounts and aliases.',
+            raise VMMDomainException((_('There are accounts and aliases.'),
                 ERR.ACCOUNT_AND_ALIAS_PRESENT))
         elif hasUser:
-            raise VMMDomainException(('There are accounts.',
+            raise VMMDomainException((_('There are accounts.'),
                 ERR.ACCOUNT_PRESENT))
         elif hasAlias:
-            raise VMMDomainException(('There are aliases.', ERR.ALIAS_PRESENT))
+            raise VMMDomainException((_('There are aliases.'),
+                ERR.ALIAS_PRESENT))
 
     def save(self):
         """Stores the new domain in the database."""
@@ -135,7 +136,7 @@
             self._dbh.commit()
             dbc.close()
         else:
-            raise VMMDomainException(('Domain already exists.',
+            raise VMMDomainException((_('Domain already exists.'),
                 ERR.DOMAIN_EXISTS))
 
     def delete(self, delUser=False, delAlias=False):
@@ -155,7 +156,7 @@
             self._dbh.commit()
             dbc.close()
         else:
-            raise VMMDomainException(("Domain doesn't exist yet.",
+            raise VMMDomainException((_("Domain doesn't exist yet."),
                 ERR.NO_SUCH_DOMAIN))
 
     def updateTransport(self, transport, force = False):
@@ -179,7 +180,7 @@
                     self._dbh.commit()
             dbc.close()
         else:
-            raise VMMDomainException(("Domain doesn't exist yet.",
+            raise VMMDomainException((_("Domain doesn't exist yet."),
                 ERR.NO_SUCH_DOMAIN))
 
     def getID(self):
@@ -209,7 +210,7 @@
         info = dbc.fetchone()
         dbc.close()
         if info is None:
-            raise VMMDomainException(("Domain doesn't exist yet.",
+            raise VMMDomainException((_("Domain doesn't exist yet."),
                 ERR.NO_SUCH_DOMAIN))
         else:
             keys = ['gid', 'domainname', 'transport', 'domaindir', 'accounts',