Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement extractor for i18n messages from templates #243

Open
Estartu opened this issue Aug 18, 2017 · 2 comments
Open

Implement extractor for i18n messages from templates #243

Estartu opened this issue Aug 18, 2017 · 2 comments
Labels

Comments

@Estartu
Copy link

Estartu commented Aug 18, 2017

I use chameleon and pyramid in a small project with i18n tags for translation.
I did the project a year ago and back than i simply run python setup.py extract_messages to get all the translation messages from *.py an *.pt files.
message_extractor setting in the setup.py was
{'.': [('.py', 'python', None),('.pt', 'tales', None)]}

I started to do some extending this week and first upgraded all used packages to the most recent version. Everything work fine but extract_messages stopped working on .pt files.

pot-create still works for .pt file so it's not really pressing at the moment.

I've done some debugging and the setuptools search for extract_messages entrypoints in every installed distribution. Python and javascript they handle themselves but any other extractor has to come from the package installed. As far as i can see only mako has such a entrypoint defined.

@malthe
Copy link
Owner

malthe commented Aug 18, 2017

Perhaps you're missing a dependency? Chameleon itself has – as far as I recall – no such functionality built-in.

@Estartu
Copy link
Author

Estartu commented Aug 18, 2017

yeah lingua does this for chameleon at the moment so pot-create (comes with linuga) works for now.

But it looks like setuptools tries to establish a new generic way. I think that's a really good idea to let the guys who know the syntax do the extracting.

So chameleon should provide the extractor for i18n messages in pagetemplates.

@dataflake dataflake changed the title setup.py extract_messages stopped working with chameleon Implement extractor for i18n messages from templates Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants