Closed esteele closed 6 years ago
There is also plone.app.multilingual
and maybe plone.app.multilingual and plone.app.versioningbehavior
I found plone.app.contenttypes and plone.app.lockingbehavior not translated. I'm already translating it. I will add in plone.app.locales. The files "plone.app.contenttypes.pot" and "plone.app.lockingbehavior" has to be created inside locales-addons? Correct ?
plone.app.contenttypes
are mainly in the plone
i18n-domain. Is there an own plone.app.contenttypes
i18n-domain defined somehwere? if yes: create a pot file for it.
plone.app.versioningbehavior
is translated here:
https://github.com/plone/plone.app.versioningbehavior/tree/master/plone/app/versioningbehavior/locales
So files has just to be copied over to plone.app.locales
and removed at the original place.
plone.app.contenttypes translations are in the plone domain in plone.app.locales.
Is it better to change "plone.app.contenttypes" domain at the file plone.app.contenttypes/plone/app/contenttypes/behaviors/configure.zcml to "plone"?
plone.app.lockingbehavior
has one string Locking
ind the domain plone.app.lockingbehavior
- I propose to change the zcml and put it into the plone
domain and translate it there.
+1 for using not that many i18n-domains. if there are less than 5-10 messages i'd not use an own file.
+1
yes please change to i18n_domain="plone" in configure.zcml if it's still i18n_domain="plone.app.contenttypes"
Okay! I changed i18n_domain and should I change plone.app.lockingbehavior too ?
yes please.
On a fully checked out buildout.coredev (see branch all-sources) there were quite a few more packages that were defining their own translation domain.
I added all of them on the first message, edit and fix at will :-)
In product plone.app.referenceablebehavior I will to change the zcml and put it into the plone domain and translate it there. And I will delete locales folder and edit configure.zcml removing reference for folder.
And I will merge french translation.
Since 3.4.5 i18ndude supports chameleon, so there should be no need to "modify your local zope.tal".
This lines should also go:
Thanks @ale-rt I didn't see the new version, I updated the instructions in the i18n.cfg file.
@gforcada Thanks for beginning this work. I'm glad I'm not the only one anymore to know how to update Plone translations. For the script in the first comment, I think it's not complete. This:
bin/i18ndude admix ${P_A_LOCALES}/$locale/LC_MESSAGES/plone.po ${TARGET_PACKAGE}/$locale/LC_MESSAGES/${PO_FILE} > ${P_A_LOCALES}/$locale/LC_MESSAGES/${PO_FILE}.po
should be:
bin/i18ndude admix ${P_A_LOCALES}/$locale/LC_MESSAGES/plone.po ${TARGET_PACKAGE}/$locale/LC_MESSAGES/${PO_FILE} > ${P_A_LOCALES}/$locale/LC_MESSAGES/plone.po.tmp
mv ${P_A_LOCALES}/$locale/LC_MESSAGES/plone.po.tmp ${P_A_LOCALES}/$locale/LC_MESSAGES/plone.po
I edited the first comment with this solution.
@vincentfretin the mv
is on the next bullet point :-) I just removed it because now is redundant
We should do a i18ndude find-untranslated on all packages too. I did it only for Products.CMFPlone at the ploneconf sprints and fixed several issues.
@vincentfretin that's something that's most probably suited for jenkins to do, running it once per week and sending an email to (who?) would be enough?
@gforcada I replied directly to https://github.com/plone/jenkins.plone.org/issues/132
plone.app.caching translations are currently in plone.app.locales/plone/app/locales/locales-addons
I'm not sure about the plone.app.widgets package. Do we have messages there that is not in the "widgets" domain (pot file generated from the mockup repo)?
BTW, plone.app.lockingbehavior, plone.app.referenceablebehavior and some other packages are not part of Plone core, but are in the Ecosystem section (see versions.cfg). Do we really include them in plone.app.locales?
I'm in favor of including ecosytem packages in plone.app.locales to increase the visibility for translators. Generally it's 2 or 5 messages in each package. There was only the French translation in plone.app.referenceablebehavior for example. :)
hi @vincentfretin - when I run bin/i18n plone
as described in the howto above, I have o lot of changes (87), that are not related what I was working on. I'm not sure how to go about this. Do you have any suggestions?
@staeff Yeah, there are lots of messages from permission zcml directive, we working on this https://github.com/collective/i18ndude/pull/31
Do this and you'll be set:
cd src/plone.app.locales
git checkout .
git pull
cd ../..
cd src/i18ndude
git checkout 85c6884ec93eb5fca3c421006a4e29565769d148
This will uses the commit before the latest commit of the i18ndude maurits-extract-zcml branch. You should have 0 new message, 0 removed with this.
@staeff you should now remove src/i18ndude and rebuildout. (the branch was force pushed)
For those who are working on this. I don't follow continuously the activity here. Please merge your PRs yourself when you're done. If you are not sure, ping me or @gforcada and we will give you a go to merge. More importantly when you do the plone.app.locales PR, don't wait too long to merge it because it will expire quickly (no automatic merge) and you will have to redo your work. Please update the todo list in the first comment as well. Thanks.
@vincentfretin there are a bunch of PR open regarding this move by different people. Self-merge is usally not what we want. I lost a bit track here. May I ask you to merge them if all is fine from your POV?
Sure It would help if the persons doing PR reference this issue.
full ack, this is overall always a good way to keep things together.
We now use i18ndude master, the zcml branch has been merged.
@vincentfretin - moved plone/plone.formwidget.recurrence translations to p.a.locales. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/166 https://github.com/plone/plone.formwidget.recurrence/pull/19 https://github.com/collective/plone.app.locales/pull/94
@vincentfretin - Use plone i18n domain for plone.formwidget.namedfile. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/168 https://github.com/plone/plone.formwidget.namedfile/pull/18 https://github.com/collective/plone.app.locales/pull/95
merged. @staeff can you edit the first comment of this issue to check the packages you did? Thanks.
@vincentfretin thanks for merging. Yes I'll update the first comment. Also: I forgot some changes and you already merged. Could you review https://github.com/plone/plone.formwidget.namedfile/pull/19 and merge if its ok. Thank you!
@vincentfretin - Use plone i18n domain for plone.formwidget.datetime. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/170 https://github.com/plone/plone.formwidget.datetime/pull/16 https://github.com/collective/plone.app.locales/pull/96
@vincentfretin - Use plone i18n domain for plone.formwidget.datetime. This are the related pull requests: https://github.com/plone/plone.formwidget.autocomplete/pull/17 Since there were no translation file in this products, its only this single pr.
@vincentfretin - Use plone i18n domain for plone.formwidget.datetime. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/171 https://github.com/plone/plone.formwidget.contenttree/pull/23 https://github.com/collective/plone.app.locales/pull/97
@vincentfretin - Use plone i18n domain for plone.formwidget.datetime. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/172 https://github.com/plone/plone.app.versioningbehavior/pull/22 https://github.com/collective/plone.app.locales/pull/98
@vincentfretin - Use plone i18n domain for plone.caching. This are the related pull requests: https://github.com/plone/plone.caching/pull/2 Since there were no translation file in the product, its only this single pr.
@vincentfretin - Use plone i18n domain for plone.caching. This are the related pull requests: https://github.com/plone/buildout.coredev/pull/173 https://github.com/plone/plone.app.widgets/pull/126 https://github.com/collective/plone.app.locales/pull/100
As @mauritsvanrees said in https://github.com/plone/plone.formwidget.autocomplete/pull/17 plone.formwidget.autocomplete master is used in Plone 4.3.x as well. Instead of maintaining a branch of plone.formwidget.autocomplete just for the translations in Plone 4.3.x, I suggest to include them in plone.app.locales 4.3.x as well. It should be the case for plone.formwidget.namedfile and plone.formwidget.datetime too. Did I forget a package that use master for both Plone 4.3 and Plone 5? Commits will follow.
@mauritsvanrees It should be good now.
@vincentfretin Very good. Thank you!
@vincentfretin I'm not clear about the background of this change, but your commit in plone.formwidget.datetime
to depend on plone.app.locales >= 4.3.9
broke Plone 4.3 buildouts that include plone.app.contenttypes (1.1.x)
:
Version and requirements information containing plone.app.locales:
[versions] constraint on plone.app.locales: 4.3.7
Requirement of Products.CMFPlone: plone.app.locales
Requirement of plone.formwidget.datetime[z3cform]: plone.app.locales>=4.3.9
Requirement of plone.formwidget.datetime>=1.1: plone.app.locales>=4.3.9
Requirement of plone.app.locales: setuptools
While:
Installing instance.
Error: The requirement ('plone.app.locales>=4.3.9') is not allowed by your [versions] constraint (4.3.7)
For example, the plone.app.contenttypes 1.1.x
buildout will fail like that.
http://dist.plone.org/release/4.3-latest/versions.cfg pins
plone.app.contenttypes = 1.1b5
plone.app.event = 1.1.5
plone.app.locales = 4.3.7
p.a.event 1.1.5
depends on plone.formwidget.datetime>=1.1
plone.formwidget.datetime
then depends on plone.app.locales >= 4.3.9
plone.app.locales = 4.3.7
from the 4.3-latest
KGS.(Let me know if you'd like me to open up a separate issue for this somewhere - I'll then move my comment accordingly).
@lukasgraf The explicit dependency is intentional so you don't end up with the datetime widget only in English. I want the buildout to fail :) Several solutions here:
Moving plone.app.multilingual translations into plone.app.locales:
plone.app.multilingual master is used both for Plone 5.0.x and 5.1.x, so I included the translations in both 5.x and master branches of plone.app.locales.
https://github.com/plone/plone.app.multilingual/pull/306
https://github.com/collective/plone.app.locales/pull/200 https://github.com/collective/plone.app.locales/pull/201
https://github.com/plone/buildout.coredev/pull/429 https://github.com/plone/buildout.coredev/pull/430
We have some packages that started their lives as non-core addons, but didn't merge their translations into plone.app.locales when they were added to core.
See:
[edit by @jensens] added 2 packages [edit by @gforcada] added a bunch more
HOW TO [remixed by @gforcada from https://github.com/plone/plone.app.event/issues/181#issuecomment-96406149 thanks @vincentfretin]
./bin/develop co $PACKAGE_NAME
)experimental/i18n.cfg
in buildout.coredev 5.1 to include the target package inplone
domain. See https://github.com/plone/buildout.coredev/commit/802549d6da0609063cd3edaf6099ec356e5354cabin/buildout -c experimental/i18n.cfg
on buildout.coredev 5.1bin/i18n plone
to regenerate plone.pot and resync plone files. (If there is any removed messages, be sure to look if this is normal, it may be an issue you have to fix before continuing your work)bin/i18ndude admix
command to transfer translated messages from the target package to plone.po for each language. Something like this:i18n:registerTranslations
directive inconfigure.zcml
)experimental/i18n.cfg
updateplone.app.locales
!