Skip to content

Commit

Permalink
make Babel as optional dependency as it doesn't support python 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Dec 11, 2013
1 parent 65133d3 commit 8d6045d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HACKING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -95,5 +95,6 @@
extras_require = {
'testing':testing_extras,
'docs':docs_extras,
'i18n':i18n_extras,
},
)
5 changes: 2 additions & 3 deletions substanced/principal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import string

import babel
from persistent import Persistent
from cryptacular.bcrypt import BCRYPTPasswordManager

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d6045d

Please sign in to comment.