On Wed, Sep 20, 2000 at 06:04:33PM -0400, James A. Treacy wrote: > On Wed, Sep 20, 2000 at 07:15:46PM +0200, Marcin Owsiany wrote: > > I have added the following patch to my working copy of Makefile.common and > > converted all wml files to the new method using the following command line > > > > cd polish; perl -np -i.bak -e > > 's/<!--\s*translation\s*([\d\.]+)[^-]*-->/#use > > wml::debian::translation-check translation="\1"/' `find . -name \*.wml` > > > > It seems to work, i.e. the files are remade if english originals ar touched. > > May the patch be applied to the repository? Will it break anything or will > > it cause too much load for the machine the web site is built on? > > > Can you explain the rationale for this? There is no reason for a translation > to be rebuilt if the original version is modified. Of course, when the > translation > is updated, it is rebuilt.
The idea behind translation-check.wml is that is puts a "big fat warning" on the translated page if it is outdated. As for the load that rebuilding of every translation of a page would cause, I have one idea: maybe we should invert the flow of information? I mean, do not make the translation depend on the original, instead make the original detect if the translations are outdated and only rebuild them when necessary. I mean something like: %.en.html: %.wml $(WML) $(<F) $(WMLBASE)/../check_translated $(CUR_DIR)/$< Where check_translated would be a perl/shell script that would do the following: ------------------------------------------------ file=$1 orig_revision = CVS_revision( english/$file ) for lang in $languages do trans_revision = CVS_revision( $lang/$file ) if ( ( orig_revision - trans_revision ) > N && ( orig_revision - trans_revision ) < N+1 ) then rebuild $lang/$file; done ------------------------------------------------- This would run wml for the translations only once, exactly when the translation gets outdated. what do you think? I guess the translation-check.wml is a good thing, and the above setup would keep the load at an acceptable level. Marcin -- +--------------------------------+ The reason we come up with new versions |Marcin Owsiany | is not to fix bugs. It's the stupidest |[EMAIL PROTECTED]| reason to buy a new version +--------------------------------+ I ever heard. - Bill Gates