[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Translation stuff to do before a release (Was: Re: svn commit: r36625 - in branches/1.6.x: . subversion/po subversion/svn)

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Wed, 18 Mar 2009 11:39:57 -0500

On Mar 18, 2009, at 4:55 AM, Jens Seidel wrote:

> On Tue, Mar 17, 2009 at 11:13:19PM -0500, Hyrum K. Wright wrote:
>> We are asking you to trust the rules of the community, and if there
>> are
>> inefficiencies, to help us find and correct them. For instance,
>> would it
>> be possible to script the merging of translations to the release
>> branch?
>
> This code exists already: It's mentioned in TRANSLATING:
> "Maintenance on branches". This is not optimal as it mentions e.g. the
> po-merge.py script but doesn't use the full paths in the example
> command.
> Normally it is something I would just change but I always hesitated
> because
> I don't have permission (OK, it's an obvious fix, but once I start
> updating
> I'm not willing to stop until everything is perfect) ...
>
> Merging translations is indeed not trivial but there exist tools such
> as msgmerge (from the gettext package). I don't know why po-merge.py
> exists
> and suspect it is just a msgmerge replacement for Windows people.
>
> This po-merge.py gave me the last day the error message:
>
> 1.6.x/$ svn cat http://svn.collab.net/repos/svn/trunk/subversion/po/de.po
> |
> tools/dev/po-merge.py subversion/po/de.po
> Traceback (most recent call last):
> File "tools/dev/po-merge.py", line 171, in <module>
> main(sys.argv)
> File "tools/dev/po-merge.py", line 160, in main
> for m in msgstr:
> TypeError: 'NoneType' object is not iterable
>
> This needs to be analysed (and the script should be moved into tools/
> po/).
>
> I used the following workaround (the non-trivial task, but every
> translator
> should know at least the basic gettext commands) (in 1.6.x/):
>
> $ svn revert subversion/po/de.po
> $ tools/po/po-update.sh de
> $ cp subversion/po/de.po subversion/po/de.po.updated
> $ cp ../trunk/subversion/po/de.po subversion/po/
> $ msgmerge -U subversion/po/de.po subversion/po/de.po.updated
>
> Using the -C (compendia) option may be useful as well, to reuse
> strings
> available in the release branch but absent in trunk.
>
> All this should be done by po-merge.py and it worked in the past.
>
> The document (TRANSLATING) misses also information about the new
> environment
> variable SVN_LOCALE_DIR (I tested it with
> export SVN_LOCALE_DIR=/home/jens/local/subversion1.6.old/share/locale/
> and it worked well finding the translations after I moved the
> installed path
> to ".old"). I also noticed that current i18n tools/scripts
> assumes very old gettext versions. Example:
> tools/po/po-update.sh:
> # In a display of truly bizarre behaviour, msgmerge (at least, the
> # GNU gettext-tools 0.14.6 implementation) inverts the order of
> obsolete
> # messages every time it is run. Therefore, run it twice, to
> invert and
> # then re-invert, to minimize spurious diffs.
> $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
> $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
>
> A single call to $MSGMERGE should be sufficient and I would add the
> --previous option (new since 2(?) years), as this adds information
> about
> what changed to make a string fuzzy (so that the translation is
> outdated and
> not used). This --previous option adds special comments which need to
> be supported by some python scripts (because it's a reimplementation
> of some
> gettext tools).
>
> OK, this needs to be properly explained/tested/... and I should
> provide a
> patch, I know.

In r36656, I moved TRANSLATING to www/translating, so hopefully it
will be easier to read and update. Feel free to submit patches
against this documentation, and any existing patches which need help.

-Hyrum
You can p

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1349395
Received on 2009-03-18 17:40:16 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.