Fixed some grammar errors and typos. (Reported by Clytie Siddall)
authorPascal Volk <neverseen@users.sourceforge.net>
Mon, 19 Oct 2009 00:56:19 +0000
changeset 155 eb866ebb9f2e
parent 154 6e6488722807
child 156 a849843115e9
Fixed some grammar errors and typos. (Reported by Clytie Siddall)
VirtualMailManager/Account.py
VirtualMailManager/Alias.py
VirtualMailManager/AliasDomain.py
VirtualMailManager/Domain.py
VirtualMailManager/EmailAddress.py
VirtualMailManager/Relocated.py
VirtualMailManager/VirtualMailManager.py
VirtualMailManager/ext/Postconf.py
vmm
--- a/VirtualMailManager/Account.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/Account.py	Mon Oct 19 00:56:19 2009 +0000
@@ -56,7 +56,7 @@
         dom = Domain(self._dbh, self._addr._domainname)
         self._gid = dom.getID()
         if self._gid == 0:
-            raise AccE(_(u"The domain “%s” doesn't exist yet.") %\
+            raise AccE(_(u"The domain “%s” doesn't exist.") %\
                     self._addr._domainname, ERR.NO_SUCH_DOMAIN)
         self._base = dom.getDir()
         self._tid = dom.getTransportID()
@@ -78,7 +78,7 @@
             raise AccE(_(u"Unknown service “%s”.") % service,
                     ERR.UNKNOWN_SERVICE)
         if self._uid < 1:
-            raise AccE(_(u"The account “%s” doesn't exists.") % self._addr,
+            raise AccE(_(u"The account “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_ACCOUNT)
         if dcvers > 11:
             sieve_col = 'sieve'
@@ -151,7 +151,7 @@
 
     def modify(self, what, value):
         if self._uid == 0:
-            raise AccE(_(u"The account “%s” doesn't exists.") % self._addr,
+            raise AccE(_(u"The account “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_ACCOUNT)
         if what not in ['name', 'password', 'transport']:
             return False
@@ -182,7 +182,7 @@
         info = dbc.fetchone()
         dbc.close()
         if info is None:
-            raise AccE(_(u"The account “%s” doesn't exists.") % self._addr,
+            raise AccE(_(u"The account “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_ACCOUNT)
         else:
             keys = ['name', 'uid', 'gid', 'maildir', 'transport', 'smtp',
@@ -215,7 +215,7 @@
 
     def delete(self, delalias):
         if self._uid < 1:
-            raise AccE(_(u"The account “%s” doesn't exists.") % self._addr,
+            raise AccE(_(u"The account “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_ACCOUNT)
         dbc = self._dbh.cursor()
         if delalias == 'delalias':
--- a/VirtualMailManager/Alias.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/Alias.py	Mon Oct 19 00:56:19 2009 +0000
@@ -54,7 +54,7 @@
         dom = Domain(self._dbh, self._addr._domainname)
         self._gid = dom.getID()
         if self._gid == 0:
-            raise VMMAE(_(u"The domain “%s” doesn't exist yet.") %\
+            raise VMMAE(_(u"The domain “%s” doesn't exist.") %\
                     self._addr._domainname, ERR.NO_SUCH_DOMAIN)
 
     def _checkExpansion(self, limit):
@@ -73,7 +73,7 @@
 
     def save(self, expansion_limit):
         if self._dest is None:
-           raise VMMAE(_(u"No destination address for alias denoted."),
+           raise VMMAE(_(u"No destination address specified for alias."),
                ERR.ALIAS_MISSING_DEST)
         if self._isNew:
             self._checkExpansion(expansion_limit)
@@ -97,7 +97,7 @@
             targets = [destination[0] for destination in destinations]
             return targets
         else:
-            raise VMMAE(_(u"The alias “%s” doesn't exists.") % self._addr,
+            raise VMMAE(_(u"The alias “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_ALIAS)
 
     def delete(self):
@@ -114,9 +114,9 @@
             self._dbh.commit()
         else:
             if self._dest is None:
-                msg = _(u"The alias “%s” doesn't exists.") % self._addr
+                msg = _(u"The alias “%s” doesn't exist.") % self._addr
             else:
                 msg = _(u"The alias “%(a)s” with destination “%(d)s” doesn't\
- exists.") % {'a': self._addr, 'd': self._dest}
+ exist.") % {'a': self._addr, 'd': self._dest}
             raise VMMAE(msg, ERR.NO_SUCH_ALIAS)
 
--- a/VirtualMailManager/AliasDomain.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/AliasDomain.py	Mon Oct 19 00:56:19 2009 +0000
@@ -35,10 +35,10 @@
             raise VADE(_(u'The alias domain “%s” already exists.') %self.__name,
                     ERR.ALIASDOMAIN_EXISTS)
         if self._domain is None:
-            raise VADE(_(u'No destination domain for alias domain denoted.'),
+            raise VADE(_(u'No destination domain specified for alias domain.'),
                     ERR.ALIASDOMAIN_NO_DOMDEST)
         if self._domain._id < 1:
-            raise VADE (_(u"The target domain “%s” doesn't exist yet.") %
+            raise VADE (_(u"The target domain “%s” doesn't exist.") %
                     self._domain._name, ERR.NO_SUCH_DOMAIN)
         dbc = self._dbh.cursor()
         dbc.execute('INSERT INTO domain_name (domainname, gid, is_primary)\
@@ -60,18 +60,18 @@
                     _(u'There is no primary domain for the alias domain “%s”.')\
                             % self.__name, ERR.NO_SUCH_DOMAIN)
         else:
-            raise VADE(_(u"The alias domain “%s” doesn't exist yet.") %
+            raise VADE(_(u"The alias domain “%s” doesn't exist.") %
                     self.__name, ERR.NO_SUCH_ALIASDOMAIN)
 
     def switch(self):
         if self._domain is None:
-            raise VADE(_(u'No destination domain for alias domain denoted.'),
+            raise VADE(_(u'No destination domain specified for alias domain.'),
                     ERR.ALIASDOMAIN_NO_DOMDEST)
         if self._domain._id < 1:
-            raise VADE (_(u"The target domain “%s” doesn't exist yet.") %
+            raise VADE (_(u"The target domain “%s” doesn't exist.") %
                     self._domain._name, ERR.NO_SUCH_DOMAIN)
         if self.__gid < 1:
-            raise VADE(_(u"The alias domain “%s” doesn't exist yet.") %
+            raise VADE(_(u"The alias domain “%s” doesn't exist.") %
                     self.__name, ERR.NO_SUCH_ALIASDOMAIN)
         if self.__gid == self._domain._id:
             raise VADE(_(u"The alias domain “%(alias)s” is already assigned to\
@@ -94,6 +94,6 @@
                 self._dbh.commit()
         else:
             raise VADE(
-                  _(u"The alias domain “%s” doesn't exist yet.") % self.__name,
+                  _(u"The alias domain “%s” doesn't exist.") % self.__name,
                   ERR.NO_SUCH_ALIASDOMAIN)
 
--- a/VirtualMailManager/Domain.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/Domain.py	Mon Oct 19 00:56:19 2009 +0000
@@ -158,7 +158,7 @@
             self._dbh.commit()
             dbc.close()
         else:
-            raise VMMDE(_(u"The domain “%s” doesn't exist yet.") % self._name,
+            raise VMMDE(_(u"The domain “%s” doesn't exist.") % self._name,
                 ERR.NO_SUCH_DOMAIN)
 
     def updateTransport(self, transport, force=False):
@@ -184,7 +184,7 @@
                     self._dbh.commit()
             dbc.close()
         else:
-            raise VMMDE(_(u"The domain “%s” doesn't exist yet.") % self._name,
+            raise VMMDE(_(u"The domain “%s” doesn't exist.") % self._name,
                 ERR.NO_SUCH_DOMAIN)
 
     def getID(self):
@@ -215,7 +215,7 @@
         info = dbc.fetchone()
         dbc.close()
         if info is None:
-            raise VMMDE(_(u"The domain “%s” doesn't exist yet.") % self._name,
+            raise VMMDE(_(u"The domain “%s” doesn't exist.") % self._name,
                     ERR.NO_SUCH_DOMAIN)
         else:
             keys = ['gid', 'domainname', 'transport', 'domaindir',
--- a/VirtualMailManager/EmailAddress.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/EmailAddress.py	Mon Oct 19 00:56:19 2009 +0000
@@ -42,7 +42,7 @@
             raise VMMEAE(_(u"Missing '@' sign in e-mail address “%s”.") %
                 address, ERR.INVALID_ADDRESS)
         except AttributeError:
-            raise VMMEAE(_(u"“%s” looks not like an e-mail address.") %
+            raise VMMEAE(_(u"“%s” doesn't look like an e-mail address.") %
                 address, ERR.INVALID_ADDRESS)
         if len(domain) > 0:
             domain = VMM.VirtualMailManager.chkDomainname(domain)
@@ -53,23 +53,23 @@
         self._localpart, self._domainname = localpart, domain
 
     def __chkLocalpart(self, localpart):
-        """Validates the local part of an e-mail address.
+        """Validates the local-part of an e-mail address.
 
-        Keyword arguments:
-        localpart -- of the e-mail address that should be validated (str)
+        Arguments:
+        localpart -- local-part of the e-mail address that should be validated (str)
         """
         if len(localpart) < 1:
-            raise VMMEAE(_(u'No localpart specified.'),
+            raise VMMEAE(_(u'No local-part specified.'),
                 ERR.LOCALPART_INVALID)
         if len(localpart) > 64:
-            raise VMMEAE(_(u'The local part “%s” is too long') %
+            raise VMMEAE(_(u'The local-part “%s” is too long') %
                 localpart, ERR.LOCALPART_TOO_LONG)
         ic = set(re.findall(RE_LOCALPART, localpart))
         if len(ic):
             ichrs = ''
             for c in ic:
                 ichrs += u"“%s” " % c
-            raise VMMEAE(_(u"The local part “%(lpart)s” contains invalid\
+            raise VMMEAE(_(u"The local-part “%(lpart)s” contains invalid\
  characters: %(ichrs)s") % {'lpart': localpart, 'ichrs': ichrs},
                 ERR.LOCALPART_INVALID)
         return localpart
--- a/VirtualMailManager/Relocated.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/Relocated.py	Mon Oct 19 00:56:19 2009 +0000
@@ -55,13 +55,14 @@
         dom = Domain(self._dbh, self._addr._domainname)
         self._gid = dom.getID()
         if self._gid == 0:
-            raise VMMRE(_(u"The domain “%s” doesn't exist yet.") %\
+            raise VMMRE(_(u"The domain “%s” doesn't exist.") %\
                     self._addr._domainname, ERR.NO_SUCH_DOMAIN)
 
     def save(self):
         if self._dest is None:
-           raise VMMRE(_(u"No destination address for relocated user denoted."),
-               ERR.RELOCATED_MISSING_DEST)
+           raise VMMRE(
+                   _(u"No destination address specified for relocated user."),
+                   ERR.RELOCATED_MISSING_DEST)
         if self._isNew:
             dbc = self._dbh.cursor()
             dbc.execute("INSERT INTO relocated VALUES (%s, %s, %s)",
@@ -84,7 +85,7 @@
             return destination[0]
         else:
             raise VMMRE(
-                    _(u"The relocated user “%s” doesn't exists.") % self._addr,
+                    _(u"The relocated user “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_RELOCATED)
 
     def delete(self):
@@ -97,6 +98,6 @@
             self._dbh.commit()
         else:
             raise VMMRE(
-                    _(u"The relocated user “%s” doesn't exists.") % self._addr,
+                    _(u"The relocated user “%s” doesn't exist.") % self._addr,
                     ERR.NO_SUCH_RELOCATED)
 
--- a/VirtualMailManager/VirtualMailManager.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/VirtualMailManager.py	Mon Oct 19 00:56:19 2009 +0000
@@ -95,7 +95,7 @@
                 self.__Cfg.get('domdir', 'base'), ERR.NO_SUCH_DIRECTORY)
         for opt, val in self.__Cfg.items('bin'):
             if not os.path.exists(val):
-                raise VMMException(_(u'“%(binary)s” doesn\'t exists.\n\
+                raise VMMException(_(u'“%(binary)s” doesn\'t exist.\n\
 (vmm.cfg: section "bin", option "%(option)s")') %{'binary': val,'option': opt},
                     ERR.NO_SUCH_BINARY)
             elif not os.access(val, os.X_OK):
@@ -329,7 +329,7 @@
                     mdstat = os.stat(userdir)
                     if (mdstat.st_uid, mdstat.st_gid) != (uid, gid):
                         raise VMMException(
-                         _(u'Owner/group mismatch in home directory detected.'),
+                         _(u'Detected owner/group mismatch in home directory.'),
                          ERR.MAILDIR_PERM_MISMATCH)
                     rmtree(userdir, ignore_errors=True)
                 else:
@@ -344,14 +344,13 @@
             domdirdirs = domdir.replace(basedir+'/', '').split('/')
             domdirparent = os.path.join(basedir, domdirdirs[0])
             if basedir.count('..') or domdir.count('..'):
-                raise VMMException(
-                        _(u'FATAL: ".." in domain directory path detected.'),
-                            ERR.FOUND_DOTS_IN_PATH)
+                raise VMMException(_(u'Found ".." in domain directory path.'),
+                        ERR.FOUND_DOTS_IN_PATH)
             if os.path.isdir(domdirparent):
                 os.chdir(domdirparent)
                 if os.lstat(domdirdirs[1]).st_gid != gid:
-                    raise VMMException(
-                    _(u'FATAL: group mismatch in domain directory detected'),
+                    raise VMMException(_(
+                        u'Detected group mismatch in domain directory.'),
                         ERR.DOMAINDIR_GROUP_MISMATCH)
                 rmtree(domdirdirs[1], ignore_errors=True)
 
@@ -435,8 +434,8 @@
         try:
             return self.__Cfg.getboolean('config', 'done')
         except ValueError, e:
-            raise VMMConfigException(_(u"""Configurtion error: "%s"
-(in section "connfig", option "done") see also: vmm.cfg(5)\n""") % str(e),
+            raise VMMConfigException(_(u"""Configuration error: "%s"
+(in section "config", option "done") see also: vmm.cfg(5)\n""") % str(e),
                   ERR.CONF_ERROR)
 
     def configure(self, section=None):
@@ -597,7 +596,7 @@
         alias._dest) and not VirtualMailManager.aliasExists(self.__dbh,
         alias._dest):
             self.__warnings.append(
-                _(u"The destination account/alias “%s” doesn't exists yet.")%\
+                _(u"The destination account/alias “%s” doesn't exist.")%\
                         alias._dest)
 
     def userDelete(self, emailaddress, force=None):
@@ -618,7 +617,7 @@
 The account has been successfully deleted from the database.
     But an error occurred while deleting the following directory:
     “%(directory)s”
-    Reason: %(raeson)s""") % {'directory': acc.getDir('home'),'raeson': e.msg()}
+    Reason: %(reason)s""") % {'directory': acc.getDir('home'),'reason': e.msg()}
                     self.__warnings.append(warning)
                 else:
                     raise e
@@ -654,7 +653,7 @@
     def userPassword(self, emailaddress, password):
         acc = self.__getAccount(emailaddress)
         if acc.getUID() == 0:
-           raise VMMException(_(u"Account doesn't exists"), ERR.NO_SUCH_ACCOUNT)
+           raise VMMException(_(u"Account doesn't exist"), ERR.NO_SUCH_ACCOUNT)
         if password is None:
             password = self._readpass()
         acc.modify('password', self.__pwhash(password, user=emailaddress))
--- a/VirtualMailManager/ext/Postconf.py	Sun Oct 11 13:48:50 2009 +0000
+++ b/VirtualMailManager/ext/Postconf.py	Mon Oct 19 00:56:19 2009 +0000
@@ -38,7 +38,7 @@
         expand_vars -- default True (bool)
         """
         if not re.match(RE_PC_PARAMS, parameter):
-            raise VMMException(_(u'The value “%s” looks not like a valid\
+            raise VMMException(_(u'The value “%s” doesn\'t look like a valid\
  postfix configuration parameter name.') % parameter, ERR.VMM_ERROR)
         self.__val = self.__read(parameter)
         if expand_vars:
--- a/vmm	Sun Oct 11 13:48:50 2009 +0000
+++ b/vmm	Mon Oct 19 00:56:19 2009 +0000
@@ -32,7 +32,7 @@
   add   aliasdomaindelete  aliasdomain.tld
   ua    useradd            user@domain.tld    password*
   ui    userinfo           user@domain.tld    details*
-  un    username           user@domain.tld    'Users Name'
+  un    username           user@domain.tld    "user’s name"
   up    userpassword       user@domain.tld    password*
   ut    usertransport      user@domain.tld    transport
   u0    userdisable        user@domain.tld    service*
@@ -316,9 +316,9 @@
 
 def user_name():
     if argc < 3:
-        usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address and users name.'))
+        usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address and user’s name.'))
     if argc < 4:
-        usage(EXIT.MISSING_ARGS, _('Missing users name.'))
+        usage(EXIT.MISSING_ARGS, _(u'Missing user’s name.'))
     else:
         vmm.userName(argv[2].lower(), argv[3])