Re: Translations and changelogs
On Sat, Jan 17, 2004 at 10:19:54PM +0100, Nikolai Prokoschenko wrote:
> Considering changelogs: according to the current documentation, it is
> necessary for the translator to update the package's changelog, being
Well, it seems that nobody really reacted to my post.Nevertheless, I have
the first version of the script implemnting the described behaviour
attached. It would be nice, if someone expresses his opinion about it, and
I would really appreciate it being used in the deploying of udebs (and
maybe other packages too).
The general usage is at the moment relatively simple: the script outputs,
which .po-files has been updated and this output could be fed to dch. For
example, I updated the current changelog of anna (of course, no commit has
been done) from debian-installer/anna directory with a single command:
../compare_changelogs . | while read line; do dch -a "$line"; done
(compare_changelogs's location can vary, of course).
The script is not perfect, but have fun with it anyway :)
firstname.lastname@example.org / Jabber: email@example.com
# A script to find out, which .po files has been updated since the last
# update, according to the PO-Revision flag and the Debian changelog
# Copyright (c) 2004 Nikolai Prokoschenko (firstname.lastname@example.org)
# This script is available under the GNU Public License
if [ "x$1" = "x" ]
echo "Usage: $0 <package-directory>"
PACKAGE=`echo $P | sed 's/\/$//g'`
if [ ! -d $PACKAGE ]
echo "Cannot access the directory $PACKAGE!"
if [ ! -e $CHANGELOG ]
echo "Cannot find the changelog file!"
# Line number of the changelog's old date
LINE=`grep "; urgency=" "$CHANGELOG" | grep -n "$RELEASE" | head -n 1 | sed 's/:.*//g'`
# Date of the last release
DATE=`grep " --" "$CHANGELOG" | head -n $LINE | tail -n 1 | sed 's/.*> //g'`
OLD_DATE=`date -d "$DATE" +%s`
for i in $POS/*.po
if [ -e $i ]
DATE=`grep PO-Revision "$i" | cut -d ":" -f 2,3 | sed 's/^ //g' | cut -d '\' -f 1`
if date --date "$DATE" 2>/dev/null 1>&2
NEW_DATE=`date -d "$DATE" +%s`
if [ $NEW_DATE -gt $OLD_DATE ]
echo "Updated `echo $i | sed 's/^.*\///g'` translation"