You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
idgserpro
changed the title
Some strings ('No input') in code are not internationalized
Some strings ('No input') in code are not internationalized (Validators too)
Oct 10, 2017
<tal:block define="value python:request.form.get(fname, None)">
<dd tal:condition="python:value is not None" tal:content="value" />
<dd tal:condition="python:value is None" i18n:translate="">No Input</dd>
</tal:block>
I guess this dd from fg_result_embedded_view.pt does not end up in the request, so the check in the thanks page should be fine.
For the validators, maybe simply returning _(...) already works, which would be good. Otherwise you might need to explicitly call zope.i18n.translate on the error string before returning it.
We're using 1.7.x, don't know if there are problems like this in 5 as well. We have:
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/skins/PloneFormGen/fg_result_embedded_view.pt#L6
No input
here should be internationalized. Which is the best way in this kind of context (a python code in a tal template?)Some other files that we have this 'No input' references:
Is this
'No input'
being used as a constant instead, since we have https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/content/thanksPage.py#L258?The validators have the same problem:
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/validators/BooleanValidators.py#L28
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/validators/CaptchaValidator.py#L27
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/validators/ExRangeValidator.py#L46
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/validators/MaxLengthValidator.py#L46
https://github.com/smcmahon/Products.PloneFormGen/blob/1.7.23/Products/PloneFormGen/validators/TextValidators.py#L40
The text was updated successfully, but these errors were encountered: