[Zope-dev] Have any ideas for aliasing meta type, role name, etc?

LEE, Kwan Soo kslee@plaza1.snu.ac.kr
Mon, 08 Mar 1999 12:43:50 +0900


Hi, Zopistas,

I've been translating Zope frame work into Korean, as I told before and
almost nobody showed interest.
Now what I call KZope seems working, though many dtml files are to be
translated still.

Currently, KZope shows part Korean, part English screens. I guess the
relative easy of translating Zope into another human language comes from
that many key words of Zope frame work are stored as a value of
dictionary(right?).

BUT, there IS a Problem. What if one export/import Zope objects between
EZope & KZope? It shows wired things. And I guess this comes from that
object from EZope or KZope has different meta infos.

One possible solution is much further dissociation of "Presentation"
from "Logic". See the example below from OFS/Folder.py(don't worry of
strange characters or boxes in <from KZope> column. That is (or was)
Korean chars)

<from EZope>                                <from KZope>

class Folder(....):                              class Folder( ... ):
    """ ... ...
    """
    meta_type='Folder'          <-a->         meta_type='Æú´õ'
    id       ='folder'               <-b->         id       ='folder'
    title    ='Folder object'      <-c->         title    ='Æú´õ °´Ã¼'
    icon     ='p_/folder'          <-d->        icon     ='p_/folder'

meta_type and title strings appear on the screen. So I translate them.
id will be a part of url, so I'd better not translate them. icon string
is Zope frame work default. So I do not.

I SEE a some lack of consistency here. Why should part of internal
python code(meta_type) will appear on the user screen? Don't you think
DTML part of Zope frame work should control what appears on the user
screen?

What, I guess, to be a solution is making meta_type, role, etc into a
tuple which inclues a dictionay. i.e.
        meta_type=('Folder', {'default':'Folder', 'Korean':'Æú´õ',
'German':'XXX', 'Czech':'YYY'})
        __ac_roles__=(
           ('Manager', {'default':'Manager', 'Korean':'°ü¸®ÀÚ',
'German':'xxx', 'Czech':'yyy'}),
           ('Anonymous', {...}      )
            )

Oh, yes, this is a HUGE & comples task and DC will not benefit from this
in a near future. And I do not ask DC to do so.

What I want is the suggestions from the more knowledgables. Could be
there much more simple and elegant way? tuplizing meta infomation will
punish the performance too much? Will the Zope frame work structure be
altered to make this kinds approach impossible?

Just think Globally. Dream of the soon-to-be-huge China market.
Possible BENEFITS of 'tuplizing' meta infos will include safer route to
upgrading individual Zope Products.

LEE Kwan Soo.

ps. If my English expressions are offensive, that's not my intention but
the showcase of how hard to use English.