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

Re: [Manual] Revision tracking script [was: German translation of the Sarge Installation Manual]



On Sat, May 01, 2004 at 03:38:41PM +0200, Frans Pop wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Saturday 24 April 2004 23:53, Denis Barbier wrote:
> > > > On Sun, Apr 18, 2004 at 11:15:39PM +0200, Frans Pop wrote:
> > > > > Also, I have seen the revision number of the en docs change without
> > > > > the content of documents changing (probably due to an reorganization
> > > > > or something), so it would be nice to also have an option to
> > > > > automagically update the revision numbers in translations if there
> > > > > are no real changes.
> > > >
> > > > Absolutely, the smart_change.pl script I wrote for webwml may be
> > > > adapted here.
> > >
> > > Where can I find this script or could you send it to me?
> >
> >   http://cvs.debian.org/webwml/smart_change.pl?cvsroot=webwml
> > It uses modules found under
> >   http://cvs.debian.org/webwml/Perl/?cvsroot=webwml
> >
> > But after looking at the code, it seems that making it support SVN
> > instead of CVS is not trivial, writing a new tool from scratch is
> > certainly easier.
> 
> Hello Denis,
> 
> I have updated the doc-check perl script to include this functionality 
> (borrowing from the links you provided: thanks).
> 
> Would you be so kind as to review the script (attached) as this is my first 
> effort ever in perl :-)
> Comments on my changes or suggestions for improvement are welcome as well.

Hi Frans, your coding style is fine, I have few comments.  Please move
the checkdiff definition above all other functions, the diff is then
much clearer.
In the original version, dot in revision numbers were accepted because
some translations still used CVS revision numbers.  Also $Revision$ is
more terse and may be used insted of $Id$, IMO old tests against
$Revision$ should be kept.

> What happens is the following:
> - - if a document in the directory for the requested language still contains
>   <!-- $Id: <docname> <revnr> ... -->
>   it is assumed the document is untranslated and this line is replaced by
>   <!-- original version: <revnr> untranslated -->
> - - if the -u option is used, revision numbers in translated documents are
>   updated to the revision number in the original document (keeping the
>   'untranslated' mark if present)

I dislike these changes, doc-check should only perform checks without
modifying files.  Your script looks like webwml/copypage.pl; it is
definitely useful, but should IMO be a separate script.

> I think the first option using the 'untranslated' mark is very useful if the 
> manual is partially translated as it allows translators to just copy the 
> original files to their own directory and still
> - - keep track of changes in these documents;
> - - keep track which documents have been translated and which have not.
> The translator should of course remove 'untranslated' from the remark when he 
> starts translating it.

Untranslated docs are not displayed when file is up-to-date (but
untranslated), is it intentional?

Denis



Reply to: