Permalink
Browse files

make Babel as optional dependency as it doesn't support python 3.2

  • Loading branch information...
1 parent 65133d3 commit 8d6045d6e09201ecda7ec0ef1c5db319f53d4556 @domenkozar domenkozar committed Dec 11, 2013
Showing with 6 additions and 5 deletions.
  1. +1 −1 HACKING.txt
  2. +1 −0 setup.cfg
  3. +2 −1 setup.py
  4. +2 −3 substanced/principal/__init__.py
View
@@ -122,7 +122,7 @@ Transifex project should be used for translations: https://www.transifex.com/pro
Before you can do anything related to translations, there is small setup:
-- Make sure "transifex-client" Python package is installed
+- Run ``bin/python setup.py i18n``
To update transifex with new translations:
View
@@ -11,6 +11,7 @@ cover-erase=1
[aliases]
dev = develop easy_install substanced[testing]
docs = develop easy_install substanced[docs]
+i18n = develop easy_install substanced[i18n]
[compile_catalog]
directory = substanced/locale
View
@@ -41,11 +41,11 @@
'zope.deprecation',
'statsd',
'pytz',
- 'Babel',
]
docs_extras = ['Sphinx', 'repoze.sphinx.autointerface']
testing_extras = ['nose', 'coverage', 'mock', 'virtualenv', 'nose-selecttests']
+i18n_extras = ['Babel', 'transifex-client']
setup(name='substanced',
version='0.0',
@@ -95,5 +95,6 @@
extras_require = {
'testing':testing_extras,
'docs':docs_extras,
+ 'i18n':i18n_extras,
},
)
@@ -2,7 +2,6 @@
import os
import string
-import babel
from persistent import Persistent
from cryptacular.bcrypt import BCRYPTPasswordManager
@@ -314,8 +313,8 @@ def get_locales():
@colander.deferred
def locale_widget(node, kw):
- locale_names = [babel.Locale.parse(locale).english_name for locale in _LOCALES]
- return deform.widget.Select2Widget(values=zip(_LOCALES, locale_names))
+ # TODO: locale_names = [babel.Locale.parse(locale).english_name for locale in _LOCALES]
+ return deform.widget.Select2Widget(values=zip(_LOCALES, _LOCALES))
@colander.deferred
def locale_missing(node, kw): #pragma NO COVER

0 comments on commit 8d6045d

Please sign in to comment.