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

Expression in tal:define fails #39

Closed
tsauerwein opened this Issue Jul 22, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@tsauerwein

tsauerwein commented Jul 22, 2014

I have this Chameleon template, which is perfectly accepted by Chameleon:

<form
  tal:define="css_class css_class|string:${field.widget.css_class or field.css_class or ''};"
  >
...
</form>

When I try to run pot-create, I get the following error message:

Aborting due to Python syntax error in %s[%d]: %s ./.../templates/form.pt 1 (css_class|string:${field.widget.css_class or field.css_class or ''})

Is it the ${...} expression which causes the problem?

@wichert

This comment has been minimized.

Show comment
Hide comment
@wichert

wichert Jul 23, 2014

Owner

The problem appears to be that lingua doesn't handle pipe-separated expressions here.

Owner

wichert commented Jul 23, 2014

The problem appears to be that lingua doesn't handle pipe-separated expressions here.

wichert added a commit that referenced this issue Jul 23, 2014

@wichert wichert closed this in 8422ec2 Jul 23, 2014

@tsauerwein

This comment has been minimized.

Show comment
Hide comment
@tsauerwein

tsauerwein Jul 23, 2014

Thanks for the instant fix!

tsauerwein commented Jul 23, 2014

Thanks for the instant fix!

@wichert

This comment has been minimized.

Show comment
Hide comment
@wichert

wichert Jul 23, 2014

Owner

You're welcome! I just released lingua 2.4 with this fix.

Owner

wichert commented Jul 23, 2014

You're welcome! I just released lingua 2.4 with this fix.

tsauerwein pushed a commit to tsauerwein/c2cgeoform that referenced this issue Jul 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment