From paul.poulain@free.fr Mon Jan 12 22:12:18 2004 From: paul POULAIN To: koha-devel@lists.koha-community.org Subject: [Koha-devel] Perl / regexp question Date: Mon, 12 Jan 2004 22:13:04 +0000 Message-ID: <4002D6E0.6000709@free.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3365218108806660412==" --===============3365218108806660412== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi, In the translator tool, we have a little problem. We have the following strings in templates : search the library. In the translation file for french, we have : search chercher So, the regexp : $line =~ s/(\W)$text(\W)/$1$subst$2/g; gives : chercher dans la bibliothèque. that is WRONG !!! (search.pl must not be replaced !) & I couldn't find the regexp that could work better. I tried to use HTML::Tree, HTML::TreeBuilder, but without success : it doesn't enjoy HTML::Template syntaxt & create bad HTML :-( I also tried to play with HTML::Parser, but without success neither. For instance, the workaround is NOT to replace strings translated by IGNORE, but that's really a poor way to do it, as some things are no more translated. but i'm still looking for a better solution to do this. Note : remembre we can also have search and this search is to be replaced... -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org) --===============3365218108806660412==--