VirtualMailManager/Account.py
changeset 156 a849843115e9
parent 155 eb866ebb9f2e
child 162 0ac9ef587769
equal deleted inserted replaced
155:eb866ebb9f2e 156:a849843115e9
    29         self._passwd = password
    29         self._passwd = password
    30         self._setAddr()
    30         self._setAddr()
    31         self._exists()
    31         self._exists()
    32         if self._uid < 1 and VMM.VirtualMailManager.aliasExists(self._dbh,
    32         if self._uid < 1 and VMM.VirtualMailManager.aliasExists(self._dbh,
    33                 self._addr):
    33                 self._addr):
       
    34             # TP: Hm, what quotation marks should be used?
       
    35             # If you are unsure have a look at:
       
    36             # http://en.wikipedia.org/wiki/Quotation_mark,_non-English_usage
    34             raise AccE(_(u"There is already an alias with the address “%s”.") %\
    37             raise AccE(_(u"There is already an alias with the address “%s”.") %\
    35                     self._addr, ERR.ALIAS_EXISTS)
    38                     self._addr, ERR.ALIAS_EXISTS)
    36         if self._uid < 1 and VMM.VirtualMailManager.relocatedExists(self._dbh,
    39         if self._uid < 1 and VMM.VirtualMailManager.relocatedExists(self._dbh,
    37                 self._addr):
    40                 self._addr):
    38             raise AccE(
    41             raise AccE(
   188             keys = ['name', 'uid', 'gid', 'maildir', 'transport', 'smtp',
   191             keys = ['name', 'uid', 'gid', 'maildir', 'transport', 'smtp',
   189                     'pop3', 'imap', sieve_col]
   192                     'pop3', 'imap', sieve_col]
   190             info = dict(zip(keys, info))
   193             info = dict(zip(keys, info))
   191             for service in ('smtp', 'pop3', 'imap', sieve_col):
   194             for service in ('smtp', 'pop3', 'imap', sieve_col):
   192                 if bool(info[service]):
   195                 if bool(info[service]):
       
   196                     # TP: A service (pop3/imap/…) is enabled/usable for a user
   193                     info[service] = _('enabled')
   197                     info[service] = _('enabled')
   194                 else:
   198                 else:
       
   199                     # TP: A service (pop3/imap) isn't enabled/usable for a user
   195                     info[service] = _('disabled')
   200                     info[service] = _('disabled')
   196             info['address'] = self._addr
   201             info['address'] = self._addr
   197             info['maildir'] = '%s/%s/%s' % (self._base, info['uid'],
   202             info['maildir'] = '%s/%s/%s' % (self._base, info['uid'],
   198                     MailLocation(self._dbh,
   203                     MailLocation(self._dbh,
   199                         mid=info['maildir']).getMailLocation())
   204                         mid=info['maildir']).getMailLocation())