#12976 closed enhancement (fixed)
Impossible to translate trac
Reported by: | Klumbumbus | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.17 |
Component: | i18n | Version: | |
Severity: | normal | Keywords: | |
Cc: | Dirk Stöcker, Steffen Hoffmann | Branch: | |
Release Notes: |
Added script to |
||
API Changes: | |||
Internal Changes: |
Description
I requested to join the german translation team at https://www.transifex.com/cboos/trac/ but received no reaction since months. (I talked to Dirk Stöcker but it seems he has no permission to approve my request.)
Attachments (6)
Change History (31)
comment:1 by , 7 years ago
Milestone: | → not applicable |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 7 years ago
Thanks. Will future requests be approved faster? There shouldn't be such a big barrier for new translators.
comment:3 by , 7 years ago
I haven't been receiving notifications from Transifex. I've added a check of the site to my weekly review.
comment:5 by , 7 years ago
At https://josm.openstreetmap.de/ we use trac 1.2.2
Which one do we need to translate at transifex, 1.2-stable or trunk?
by , 7 years ago
Attachment: | tractranslation.png added |
---|
comment:6 by , 7 years ago
1.2-stable. 1.2-stable is not trunk (1.3.x).
See wiki:TracL10N#UsingTransifex and wiki:TracL10N/Transifex.
comment:7 by , 7 years ago
I noticed that there are untranslated strings in e.g. trunk-messages.pot which are already translated in 1.2-stable-messages.pot Could you please copy these identical translated strings to the trunk branch so no double work is required by translators and they can concentrate on the changed/new strings? Else if a new version of trac will be released we will end up with a half translated trac again while the strings are actually translated.
comment:8 by , 7 years ago
You cloud easily copy using trasifex-client rather than transifex web interface, see wiki:TracL10N/Transifex#SynchronizationwithTransifex.
comment:9 by , 7 years ago
I'm not the translation team coordinator and the process written on wiki:TracL10N/Transifex#SynchronizationwithTransifex is too complex and risky for me.
by , 7 years ago
Attachment: | trunk-pofiles-de.zip added |
---|
by , 7 years ago
Attachment: | merge_catalog.py added |
---|
follow-up: 16 comment:10 by , 7 years ago
I wrote merge_catalog.py which merges translated strings from the given *.po file.
Results: trunk-pofiles-de.zip.
Please check the *.po files and upload to Transifex if no issues.
$ cd branches/1.2-stable $ tx pull -l de -f Pulling translations for resource trac.1_2-stable-messages-js-pot (source: trac/locale/messages-js.pot) -> de: trac/locale/de/LC_MESSAGES/messages-js.po Pulling translations for resource trac.1_2-stable-messages-pot (source: trac/locale/messages.pot) -> de: trac/locale/de/LC_MESSAGES/messages.po Pulling translations for resource trac.1_2-stable-tracini-pot (source: trac/locale/tracini.pot) -> de: trac/locale/de/LC_MESSAGES/tracini.po Done. $ cd ../../trunk $ for i in messages messages-js tracini; do > PYTHONPATH=. ./merge_catalog.py $i ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/$i.po > done Merged 254 messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/messages.po and updated trac/locale/de/LC_MESSAGES/messages.po Merged 11 messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/messages-js.po and updated trac/locale/de/LC_MESSAGES/messages-js.po Merged 64 messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/tracini.po and updated trac/locale/de/LC_MESSAGES/tracini.po
follow-up: 12 comment:11 by , 7 years ago
When I upload the files does transifex keep already translated strings untouched or will they be overwritten by the strings in the files (which are older for some)?
E.g. trunk - trac/locale/messages-js.pot is already at 100%. If I would upload your generated file would this change anything?
by , 7 years ago
Attachment: | trunk-pofiles-de_v2.zip added |
---|
follow-up: 13 comment:12 by , 7 years ago
Replying to Klumbumbus:
When I upload the files does transifex keep already translated strings untouched or will they be overwritten by the strings in the files (which are older for some)?
E.g. trunk - trac/locale/messages-js.pot is already at 100%. If I would upload your generated file would this change anything?
Sorry, I missed pulling *.po files for trunk from Transifex. Please use trunk-pofiles-de_v2.zip.
- messages.po: merged 90 strings from 1_2-stable-messages-pot (de)
- messages-js.po: merged no strings from 1_2-stable-messages-js-pot (de)
- tracini.po: merged 4 strings from 1_2-stable-tracini-pot (de)
$ tx pull -l de -f Pulling translations for resource trac.trunk-messages-js-pot (source: trac/locale/messages-js.pot) -> de: trac/locale/de/LC_MESSAGES/messages-js.po Pulling translations for resource trac.trunk-messages-pot (source: trac/locale/messages.pot) -> de: trac/locale/de/LC_MESSAGES/messages.po Pulling translations for resource trac.trunk-tracini-pot (source: trac/locale/tracini.pot) -> de: trac/locale/de/LC_MESSAGES/tracini.po Done. $ make stats-de trac/locale/de/LC_MESSAGES/messages.po: 1328 translated messages, 95 untranslated messages. trac/locale/de/LC_MESSAGES/messages-js.po: 63 translated messages. trac/locale/de/LC_MESSAGES/tracini.po: 80 translated messages, 116 untranslated messages. $ for i in messages messages-js tracini; do > PYTHONPATH=. ./merge_catalog.py $i ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/$i.po done Merged 90 messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/messages.po and updated trac/locale/de/LC_MESSAGES/messages.po Merged no messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/messages-js.po Merged 4 messages from ../branches/1.2-stable/trac/locale/de/LC_MESSAGES/tracini.po and updated trac/locale/de/LC_MESSAGES/tracini.po $ make stats-de trac/locale/de/LC_MESSAGES/messages.po: 1418 translated messages, 5 untranslated messages. trac/locale/de/LC_MESSAGES/messages-js.po: 63 translated messages. trac/locale/de/LC_MESSAGES/tracini.po: 84 translated messages, 112 untranslated messages.
comment:13 by , 7 years ago
Replying to Jun Omae:
Replying to Klumbumbus:
When I upload the files does transifex keep already translated strings untouched or will they be overwritten by the strings in the files (which are older for some)?
All strings would be replaced with strings in uploaded *.po file even if translated/untranslated.
by , 7 years ago
Attachment: | tracini_compare.diff added |
---|
follow-up: 15 comment:14 by , 7 years ago
Thanks, that looks better. Could you please create the files again without line wrapping in the translated strings? As the po files you can download from transifex don't use line wrapping in the translated strings this makes the diff file confusing. See attachment:tracini_compare.diff
comment:15 by , 7 years ago
Replying to Klumbumbus:
Could you please create the files again without line wrapping in the translated strings?
No. merge_catalog.py script uses Babel library which automatically wraps with 76 characters.
Try to upload the *.po files to Transifex before you modify the *.po files. Also, you could use the merge_catalog.py script.
follow-up: 17 comment:16 by , 7 years ago
Replying to Jun Omae:
I wrote merge_catalog.py which merges translated strings from the given *.po file.
That looks nice. Do you plan to put it in contrib
?
That might make it unnecessary to combine the messages from all the branches in a single pot file.
I found it was necessary to compile the catalogs in the target. The get_negotiated_locale
function will return None
unless catalogs have been compiled, since it calls get_available_locales.
$for i in messages messages-js tracini; do PYTHONPATH=. ./merge_catalog.py $i ../trac-1.2-stable/trac/locale/de/LC_MESSAGES/$i.po; done Traceback (most recent call last): File "./merge_catalog.py", line 79, in <module> sys.exit(main(domain, source_file) or 0) File "./merge_catalog.py", line 37, in main target = _open_pofile(target_file) File "./merge_catalog.py", line 23, in _open_pofile with open(filename, 'rb') as f: IOError: [Errno 2] No such file or directory: 'trac/locale/None/LC_MESSAGES/messages.po' [...]
Currently, the following steps work from clean working copies:
$ cd trac-1.2-stable $ tx pull -l de -f $ cd ../trac-trunk $ tx pull -l de -f $ make compile-de $ for i in messages messages-js tracini; > do PYTHONPATH=. ./merge_catalog.py $i ../trac-1.2-stable/trac/locale/de/LC_MESSAGES/$i.po; done
by , 7 years ago
Attachment: | merge_catalog-v2.py added |
---|
follow-up: 20 comment:17 by , 7 years ago
Replying to Ryan J Ollos:
Replying to Jun Omae:
I wrote merge_catalog.py which merges translated strings from the given *.po file.
That looks nice. Do you plan to put it in
contrib
?
Okay. Added copyright comments, merge_catalog-v2.py. I'll put it to 1.2-stable/contrib and trunk.
I found it was necessary to compile the catalogs in the target. The
get_negotiated_locale
function will returnNone
unless catalogs have been compiled, since it calls get_available_locales.
Thanks for the testing. Fixed it to check *.po
files rather than *.mo
files. It would be unnecessary to compile the catalogs.
comment:18 by , 7 years ago
I just uploaded the files. This moved 94 strings to trunk. Lots of saved translation work! Thanks for the support.
comment:19 by , 7 years ago
Cc: | added; removed |
---|---|
Milestone: | not applicable → 1.0.17 |
Release Notes: | modified (diff) |
Resolution: | fixed |
Status: | closed → reopened |
Type: | defect → enhancement |
comment:20 by , 6 years ago
comment:22 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:23 by , 5 years ago
Proposed changes for trunk to use argparse
in merge_catalog.py
: [75b976e56/rjollos.git].
Accepted.