My Vietnamese is about as bad as your motivationalese
you can always use Google Translate, for despair of @gforcada
Xin chào, tôi tên là Hector và tôi đến từ Mexico; bạn tôi là Kim từ Canada, nhưng đôi khi anh ta hoạt động như một người Mỹ và điều đó có vẻ kỳ quặc đối với tôi.
On a more practical aspect... there is yet another (surprise surprise) jenkins job that looks for strings not marked for translation.
Who would be the i18n hero to mark them for translation or to not be translated?? @cewing maybe that's a good task for gsoc-students-to-be: grab that file and resolve if 50 strings there need to be translated
Yes that would be nicer, but it seems that jenkins is stripping the styling... no idea what's going on... See https://jenkins.plone.org/view/Translations/job/plone-5.2-i18n/ws/src/plone.app.locales/plone/app/locales/locales/reports/plone.html
@cewing I created a job for each Plone version:
https://jenkins.plone.org/view/Translations/job/plone-5.0-i18n-find-missing/
https://jenkins.plone.org/view/Translations/job/plone-5.1-i18n-find-missing/
https://jenkins.plone.org/view/Translations/job/plone-5.2-i18n-find-missing/
See the missing.txt file on the Last Successful Artifacts for the file that contains the report.
The 4.3 job does not work as the part for finding strings not marked for translation is missing, I already reported that.
@gforcada, I love the idea of adding this as a "beginner" task for GSoC students to take on. It would help them to interact with a wide variety of Plone pages and UI and help us to shorten that list.
@gforcada now that there is more interest in the Internationalization/Translations team someone needs to add these job links to a good landing page for the team's activity and to-do lists... – @vincentfretin
Translations could be a good idea for newbies, but i'm afraid that with gsoc we will complete only Indian ones (more or less)
BTW I spent all the afternoon (an ugly cold rainy day) to update all Italian translations on p.a.locales and tried to reach the 100% coverage goal
The most funny part was to understand recurrence labels, because as @hvelarde says, it's very difficult fix them without defaults..I was lucky that as Italian i can understand catalan (again more or less)
To be fair, that would open up Plone to a heck of a lot of new users and the original idea of a GSoC project to make it easier to produce or edit or improve translations would help all language translations.
Bravo!
… sounds like a normal day here…
Two years ago, I managed to translate Norwegian 'to 92%'. For unknown reasons, this never made it into plone.app.locales
Now, I forked the plone.app.locales and I wonder:
Is there a smart way to get 'any translations that is still valid' into the new po-file (without cut/paste)?
In other words, is it possible to get translations from for example:
https://github.com/espenmn/plone.app.locales/blob/master/plone/app/locales/locales/no/LC_MESSAGES/old_plone.po
into
Yes, there is quite a lot of tooling available, if command line is fine, msgmerge is the right tool.
From msgmerge --help
:
Merges two Uniforum style .po files together. The def.po file is an
existing PO file with translations which will be taken over to the newly
created file as long as they still match; comments will be preserved,
but extracted comments and file positions will be discarded. The ref.pot
file is the last created PO file with up-to-date source references but
old translations, or a PO Template file (generally created by xgettext);
any translations or comments in the file will be discarded, however dot
comments and file positions will be preserved. Where an exact match
cannot be found, fuzzy matching is used to produce better results.
@espenmn You can use i18ndude in this way:
i18ndude admix plone.po old_plone.po > new_plone.po && mv new_plone.po plone.po
Help:
i18ndude admix -h
usage: i18ndude admix [-h] [--wrap | --no-wrap] [--width NUMBER] file1 file2
Given two po-files I will look for translated entries in file2 that
are untranslated in file1. I add these translations (msgstrs) to
file1. Note that this will not affect the number of entries in file1.
The result will be on stdout.
positional arguments:
file1
file2
optional arguments:
-h, --help show this help message and exit
--wrap Wrap long lines.
--no-wrap Do not wrap long lines. This is the default.
--width NUMBER Set output page width. Default is 79.
Thanks, … timesaver
We have been working these days on moving some more translations into "plone" domain.
According to the list made on https://github.com/plone/Products.CMFPlone/issues/983 these week plone.app.multilingual, plone.dexterity and plone.app.caching translations have been moved into plone.app.locales.
You can already translate those files both for Plone 5.0 and 5.1.
I have made PRs for i18ndude master and 4.x to output the statistics of the languages sorted by percentage:
$ i18ndude list -p plone .
Messages: 3172100% - Basque (eu)
100% - Español (es)
95% - Italiano (it)
95% - Português do Brasil (pt-br)
90% - Nederlands (nl)
89% - Catalan (ca)
88% - Traditional Chinese (zh-tw)
88% - French (fr)
85% - Deutsch (de)
79% - Japanese (ja)
79% - Українська (uk)
75% - Danish (da)
70% - Chinese Simplified (zh-cn)
The traditional way with the three tiers is available with the new option --tiered
.
Maybe for Plone the tiered order is still okay (though I would favor the new one), but certainly for add-ons the new default seems nicer. For example these are all the stats for the collective.cover
domain:
$ i18ndude list -p collective.cover
Messages: 132100% - Português brasileiro (pt_br)
91% - Nederlands (nl)
87% - Traditional Chinese (zh-tw)
69% - Japanese (ja)
68% - Catalan (ca)
68% - Deutsch (de)
68% - Italian (it)
68% - Finnish (fi)
66% - Norwegian (no)
64% - Spanish (es)
I have spent a few days translating plone.app.locales
So, all the files in
https://github.com/espenmn/plone.app.locales/tree/master/plone/app/locales/locales/no/LC_MESSAGES
now are more or less completely translated, (except from 'admin stuff' that is just as well kept in english…)
I have one potential problem:
I translated some of it at home, and after a while I discovered that many of the 'Norwegian letters' had become wrong, so I had to search and replace them.
(I did this in TextWrangler)
Anyway: The plone.po files validates in po-editor, but is there something else I should check / test ?
I guess po-editor is fine.
I usually check it with msgfmt -c path/to/domain.po
. It might report a missing Language
header, which I then add to get rid of the warning, but Plone does not miss this. Any other errors are probably real problems you should fix.
Here is a sample where I iterate over all po files in a client project, showing the missing Language header and one real problem:
$ cd locales/nl/LC_MESSAGES
$ for i in *po; do msgfmt -c $i; done
passwordresettool.po:81: duplicate message definition...
passwordresettool.po:29: ...this is the location of the first definition
msgfmt: found 1 fatal error
plone.app.versioningbehavior.po:2: warning: header field 'Language' missing in header
plone.po:4: warning: header field 'Language' missing in header
plone.tinymce.po:2: warning: header field 'Language' missing in header
ploneformgen.po:8: warning: header field 'Language' missing in header
Note that msgfmt -c
leaves behind a messages.mo
file that you can delete.
This is now available in i18ndude 4.4.0 and 5.1.0:
(i18ndude 5.x is compatible with Python 2 and 3 (thanks to Guido Stevens!). It needs zope.tal 4.3.0 or later, which conflicts with the version pin in Plone 5.1 or earlier, but it is fine to use in all Plone versions if you install it separately in a virtualenv or in a small buildout.)