[Zope3-dev] would like a "package" for registerTranslations
directive
Stephan Richter
stephan.richter at tufts.edu
Thu Jun 24 20:39:10 EDT 2004
On Thursday 24 June 2004 07:25, Steve Alexander wrote:
> I looked at adding a 'package' attribute to the registerTranslations
> directive, but it isn't straightforward. Specifying a package is easy:
> I can just add a GlobalObject field to the metadirective schema.
> However, I don't know a good way of getting this package taken into
> account when the 'directory' attribute's Path field gets processed.
>
> How would I best go about writing a metadirective that has a 'directory'
> attribute and an optional 'package' attribute, where if a relative path
> is given for the 'directory', it would be considered relative to the
> package?
You want to look at the "include" directive. It is in
zope.configuration.xmlconfig starting on line 290. There the file is simply
treated as a bytesline instead a path, which I think is the way to go. It
also shows you how to merge the package info and the path part.
BTW, I am all for doing this enhancement.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list