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

"Error" not internationalized in Document add form #3126

Closed
vincentfretin opened this issue Jun 28, 2020 · 6 comments · Fixed by plone/plone.app.z3cform#115
Closed

"Error" not internationalized in Document add form #3126

vincentfretin opened this issue Jun 28, 2020 · 6 comments · Fixed by plone/plone.app.z3cform#115

Comments

@vincentfretin
Copy link
Member

BUG

What I did:

With Plone in non-English language, create a Document, leave the required Title field empty, click on Save

What I expect to happen:

The error message perfectly localized:
Erreur Il y a des erreurs.
Capture d’écran de 2020-06-28 09-55-21

What actually happened:

Error Il y a des erreurs.

What version of Plone/ Addons I am using:

Plone 5.2.2rc1

@vincentfretin
Copy link
Member Author

Somebody know how this error message is rendered? I have no clue where to look.

We have the Info, Error and Warning in the po file.

@vincentfretin
Copy link
Member Author

This error message is not rendered by plone.app.layout/plone/app/layout/viewlets/globalstatusmessage.pt
Probably rendered in javascript? Where? How?

@vincentfretin
Copy link
Member Author

No it's not rendered in javascript, I see the full html structure in the html response when I save.

@vincentfretin
Copy link
Member Author

I found it in plone.app.z3cform/plone/app/z3cform/templates/macros.pt
If a replace

<dt i18n:translate="">Error</dt>

by

<dt i18n:translate="" i18n:domain="plone">Error</dt>

this fixes it.
But it's weird because we have i18n:domain="plone" in the root tag, but it doesn't same to care... Chameleon issue?

@mauritsvanrees
Copy link
Member

Maybe the root domain is not picked up because this is in a macro.

@vincentfretin
Copy link
Member Author

Yes you're probably right. There may be another domain defined in the caller. I didn't investigated further.

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

Successfully merging a pull request may close this issue.

2 participants