Re: Tool to help translators
| From: | Thierry B. | Date: | Wed, 17 Sep 2003 06:05:08 +0000 |
| Subject: | Re: Tool to help translators | ||
| References: | 1 2 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-1526@lists.php.net to get a copy of this message | ||
Hi,
Although I'm not a PEAR developer and never had to create a docbook/xml fole
from scratch, I will try to add this file myself, but the point is: what to
put in ?
- that people have to run it themselves in their own copy of peardoc, or do
you think it can be built with peardoc for each language ?
- It would be fine that people who write the english files always put the
$Revision$ keyword in all files. I don't see any manual pages where they are
guidelines to write manuals.
- It would be nice to automatically add the Revision keyword to all english
files that do not have it already. Ford such a script/toll exist ? The most
interessant feature of revcheck.php is to quickly see the diff between the
english translated version and the current one. If the majority of the
english file don't have it as is is today, the main appeal of this script is
very decreased.
Thierry Bothorel
[Sorry for my 'ill-formatted' first post, here it is again below.]
----- Original Message -----
From: "Greg Beaver" <greg@chiaraquartet.net>
> Hi Thierry,
>
> Nice work! Perhaps this could be added to the FAQ (I'm sure no one
> would complain if you just popped it in the English FAQ yourself, unless
> you don't have time).
>
> Thierry Bothorel wrote:
>
Hi,
personaly, I find that is is a pain "maintaining" translated files up to
date and for new translators to see what is to be done. I began using
filters in my mail client to detect only files already translated that were
comitted again. I gave up quickly.
> >
After some searches, I found the "PHP Documentation HOWTO" link that is a
litle bit hidden on php.net. Then I really found a gem (to my point of
view) on this page :
http://www.php.net/manual/howto/translation-revtrack.html
> >
This is a simple php script (revcheck.php) that output a nice html page will
all translated/unstranslated files, and especially what I look for, a list
of not up to date translated file with a direct link to viewcvs to see
exactly what is changed.
There is one requirement : the english files must have the $Revision$
keyword at the top of the page, and the translated file must have :
<!-- EN-Revision: 1.16 Maintainer: jane Status: ready -->
at the top of the page (in fact the script look for the first 500
characters).
I added this line to all the french files and put a demo here as well as a
link to
download revcheck.php:
http://perso.wanadoo.fr/t.b/Temp/demo_revcheck.html
Use of translation.xml file is optional but add some useful information to
the
output. As you can see links to diff when the english file does not have the
$Revision$ keyword are broken.
Usage :
- put revcheck.php in /peardoc/ directory
- put trnaslation.xml in /peardoc/lang/ directory (optional)
- run '$ php revcheck.php xx >revcheck.html' where xx is the lang directory
- open revcheck.html if /peardoc/ directory to see the output.
Revcheck is designed to run from a shell only.It would be VERY nice (:-) if
this revcheck.html could be built for each language with the whole peardoc
manual and opened with 'http://www.pear.php.net/manual/lang/revcheck.html'
Thierry Bothorel
>
>
>