Re: Some useful scripts



2008/8/12 Leonardo F. Fontenelle <leonardof gnome org>
Em Seg, 2008-08-11 às 15:46 +0200, Gil Forcada escreveu:
>
> To ease my translation/revision workflow I have made some small bash
> scripts that I'm attaching if anyone things they are useful :)

I got a few of them too, so I'll post them here. Most of my workflow is
abount revision, so usually the pt_BR.po files wil be somebody else's

* zzcl - Besides calling prepare-ChangeLog.pl (cl, ChangeLog), it
tiddies up the message catalog (i. e. breaking the long lines from
poEdit) and run a few checks. I run it on
$module/po{,-locations,-properties}/pt_BR.po. It can be used to commit
catalogs with minimal checking (for senior translators in our team),
after saving the new translation as pt_BR.po.gz or pt_BR.po. The
pt_BR.po.trad will make more sense in a minute. After running zzcl, it's
just a matter of "svn ci" and copy an past the ChangeLog entry to the
commit message.

* zzpo - Also to be run after checking out the module translation from
SVN. It asks for a translated message catalog (i. e. downloaded from our
Vertimus server) to be reviewed, and a message catalog from damned-lies.
It makes it easy for me to see what the translator changed, and also
runs pofilter to check for new or old errors. If I do any fix to the
translation, the resulting pt_BR.po and pt_BR.po.trad are used by zzcl
to generate a diff, which I use to inform the translator about the
changes I made.

* zzco - Yet another "svn co" wrapper.

I'm working with a teammate on a script to streamline the checkout part.
The script should use damned-lies information to find the appropriate
branch for a given module in a given release set. We already have a
functional version (actually two, in shell script and ruby), and should
publish them soon.

PS: the script names are an homage to the zz functions, these misc.
shell script utilities (in Portuguese): http://funcoeszz.net/


Your scripts are really useful and I'm intend to use some or cherry-pick some parts :)

The main idea behind my script is to update the new PO and the old one in SVN with intltool-update to compare the both after with colordiff (I'm slower with meld).

intltool-update fr
cp fr.po fr.po.orig
cp new-fr.po fr.po
intltool-update fr
colordiff -u fr.po.orig  fr.po | more

I'll be great if you could add your scripts to the wiki for example (with some cleanups pt_BR -> argument or conf, etc).

It's painful to copy/paste the Changelog in the commit message, so sometimes I use the dangerous following command:
head -n3 ChangeLog > ./log
svn ci -F ./log ChangeLog fr.po

It's dangerous because no check is done to control Changelog is modified.

Stéphane

 



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