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

I did commit a new and pretty different version of check_trans.pl



Hello,

I just commited a new version of webwml/check_trans.pl .

I think it will be interresting for any translation team: in the french
team, we know use it to send mails to translators to inform them of the
pages which need to be updated. Here are some comments I placed at the
begining of the script:

# Making Mails
#  If you want to, this script send mails to the maintainer of the mails.
#  BEWARE, SOME PEOPLE DO NOT LIKE TO RECEIVE AUTOMATIC MAILS !!
#  PREQUESITE:
#  o To do so, you need two databases: 
#     - one to see which translator maintains which file
#       it must be named "./$langto/international/$langto/current_status.pl"
#         with $langto equal to "french", "italian" or so
#       Please refer to "webwml/french/international/french/current_status.pl"
#        to have an example
#     - one to get info about translators and the frequency at which they
#        want to get mails. It must be named
#        "webwml/$langto/international/$langto/translator.db.pl"
#       Please refer to the french one for more info
#  o You must also have the perl module called "MIME::Lite", which is not
#      yet packaged. You can download it from your favorite CPAN...
#  USAGE:
#   - If you give the "-g" option, all mails are sent to the "default
#      addressee" (ie, the one given as value to the -m option), without
#      respect to their normal addressee. It is usefull if you want to run
#      it for your own, and for debugging.
#   - With out it, it sends real mails to real addresses.
#     BE SURE THE ADDRESSEES REALLY WANT TO GET THESE MAILS

For that, I added some options to the script, as explained in it:
# Options usefull when sending mails:
#       -g      debuG
#       -m      makes mails to translation maintainers
#               PLEASE READ CARFULLY THE TEXT BELOW ABOUT MAKING MAILS !!
#               (if -m is given, it must be followed by the default recipient)
#               (it should be the list used for organisation)
#               (I sent it to debian-l10n-french@lists.debian.org)
#       -n      send mails of priority upper or equal to <value> 
#               (ie, <value> must be 1 (monthly), 2 (weekly) or 3 (daily)


And here is a few more info I put at the top of the french database:

# In this file, you can find a DB about the translators. 
# It should be hand maintained by the coordinator, it is not modified
#  automatically.
# For now, it is only used by check-translation.pl 
#
# Here is the syntax:
#  The data is in a hash table named 'translators'. 
#  Each key is the name of a translator (trimmed, without email adress)
#  For each one, you have a (sub)hash table containing:
#    email => the current email of this guy
#    informations to describe what sort of automatic mail he/she want to get.
#     For each part, the value is numeric and means:
#        0: never, 1:monthly, 2:weekly, 3:daily
#     The different parts are:
#        summary: just the summary of what is needed
#          example: NeedToUpdate french/donations.wml from version 1.16 to
#                   version 1.29
#        logs: the cvs logs between the translated and actual version
#        diff: idem with the diff
#        file: add the last version of translated file (to avoid to cvs
#              update it before work)
#   compress: which type of compression you want to have
#     it could be: "none","gzip" ou "bzip2" 
#     (NOT IMPLEMENTED: for now, "none" is assumed in all case)


And then, the magic of the french team is done on my own machine, with
this file:

--[ /etc/cron.daily/check-pages]---------------
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

cd /home/mquinson/src/DEBIAN
cvs -z3 -d :pserver:french@cvs.debian.org:/cvs/webwml co webwml/english 2>&1|grep -v "cvs server: Updating"
cvs -z3 -d :pserver:french@cvs.debian.org:/cvs/webwml co webwml/french 2>&1|grep -v "cvs server: Updating"
cd webwml
d1=date +"%d"
d2=date +"%w"
#echo "d1=$d1 ; d2=$d2"
if   [ "x$d1" == "x1" ] ; then
   freq=1;
elif [ "x$d2" == "x3" ] ; then
   freq=2;
else
   freq=3;
fi
./check_trans.pl.new -Q -q -m debian-l10n-french@lists.debian.org -n $freq french
#./check_trans.pl.new -g -m mquinson@ens-lyon.fr -n $freq french
--[ /etc/cron.daily/check-pages]---------------

Well, this cron tab is an hack, but it works...


I think we could use the same system for the ddp, for example, but I've not
enought room on my disk to checkout it too...


Last point, Christian Couder (in cc) is working on a system to plug in the
script to have a sort of "translated diff", ie, the script will be able to
say, this hunk of the diff in original file is coresponding to lines nn to
pp in the translated file. It will be base on tags counting, if I understood
well.


I think I've said any important informations. If I missed some, please ask.

Bye, Mt.



Reply to: