On 1/25/06, Joern Nettingsmeier <[EMAIL PROTECTED]> wrote:
> i have a template that uses i18n and has its own catalogue. it is
> correctly merged with the global one. now i derive another publication
> from this template. i would like to be able to override one particular
> message key, so i create a catalogue file for that publication.
>
> the problem is: this file completely replaces that of the template,
> which leaves me with most keys missing
>
> the reason i'm doing this is that the template has the generic <message
> key="dept">Department for Social Sciences</message> and the derived
> publications will be "Political Science" and "Sociology". yes, i know
> that's stretching the concept of i18n a little, but it does keep the
> template xsls nicely generic without having to pass a zillion parameters.
>
> i thought, hey, this can't be difficult, but wrong. here's yet another
> Totally New Concept I Have Never Seen Before Although I've Been Digging
> Around In Lenya For Weeks Now(TM):
> lenya/webapp/lenya/resources/i18n/catalogue.xsp.
>
> is there a reason why this is not done with a map:aggregator?
>
> now the question: do you think that i18n catalog merging should be aware
> of templating?
> if so, do you agree that unlike other inheritable resources, catalog
> files should be merged rather than overriden, with a "first match wins"
> policy? (as is already the case with pub vs. global catalog.)
>
> now for the big question: how do i get this done in an xsp? (and no, i
> don't have eclipse running and won't have the resources to learn it
> until this project is out the door...) or if you have no particular
> reason why it has to be an xsp, would you accept a patch that tries to
> accomplish the same with a standard cocoon pipeline?

As Andreas said, this needs to be in Bugzilla.  The i18n code should
receive a list of directories to look for the resources.  Loop through
the list adding all the catalogues" publication, then template, next
template ..., global.

(Assuming 1.4 did not change i18n functionality) As a hack, you can
edit the catalogue finder to add the templates.  See:
http://solprovider.com/lenya/i18npriority

Add a few of these:
<xi:include>
<xsp:attribute 
name="href">context:/lenya/pubs/TEMPLATE-NAME-HERE/lenya/resources/i18n/#xpointer(//message)</xsp:attribute>
</xi:include>

I may have some of the path wrong.  Are templates under "pubs" in 1.4?

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to