Closed fschulze closed 8 years ago
I'm trying to see what error this tries to catch. Looking at the code this will report something simple like <p>I count ${count} items</p>
as an error?
Yes, because it won't work. At least it doesn't for me. It will just write the string ${count} and not replace it with the proper value. At least for translated messages. For the original empty message which uses the template default it works.
For me it only works in all cases when using something like:
<p>I count <span tal:replace="count" i18n:name="count" /> items</p>
Maybe this is a bug in Chameleon?
I use that pattern a lot, and it always works flawlessly for me. If it doesn't work for you this is most likely to do translationstring not working correctly for you. If you can provide a test case, for example a one-page pyramid app, I can look into it.
I'm going close this ticket, since this is not a lingua bug.
I just noticed it happened with a Python expression: ${context.title}
maybe it only works with single names, not Python expressions? I'll try to look into it.
Works just fine on Python expressions. All my forms use things like <label>${field.label}</label>
.
If this looks good to you, I'll add tests.