Chameleon Internationalization

192 views
Skip to first unread message

Gut

unread,
Mar 28, 2011, 12:46:35 PM3/28/11
to pylons-discuss
After having installed Pyramid and Babel in a virtual environment and
added the following to the setup.py as the documentation suggests:

setup(name="mypackage",
# ...
install_requires = [
# ...
'Babel',
],
message_extractors = { '.': [
('**.py', 'chameleon_python', None ),
('**.pt', 'chameleon_xml', None ),
]},
)

I get the following error: ValueError: Unknown extraction method
'chameleon_python'
when i try to extract the messages (command ../bin/python setup.py
extract_messages in the project directory).

Chris McDonough

unread,
Mar 28, 2011, 12:51:54 PM3/28/11
to pylons-...@googlegroups.com
Can you try the same thing with Chameleon 1 instead? Recently Chameleon
had a 2.X release which may not include the appropriate Babel
extractors.

easy_install "Chameleon<1.999" should do it.

- C

gutnar leede

unread,
Mar 28, 2011, 12:58:31 PM3/28/11
to pylons-...@googlegroups.com
Thank you very much, the messages are now extracted correctly.

- Gut

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.


malthe

unread,
Mar 28, 2011, 1:01:06 PM3/28/11
to pylons-discuss
On Mar 28, 6:51 pm, Chris McDonough <chr...@plope.com> wrote:
> Can you try the same thing with Chameleon 1 instead?  Recently Chameleon
> had a 2.X release which may not include the appropriate Babel
> extractors.

Yes.

It does not include this functionality because it requires lxml.

Meanwhile, it's been moved into a separate distribution: lingua. See:

https://github.com/wichert/lingua

\malthe

gutnar leede

unread,
Mar 28, 2011, 2:29:03 PM3/28/11
to pylons-...@googlegroups.com
I am now using chameleon 1.3.0 and although the extract_messages and update_catalog commands give no errors, they produce a .pot file with only the copyrights lines even after i added all kinds of translation strings to the template (.pt file) according to both, the Pyramid and the Chameleon documentations.

Reply all
Reply to author
Forward
0 new messages