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

Re: Further reduction of l10n sync commits



Quoting Frans Pop (aragorn@tiscali.nl):
> Hi Christian,
> 
> 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).

That one seems really safe to me.

Testing it requires me to sit down for on or two hours, ignore all
other stuff and work on this....this may take time.

I agree that populating all Last-Translator fiels with the last
translator/committer is quite useless. After all, we all know that the
important information is in the master file.

> 2. Ignore any changes in lines leading up to the first msgid line
> This is probably the better option.
> 
> The first msgid line is actually the one before the PO header lines of
> course, so changes in those _will_ be considered.
> 
> This will require some fancy scripting, but the following snippet will
> result in a file that has only the relevant part of the PO file.
> The same would of course have to be done for $lang.po.new.
> 
> egrep -v "$filter" $lang.po | \
> tail -n $(( \
> 	    $(cat $lang.po | wc -l) - \
> 	    $(grep -n -m1 "^msgid" $lang.po | cut -d: -f1) + 1 \
> 	 )) $lang.po > $oldfiltered
> 
> Explanation:
> tail -n { <total nr of lines> -/- <line number of first msgid line> +/+ 1 }
> 
> 
> Please test yourself before committing.


Hmm, that snipped is more difficult for me to detail but I see the
point and I'm confident in your shell writing skills (more than mine
anyway) so I'll test it as is....

So, if we want this tested (and we do), this won't probably happen
very soon.....I just leave your mail in my Inbox as a reminder (my
Inbox is my usual TODO list).




Reply to: