Changeset 4560 for Serveur


Ignore:
Timestamp:
12/03/10 15:50:56 (8 years ago)
Author:
kent1
Message:

Première tentative de traduction

Location:
Serveur/trac/Piwik4Trac
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • Serveur/trac/Piwik4Trac/PKG-INFO

    r4009 r4560  
    11Metadata-Version: 1.0
    22Name: Piwik4Trac
    3 Version: 0.0.1
     3Version: 0.0.2
    44Summary: Trac plugin to enable your trac environment to be logged by a Piwik server
    55Home-page: http://technique.arscenic.org/services-web/subversion-et-trac/ameliorer-et-optimiser-trac/article/trac-et-piwik-analyse-des
  • Serveur/trac/Piwik4Trac/setup.cfg

    r3995 r4560  
    22tag_build =
    33tag_date = 0
    4 tag_svn_revision = 0
     4tag_svn_revision = true
    55
    66[sdist]
     
    1010release = register bdist_egg sdist upload
    1111
     12[extract_messages]
     13add_comments = TRANSLATOR:
     14msgid_bugs_address = kent1@arscenic.org
     15output_file = tracext/piwik/locale/messages.pot
     16keywords = _ ngettext:1,2 N_ tag_
     17width = 72
     18
     19[init_catalog]
     20input_file = tracext/piwik/locale/messages.pot
     21output_dir = tracext/piwik/locale
     22domain = piwik4trac
     23
     24[compile_catalog]
     25directory = tracext/piwik/locale
     26domain = piwik4trac
     27
     28[update_catalog]
     29input_file = tracext/piwik/locale/messages.pot
     30output_dir = tracext/piwik/locale
     31domain = piwik4trac
  • Serveur/trac/Piwik4Trac/setup.py

    r4008 r4560  
    1111from setuptools import setup
    1212import tracext.piwik as tp
     13
     14extra = {}   
     15try:   
     16    import babel   
     17    extra['message_extractors'] = {
     18                                   'HudsonTrac': [
     19                                                  ('*.py', 'python', None),
     20                                                  ],
     21     }   
     22except ImportError:
     23     pass         
    1324
    1425setup(
     
    2536    packages=['tracext', 'tracext.piwik'],
    2637    namespace_packages=['tracext'],
    27     package_data={'tracext.piwik': ['templates/*.html',
    28                                                  'htdocs/*.css']},
     38    package_data={'tracext.piwik': [
     39                                    'templates/*.html',
     40                                    'htdocs/*.css'
     41                                    'locale/*/LC_MESSAGES/*.mo',
     42                                    ]
     43    },
    2944    include_package_data=True,
    3045    install_requires=['Trac>=0.11'],
     
    3651      tracext.piwik.web_ui = tracext.piwik.web_ui
    3752    """,
    38     classifiers=['Framework :: Trac']
     53    classifiers=['Framework :: Trac'],
     54    **extra
    3955)
  • Serveur/trac/Piwik4Trac/tracext/piwik/__init__.py

    r4559 r4560  
    2121from trac.env import IEnvironmentSetupParticipant
    2222from trac.web.chrome import ITemplateProvider
     23from trac.util.translation import domain_functions
     24
     25add_domain, _, tag_ = domain_functions('hudsontrac', 'add_domain', '_', 'tag_')
     26
     27def __init__(self):
     28        import pkg_resources # here or with the other imports
     29        # bind the 'foo' catalog to the specified locale directory
     30        locale_dir = pkg_resources.resource_filename(__name__, 'locale')
     31        add_domain(self.env.path, locale_dir)
    2332
    2433# ==============================================================================
     
    3140        This ID is needed to know which site is tracked.""")
    3241    tracking_server = Option(
    33         'piwik', 'tracking_server', None,
    34         """Piwik's tracking server address.
    35         Without the "http://" or "https://" and without trailing slash""")
     42        'piwik', 'tracking_server', None,"""_('Option tracking_server')"""
     43        )
    3644
    3745# ==============================================================================
Note: See TracChangeset for help on using the changeset viewer.