zopefoundation / Zope

Zope is an open-source web application server.
https://zope.readthedocs.io
Other
357 stars 101 forks source link

Allow error messages to be translated #1186

Open wesleybl opened 11 months ago

wesleybl commented 11 months ago

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

With Volto, on a website in Portuguese, I accessed a private page with an anonymous user.

What I expect to happen:

I expect the error message to be displayed in Portuguese.

What actually happened:

The message in English was displayed:

You are not authorized to access this resource.

This message comes from Zope exception:

https://github.com/zopefoundation/Zope/blob/0c4fc50f75ecfbbb12285b60b6e07e2a8c9cb9ce/src/ZPublisher/HTTPResponse.py#L833

Would it be possible for the message to be a msgid instead of a string?

icemac commented 11 months ago

There was once #631 but it went nowhere.

You could come up with a PR to push your feature request forward.