VirtualMailManager/Domain.py
changeset 47 191d5a5adc4a
parent 45 9e66138aad0b
child 48 0d5f58f8b8f5
equal deleted inserted replaced
46:7ece710c559d 47:191d5a5adc4a
    11 __author__ = 'Pascal Volk <p.volk@veb-it.de>'
    11 __author__ = 'Pascal Volk <p.volk@veb-it.de>'
    12 __version__ = VERSION
    12 __version__ = VERSION
    13 __revision__ = 'rev '+'$Rev$'.split()[1]
    13 __revision__ = 'rev '+'$Rev$'.split()[1]
    14 __date__ = '$Date$'.split()[1]
    14 __date__ = '$Date$'.split()[1]
    15 
    15 
    16 import gettext
       
    17 from random import choice
    16 from random import choice
    18 
    17 
    19 from Exceptions import VMMDomainException
    18 from Exceptions import VMMDomainException
    20 import constants.ERROR as ERR
    19 import constants.ERROR as ERR
    21 from Transport import Transport
    20 from Transport import Transport
    22 
    21 
    23 MAILDIR_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'
    22 MAILDIR_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'
    24 
       
    25 gettext.bindtextdomain('vmm', '/usr/local/share/locale')
       
    26 gettext.textdomain('vmm')
       
    27 _ = gettext.gettext
       
    28 
    23 
    29 class Domain:
    24 class Domain:
    30     """Class to manage e-mail domains."""
    25     """Class to manage e-mail domains."""
    31     def __init__(self, dbh, domainname, basedir=None, transport=None):
    26     def __init__(self, dbh, domainname, basedir=None, transport=None):
    32         """Creates a new Domain instance.
    27         """Creates a new Domain instance.