From nicolas.francois at centraliens.net Sun Aug 5 17:00:41 2007 Content-Type: multipart/mixed; boundary="===============3269313422527186879==" MIME-Version: 1.0 From: =?utf-8?q?Nicolas_Fran=C3=A7ois_=3Cnicolas=2Efrancois_at_centraliens=2Ene?= =?utf-8?q?t=3E?= To: devel at lists.po4a.org Subject: Re: [Po4a-devel] Translatable attributes in HTML Date: Sun, 05 Aug 2007 19:00:35 +0200 Message-ID: <20070805170035.GB12184@nekral.homelinux.net> In-Reply-To: 87ps22ev28.fsf@doganov.org --===============3269313422527186879== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hello, On Sun, Aug 05, 2007 at 02:31:11AM +0300, Kaloian Doganov wrote: > Recently I've started to play with po4a while trying to > internationalize a bunch of articles in HTML format. One of the major > obstacles for making the job done is this: po4a considers as > translatable (almost) only the text contained between the tags of an > element. This is OK, but sometimes is not enough, since in HTML some > attributes are intended to contain a human-readable text. For > example: > = > > = > > = > The value of the `title' attribute here should be translatable too. > = > In fact, HTML.pm already does this by treating the IMG's `alt' > attribute specially and thus making it's value translatable. Maybe > IMG's `alt' is the most common case for an attribute that needs > translation, but there are three other elements that also can contain > `alt': INPUT, AREA and APPLET. They deserve the same treatment as > IMG. > = > Also, it would be nice if `title' attribute is considered translatable > too (keeping in mind that any element can contain a `title' > attribute). > = > A patch that solves those two problems is attached. Thanks a lot for your patch. It is now applied in the po4a's repository. Note also that you may want to try the xhtml module. It may provide a better result (even if it's for regular HTML and not XHTML). Best Regards, -- = Nekral --===============3269313422527186879==--