[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] improve i18n of webwml



On Fri, Jun 28, 2002 at 03:29:43PM +0100, Peter Karlsson wrote:
> Denis Barbier:
> 
> > here is a proposal to help translators's job:
> >    handle translated tags via PO files (i.e. gettext) instead of slices
> 
> I think this is a great idea, provided that
> 
>  * strings that have the same English text but appear in different
>    contexts can be translated separately (this is *the* major
>    disadvantage of using gettext in any application),

There are 2 ways:
  * use gettext domains (as described in textdomain(3))
  * add extra code to prevent dulicates
Under webwml/po/templates/debian/ all files belong to the "templates"
domain.  When other items do use this scheme (e.g. menus about ports)
they could define their own gettext domain and define:
   <define-tag foo>
     <gettext domain="ports">blah blah</gettext>
   </define-tag>
provided that this domain has been bound with <bindtextdomain> to a
different file (see webwml/po/template/debian/common_translation.wml).

If we want to prevent duplicates in a single domain (and I believe this
is the right thing to do), we might add an extra void tag, e.g.
   <define-tag uniqid></define-tag>
   <define-tag foo1>
     <gettext><uniqid name="foo1" />blah</gettext>
   </define-tag>
   <define-tag foo2>
     <gettext><uniqid name="foo2" />blah</gettext>
   </define-tag>

Thus msgids are different.
A Makefile rule could check for those duplicates.

>  * we can take advantage of the fuzzy handling,

Sure, translators do manage real PO files.

>  * updating the PO files can be done simply from the translator's side,
>    not having to wait for someone on the "admin" side updating the
>    source files, etc.

It does work so.
PO files are stored under CVS, and when a translator wants to update some
strings, he runs "make pot; make update-po".  This generates an .upo file.
Translator do work on it, and when it's over rename into .po and commits
this file.
You may try these commands under webwml/po/ (files are generated under the
webwml/po/po-files/ subdirectory).  There is no need to retrieve the
experimental mp4h package, unless you want to generate HTML files.
Please note that this is a temporary location to perform tests in a single
directory, of course PO files should live under webwml/<lang>/po/.

Denis


-- 
To UNSUBSCRIBE, email to debian-www-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: