-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
70 lines (59 loc) · 1.98 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env/python
"""
i18nize-templates
=================
A tool to automatically add i18n markup to jinja2 and handlebars
templates. It may also work for django, though this is not tested.
This is part of a process to make a non-i18n-aware jinja2 or
handlebars file i18n-aware. i18n-ness support is mostly a matter of
marking natural-language text in the file that needs to be translated.
While some complicated natural language constructs (like plurals)
require a bit more work, the simple case is very simple: replace
<p>Hello <b>world</b></p>
with
<p>{{ _("Hello <b>world</b>") }}</p>
This script helps with that process.
Use
---
i18nize_templates <file> ...
OR
i18nize_templates [--handlebars] < <infile> > <outfile>
"""
try:
from setuptools import setup
extra_arguments = {
'entry_points': {
'console_scripts': (
['i18nize-templates = i18nize_templates.__init__:main']),
},
'test_suite': 'tests',
}
except ImportError:
from distutils.core import setup
extra_arguments = {
'scripts': ['i18nize-templates']
}
setup(
name='i18nize_templates',
version='0.2',
url='https://github.com/csilvers/i18nize_templates',
license='MIT',
author='Craig Silverstein',
author_email='[email protected]',
description='Adds i18n markup to jinja2 and handlebars templates.',
long_description=__doc__,
keywords='i18n jinja jinja2 handlebars translation',
packages=['i18nize_templates'],
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Internationalization',
'Topic :: Software Development :: Libraries :: Python Modules'
],
**extra_arguments
)