From paul.poulain@free.fr Fri Dec 5 08:53:53 2003 From: paul POULAIN To: koha-translate@lists.koha-community.org Subject: [Koha-translate] [important]NEW TRANSLATION TOOL Date: Fri, 05 Dec 2003 17:57:21 +0100 Message-ID: <3FD0B8F1.9020205@free.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4449777484463155848==" --===============4449777484463155848== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit I've just commited a new translation tool. Feel free to test it AND IMPROVE IT. TRANSLATION TOOL : ============ This transation tool should greatly help Koha translators. It's composed of 2 script : * test-extract.pl, that extracts the texts in a template. It is called by * tmpl_process. tmpl process can do 3 things : - create a file with all sentences all files in a directory (& it's subdirectories) - update an existing translation file. - rebuild translated templates from english & translation file. Call tmpl_process --help to get full explanations. HOW TO TRANSLATE Koha : ============ 1- create your translation file : ./tmpl_process.pl update -i /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/en/ -s opac.fr -r 2- translate your opac.fr file (english & french being separated by a tab 3- create your translated version : ./tmpl_process.pl install -i /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/en/ -o /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s opac.fr -r 4- copy images in your new directory (as they are NOT moved by tmpl_process.pl install) If something changes in english version, go back to pt1 & repeat. WEAKNESSES ======= I've found some weaknesses (some solvable probably, but maybe some unsolvable) - HTML::Templates pb : if there is only a tag between 2 strings, text-extract sometimes merges both strings, and so can't replace them in the translated template. I've solved all those cases with a
or another HTML statement. - SHORT STATEMENTS short statements (like "in") can be replaced stupidly (like in cgi-bin => gives cgi-bdans in french). the workaround has been to replace only complete words ( line 185 of tmpl_process : $line =~ s/(\W)$text(\W)/$1$subst$2/g; ) Don't seem to have any side effect. - WORD exist in FILENAME words that are in the templates and in a perl script name are replaced ! For example : Search is replace by Recherche in french, thus,giving , which is wrong... The only way I've found to solve this is to ignore any translation whose translation string is IGNORE (search is the only cas i've found in french opac) - MISSING STRINGS Maybe some strings that should be translated are missing. You can add whatever you want in text-extract.pl. For instance, it extracts : - standard text - text in alt="SOMETEXT" - meta html encoding (8859-1) to enable non european translations. COPYRIGHT ====== @ paul poulain (paul.poulain _@_ free.fr) & Jerome Vizcaino vizcainj _@_ esiee.fr -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org) --===============4449777484463155848==-- From paul.poulain@free.fr Fri Dec 5 08:56:55 2003 From: paul POULAIN To: koha-translate@lists.koha-community.org Subject: Re: [Koha-translate] [important]NEW TRANSLATION TOOL Date: Fri, 05 Dec 2003 18:00:25 +0100 Message-ID: <3FD0B9A9.3020403@free.fr> In-Reply-To: <3FD0B8F1.9020205@free.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9008857554973845996==" --===============9008857554973845996== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit paul POULAIN a écrit : > I've just commited a new translation tool. > Feel free to test it AND IMPROVE IT. Just forgotten to say : it's in CVS, misc/translator directory. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org) --===============9008857554973845996==-- From mjr@dsl.pipex.com Mon Dec 22 14:42:06 2003 From: MJ Ray To: koha-translate@lists.koha-community.org Subject: [Koha-translate] Re: [Koha-devel] [important]NEW TRANSLATION TOOL Date: Mon, 22 Dec 2003 22:43:36 +0000 Message-ID: In-Reply-To: <3FD0B8F1.9020205@free.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3595930036817401867==" --===============3595930036817401867== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 2003-12-05 16:57:21 +0000 paul POULAIN wrote: > I've just commited a new translation tool. > Feel free to test it AND IMPROVE IT. I am sorry to be a little rude, but wouldn't it be better to work on splitting templates and texts, rather than building tools to combine them? > - meta html encoding (8859-1) to enable non european translations. I think we have already argued over this. We probably should move koha to utf-8, away from the 8859 codings. -- MJR/slef My Opinion Only and possibly not of any group I know. Please http://remember.to/edit_messages on lists to be sure I read http://mjr.towers.org.uk/ gopher://g.towers.org.uk/ slef@jabber.at Creative copyleft computing services via http://www.ttllp.co.uk/ --===============3595930036817401867==-- From paul.poulain@free.fr Mon Jan 5 05:23:47 2004 From: paul POULAIN To: koha-translate@lists.koha-community.org Subject: [Koha-translate] Re: [Koha-devel] [important]NEW TRANSLATION TOOL Date: Mon, 05 Jan 2004 14:28:29 +0100 Message-ID: <3FF9667D.9010603@free.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4255410072631563743==" --===============4255410072631563743== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit MJ Ray a écrit : > On 2003-12-05 16:57:21 +0000 paul POULAIN wrote: > >> I've just commited a new translation tool. >> Feel free to test it AND IMPROVE IT. > > I am sorry to be a little rude, but wouldn't it be better to work on > splitting templates and texts, rather than building tools to combine > them? I don't think so, for at least 2 reasons : * the Koha project already has existing and working tools / versions. It's sometimes/usually easier to improve something that exists than rewrite it from scratch. this translation tool works quite good imho, and needed only a few hours to be done. * this translation tools is something like a gettext, but on developper time, not on execution time. Pro : it's no cpu consumming, & so better for low-end hardware. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org) --===============4255410072631563743==--