[Etoys] exporting a .pot file for a class category

korakurider korakurider at yahoo.co.jp
Tue Nov 13 04:13:34 EST 2007


Hi, Hilaire.
Thanks a lot for such a great application!
Actually I have been using your DrGeoII for exploring use
case and refining design of exporter/translator stuff. 

--- Hilaire Fernandes <hilaire at ofset.org> wrote:
> Hello,
> 
> I would like to export a DrGeoII.pot file to update
> the translation catalog.
> 
> I try GetTextExporter2 new exportTranslator: nil but
> I only get a Etoys.pot
> 
> I also try to add DrGeoII  category in a drgeo
> domain, but it does not help.

Note that stabilization of the facility is still going on,
so you need to expect some API change in near future. 
Anyway here is explanation for current version.

To split POs/POTs by domains, you need to register class
category to domain mapping before execute export.  If some
category isn't covered by the mapping registration,
literals in that category will be exported as default
domain (that is 'etoys').

You can export the correct POT for the DrGeoII by:
step1. load DrGeoII.mcz

step2. evalute:

   TextDomainManager
            registerCategoryPrefix: 'DrGeoII' 
            domain: 'drgeo'.

step3. evalute:

   GetTextExporter2 exportTemplate.



To make #translate work in DrGeoII code properly, the same
step2 above is needed.
(#translate decides target domain by class category of
sender of #translate, and registration of category to
domain mapping)


> 
> Btw, are there any place with documentation about
> the gettext exporter
> for developer?
Sorry, there isn't at this time, though I would like to
write tutorial after APIs become stable...

hope this helps,
/Korakurider



--------------------------------------
New Design Yahoo! JAPAN  2008/01/01
http://pr.mail.yahoo.co.jp/newdesign/


More information about the Etoys mailing list