On Thu, 2006-01-19 at 13:22 +0100, Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
> 
> [...]
> 
> > phew. this is scary. i thought i'd put together a trivial patch for a
> > trivial problem, but how very wrong.
> > 
> > [EMAIL PROTECTED]:/local/lenya-build/lenya_1_4_X-vanilla/build/lenya>
> > grep -r "Parent ID" *
> > webapp/lenya/pubs/default/lenya/usecases/site/create.jx:
> >   <i18n:text>Parent ID</i18n:text>:</td>
> > webapp/lenya/resources/i18n/cmsui_de.xml:  <message key="Parent
> > ID">Übergerodnete ID</message>
> > webapp/lenya/resources/i18n/cmsui_ru.xml:<message key="Parent
> > ID">Родительский идентификатор</message>
> > 
> > what a mess. the usecase is a part of the default publication, and the
> > i18n data is a site-wide thing.
> > is this due to some ongoing refactoring work (i hear java people do that
> > all the time ;) or just a historic screw-up that nobody has gotten
> > around to fixing yet?
> 
> The usecase used to be globally defined. That's why the i18n terms
> are defined in the core. I don't mind if the i18n terms are moved
> to the default publication.
> 
> What do the others think?
> 
> 
> > why does the default publication define such standard usecases anyway?
> 
> Because they are no standard usecases. They could be moved to the
> sitetree module, since they are tree-specific.
> 
> 
> > isn't this a good candidate for site-wide code under webapp/lenya?
> 
> IMO not (see above).
> 
> 
> > i've submitted minor patches to a number of open-source projects, but
> > lenya is by orders of magnitude the hardest to dig into. i'm really
> > willing to submit a patch, but hey, do i really have to shuffle some 10
> > files around just to change a string in the GUI?
> 
> Yes, that's the way i18n works in Cocoon.

The confusion with i18n in Lenya is that often real words are used as
message keys (like "Parent ID"), and there is no default translation for
these keys.

Now if someone wants to change "Parent ID" to "Current ID", he either
has to change "Parent ID" to "Current ID" in all translations files
(where it serves as a key), or add a new default translation
<message key="Parent ID">Current ID</message>

IMHO a better solution would be to use only "real" keys like e.g.
"usecase.site.create.parentid" as i18n keys, and provide a default
translation.

Josias


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


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

Reply via email to