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

translation / i18n confusion #488

Closed
thet opened this issue Apr 27, 2015 · 7 comments
Closed

translation / i18n confusion #488

thet opened this issue Apr 27, 2015 · 7 comments

Comments

@thet
Copy link
Member

thet commented Apr 27, 2015

I'm confused about how the mockup translation machinery works.
Mockup tries to get the message catalog in the widgets domain via ajax from plonejs18n. But - for example - in the german language, there are no translations in plone.app.locales. Still, e.g. the pickadate pattern is translated, because it loads all translations via data-attributes.

I want to fix the translations for the recurrence pattern, but I'm asking myself where to start. Adding it to data-attributes (which can be quite lengthy, look at https://github.com/plone/plone.formwidget.recurrence/blob/master/plone/formwidget/recurrence/browser/i18n.py ), or adding it to the widgets message catalog in plone.app.locales?

Does i18ndude extract message strings from mockup templates?

@vangheem
Copy link
Member

I think pickadate is different because we're passing in lists of values to the pickadate months, day names, etc into the pickadate widget. We'd have to do a lot of wonky stuff in js or convert the pickadate.js stuff in order to make it use the jsi18n stuff. Look at: https://github.com/plone/plone.app.widgets/blob/master/plone/app/widgets/utils.py#L49 -- it should make sense.

I started trying to add js translations to the recurrence pattern and it was a pain--I gave up. The widgets message catalog is IN plone.app.locales now: https://github.com/collective/plone.app.locales/blob/master/plone/app/locales/locales/widgets.pot

They are generated from mockup using a grunt task. Run make make i18n-dump and then copy the pot file over to plone.app.locales.

@thet
Copy link
Member Author

thet commented Apr 27, 2015

tnx, that should give me a good start

@thet
Copy link
Member Author

thet commented Apr 27, 2015

i'm on Plone 4.3, btw. Maybe I'll just add a widgets catalog to plone.app.widgets and add appropriate stuff to plone.app.locales too, of course

@pbauer
Copy link
Member

pbauer commented Jul 10, 2015

I created a new widets.pot file with make i18n-dump and there are many changes (collective/plone.app.locales@efedb6d2). Then I synced the po-files and created a pr with all that: collective/plone.app.locales#54

Now I'd start translating strings. Is that ok?

@vangheem
Copy link
Member

That'd be great!

@vincentfretin
Copy link
Member

Five years later :-)
Remaining internationalization issues in folder contents: plone/Products.CMFPlone#2188 (comment)
Documentation how to test changes in Plone and handle translations: #985

@vincentfretin
Copy link
Member

There exists an issue for each i18n bugs I think now. I'm closing this issue.

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

4 participants