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

Statusmessage type is untranslated when using @@ploneform-macros/form with different domain from another package #110

Open
fredvd opened this issue Nov 8, 2019 · 3 comments

Comments

@fredvd
Copy link
Member

fredvd commented Nov 8, 2019

I'm looking into a weird translation problem where collective.easyform 'global' form errors have an untranslated type. It always says 'Error' in every language. This might be a problem in the way collective.easyform is calling the macro, where the calling template has i18n:domain set to collective.easyform instead of plone :

https://github.com/collective/collective.easyform/blob/5d18bce01c104ae44fc3a11086a4f7475951aa93/src/collective/easyform/browser/easyform_form.pt#L1-L6

it is this part in the form macros.pt which isn't translated:

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

A solution would be to add i18n:domain="plone" to line 20 . As said, I'm not sure if the problem isn't in easyform, because a lot of the translations for validation errors and other messages are duplicated in the collective.easyform domain. See the screenshots below for the testform views in Dutch and German, collective.easyform doesn't have Dutch translations (but does have German ones), but all error mesages are still translated in Dutch.

On the other hand, i18ndude cannot pick up these translations for the status message type as they are in plone.app.z3cform: To fix this in easyform I'd have to add an extra collective-easform-manual.pot which has to be merged with the translations picked up by i18ndude. Which is also double work for every addon using z3c.form macros.

@mauritsvanrees Found it...

testformular-deutsch

form-errors-dutch

@fredvd fredvd changed the title Statusmessage type is untranslated when using @@ploneform-macros with different domain Statusmessage type is untranslated when using @@ploneform-macros/form with different domain from another package Nov 8, 2019
@mauritsvanrees
Copy link
Member

Adding i18n:domain="plone" sounds good to me.

@jensens
Copy link
Member

jensens commented Mar 2, 2023

#40 could be related

@fredvd
Copy link
Member Author

fredvd commented Mar 2, 2023

I think we should just add the i18n:domain and then it's solved. I'll create a PR.

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

No branches or pull requests

3 participants