Re: [Translation-i18n] The reason for make dist updating po files



Kenneth Rohde Christiansen wrote:

> Can someone update me on the situation please?

OK. The situation is that developers and translators both use the CVS for
exchanging PO files.

The developers change the PO files (using "make update-po" which invokes
msgmerge) every now and then; this is needed since after "make dist" people
expect a release tarball to contain up-to-date PO files.

The translators take a PO file from CVS, do an 'intltool-update' when
they take the PO file - this is OK since they want to translate freshly
added messages and don't want to translate obsolete messages -, then
do their work, and later commit the file. Up to now they use "cvs commit"
directly, but this has two problems:
  - Most translators don't know how to deal with CVS conflicts.
  - Some translators attempt to keep the period between update and commit
    as short as possible, because they fear the CVS conflicts.

The proposed tool 'intltool-commit' would automate this step, dealing
with the CVS conflicts. There are two kinds of CVS conflicts: (a) Those
caused by pure msgmerge application, and (b) those caused by other translators
that worked on the PO file simultaneously. 'intltool-commit' must distinguish
these two cases.

intltool-commit should be part of the intltools because it's the logically
converse step of intltool-update.

intltool-commit could work like this:
  0) Create the POT file using the current sources.
  1) Check using "cvs status" whether the PO file has been updated in the
     repository at all. If no, just invoke msgmerge and commit the result.
  2) Otherwise, we go through the CVS changes one by one. Let's call
     the file before and after the change xy.prev.po and xy.curr.po. Apply
     msgmerge (with the current PO file!) to these two files. Also apply
     "msgattrib --no-obsolete --no-fuzzy" to these two files as well.
     If the result is that the two files are identical, it was a commit of type
     (a). Ignore it. Otherwise prepare the "diff" between the two files
     and save it for later.
  3) Last step: Invoke msgmerge on the new PO file and then patch in the
     prepared diffs one by one. Make the translator aware what is happening,
     and let him also control the patching. Maybe tell him the list of
     "patch" commands to use. (In my experience, "patch" does more often the
     right thing than "cvs update"'s resolution mechanism.)

> Intltool actually does a lot of things gettext could do instead.
> Actually I would like it if you had a look at intltool Bruno - but that
> is a whole other story.

Oh, I looked at intltool already a long time ago. Let's talk about it on
xml-i18n-tools at gnome org.

Bruno



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]