You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Joern Nettingsmeier <po...@uni-duisburg.de> on 2006/01/19 10:45:32 UTC

what does "parent ID" mean when i create a new document?

hi!


when i create a new document in lenya 1.4 (menu tab "site"), i get a
"parent ID" which is the currently highlighted document. then i can
choose "sibling after" or "child".

imho the concept of parent ID is a little weird here. when i create a
new document as "sibling after" at the top level, shouldn't the parent
ID become "/" or something like that?


jörn



-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Felix Röthenbacher <fe...@wyona.com>.

Joern Nettingsmeier wrote:
> Andreas Hartmann wrote:
> 
>>Joern Nettingsmeier wrote:
>>
>>>hi!
>>>
>>>
>>>when i create a new document in lenya 1.4 (menu tab "site"), i get a
>>>"parent ID" which is the currently highlighted document. then i can
>>>choose "sibling after" or "child".
>>>
>>>imho the concept of parent ID is a little weird here. when i create a
>>>new document as "sibling after" at the top level, shouldn't the parent
>>>ID become "/" or something like that?
>>
>>That's just legacy behaviour. I'd suggest to replace the term
>>"parent ID" by something else, e.g. "current document" (I hope you
>>find a more appropriate label :) ).
> 
> 
> ok, so there is no subtle semantic difference between a page "bar"
> created with parent id "/foo" as *child* and a page "bar" created with
> parent id "/foo/baz" and *sibling after* ?

Documents with sibling-after activated will be inserted after its
sibling :-) whereas childs will always be inserted at the end/tail.
You see, that's the subtle difference :-)

hth, Felix

> 
> if not, then i'll file a bug to rename this.
> 
> 
> 
> 

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Felix Röthenbacher <fe...@wyona.com>.

Josias Thoeny wrote:
[[...]]
> 
> 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.

+1

Do you have a clue how much effort that would be? What would be the
nomenclature for the keys?

Best, Felix

> 
> Josias
> 
> 

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Josias Thoeny <jo...@wyona.com>.
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.
> > 
> > nettings@pol-admin:/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: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier wrote:

[...]

> phew. this is scary. i thought i'd put together a trivial patch for a
> trivial problem, but how very wrong.
> 
> nettings@pol-admin:/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.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
Joern Nettingsmeier wrote:
> Andreas Hartmann wrote:
>> Joern Nettingsmeier wrote:
>>> hi!
>>>
>>>
>>> when i create a new document in lenya 1.4 (menu tab "site"), i get a
>>> "parent ID" which is the currently highlighted document. then i can
>>> choose "sibling after" or "child".
>>>
>>> imho the concept of parent ID is a little weird here. when i create a
>>> new document as "sibling after" at the top level, shouldn't the parent
>>> ID become "/" or something like that?
>> That's just legacy behaviour. I'd suggest to replace the term
>> "parent ID" by something else, e.g. "current document" (I hope you
>> find a more appropriate label :) ).
> 
> ok, so there is no subtle semantic difference between a page "bar"
> created with parent id "/foo" as *child* and a page "bar" created with
> parent id "/foo/baz" and *sibling after* ?
> 
> if not, then i'll file a bug to rename this.

phew. this is scary. i thought i'd put together a trivial patch for a
trivial problem, but how very wrong.

nettings@pol-admin:/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?

why does the default publication define such standard usecases anyway?
isn't this a good candidate for site-wide code under webapp/lenya?

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?

i'd welcome directions.


-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
>> hi!
>>
>>
>> when i create a new document in lenya 1.4 (menu tab "site"), i get a
>> "parent ID" which is the currently highlighted document. then i can
>> choose "sibling after" or "child".
>>
>> imho the concept of parent ID is a little weird here. when i create a
>> new document as "sibling after" at the top level, shouldn't the parent
>> ID become "/" or something like that?
> 
> That's just legacy behaviour. I'd suggest to replace the term
> "parent ID" by something else, e.g. "current document" (I hope you
> find a more appropriate label :) ).

ok, so there is no subtle semantic difference between a page "bar"
created with parent id "/foo" as *child* and a page "bar" created with
parent id "/foo/baz" and *sibling after* ?

if not, then i'll file a bug to rename this.




-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: what does "parent ID" mean when i create a new document?

Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier wrote:
> hi!
> 
> 
> when i create a new document in lenya 1.4 (menu tab "site"), i get a
> "parent ID" which is the currently highlighted document. then i can
> choose "sibling after" or "child".
> 
> imho the concept of parent ID is a little weird here. when i create a
> new document as "sibling after" at the top level, shouldn't the parent
> ID become "/" or something like that?

That's just legacy behaviour. I'd suggest to replace the term
"parent ID" by something else, e.g. "current document" (I hope you
find a more appropriate label :) ).

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org