On Tue, Mar 07, 2006 at 12:35:47AM +0100, Frans Pop wrote: > Hi Christian,
Hi, I'm not Christian, but let me reply anyway ... > There still are times when a minor change in the translation for a > language will result in all packages being updated. Often this is caused > by very minor changes in comments in the head of the po file. > > Please consider the following two options for l10n-sync to ignore these. > > 1. Just ignore any change in comments > Reasoning: any important changes in comments (if not accompanied by other > changes) come from the POT file, not from the translator. > > The following patch will do that (and has a minor optimization which I've > already committed). > > --- l10n-sync (revision 35133) > +++ l10n-sync (working copy) > @@ -569,7 +569,7 @@ > > filter="((PO-Revision-Date|Project-Id-Version|Report-Msgid-Bugs-To|POT-Creation-Date|Last-Translator|Language-Team|MIME-Version|Content-Type|Content-Transfer-Encoding|X-Generator|Plural-Forms):)|^#[^,]|^\#$" > cat $lang.po | egrep -v "$filter" >$oldfiltered > cat $lang.po.new | egrep -v "$filter" >$newfiltered > - if [ -z "$(diff --ignore-matching-lines="PO-Revision-Date:" $lang.po > $lang.po.new)" ] ; then > + if [ -z "$(diff --ignore-matching-lines="\(^#\|PO-Revision-Date:\)" > $lang.po $lang.po.new)" ] ; then It looks like this is already matched by $filter, isn't it? Even if it is used for different actions it may be useful to create a new filter based on the old one. Just use it: if [ -z "$(diff $oldfiltered $newfiltered)" ] ; then Nevertheless I think that "Plural-Forms:" should be excluded from the list or compared separately (not necessary when the first commit (maybe via the New Language Process) checks that it is correct) so that a wrong one can be corrected. The same is true for "Content-Type:" to match a changed encoding. - # We don't commit if only PO-Revision-Date changed + # We don't commit if only comments, white spaces, ... changed > rm $lang.po.new > else > BTW. I think we should also ignore changes in the "Last-Translator:" header. Also matched by the filter above. > 2. Ignore any changes in lines leading up to the first msgid line > This is probably the better option. Just add "|^[[:space:]]*$" to the filter. > Please test yourself before committing. I tested it on a single file and it should work. Jens -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

