Changeset 4565 for Serveur


Ignore:
Timestamp:
12/03/10 16:43:08 (8 years ago)
Author:
kent1
Message:

mieux?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Serveur/trac/Piwik4Trac/tracext/piwik/admin.py

    r4564 r4565  
    1414from trac.util.translation import domain_functions
    1515
    16 add_domain, _, tag_ = domain_functions('piwik4trac', 'add_domain', '_', 'tag_')
    17 
    18 def __init__(self):
    19         import pkg_resources # here or with the other imports
    20         # bind the 'foo' catalog to the specified locale directory
    21         locale_dir = pkg_resources.resource_filename(__name__, 'locale')
    22         add_domain(self.env.path, locale_dir)
     16_, tag_, N_, add_domain = domain_functions('piwik4trac', ('_', 'tag_', 'N_', 'add_domain'))
    2317       
    2418class PiwikAdmin(Component):
     
    2620    options = {}
    2721    implements(IAdminPanelProvider)
    28 
     22   
     23    def __init__(self):
     24        locale_dir = pkg_resources.resource_filename(__name__, 'locale')
     25        add_domain(self.env.path, locale_dir)
     26        self.log.info("Added domain 'piwik4trac' -> %s",
     27                      resource_filename(__name__, 'locale'))
     28       
    2929    # IAdminPanelProvider methods
    3030    def get_admin_panels(self, req):
Note: See TracChangeset for help on using the changeset viewer.