[Zope-dev] i18n for 'structure' in TAL

2006-05-01 Thread Martijn Faassen

Hi there,

i18n doesn't actually work for things marked as 'structure' in a page 
template in both Zope 2 and Zope 3. Zope 2 does do this with 
PlacelessTranslationService (through some tortuous route I won't go 
into). I think in practice large systems such as Plone, Silva and CPS 
are all translating snippets with bits of HTML in there, so i18n for 
structure is important.


Zope 2 + Five i18n work however. Zope 3 presumably doesn't work either. 
I have a monkey patch lying around that fixes this in Zope 2.x and I 
could check the fix in directly (and fix it Zope 3.3 trunk too), if 
there are no objections.


I realize we're getting close to a release and we're in feature freeze 
now, so this may be considered to be too large a change for this round.


Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] i18n

2003-01-23 Thread Florent Guillaume
Magnus Heino  <[EMAIL PROTECTED]> wrote:
> Where is the ZPT i18n-support described?
> 
> I cant find anything thats up2date.

http://www.zope.org//Wikis/DevSite/Projects/ComponentArchitecture/ZPTInternationalizationSupport

It's in Zope3Proposals but has actually been backported to Zope 2.

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] i18n

2003-01-19 Thread Magnus Heino

Hi.

Where is the ZPT i18n-support described?

I cant find anything thats up2date.

-- 

  /Magnus

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Alt-TAL (Re: [Zope-dev] i18n for CMF And Plone, backporting i18n to Zope 2.x)

2002-07-01 Thread Lalo Martins

On Mon, Jul 01, 2002 at 03:49:07PM -0300, Sidnei da Silva wrote:
> On Seg 01 Jul 2002 15:26, Jim Fulton wrote:
> | I'll add that the current ZPT implementation is too slow
> | (thanks to recent DTML speedups ;).
> |
> | ZPT needs to be as fast as or faster than DTML.  It would be
> | great if it was cleaner and more pluggable.
> 
> I remember that i had the same concern when discussing this with lalo, and he 
> told me that this should be faster, as TAL-Current stores a binary 
> representation of the XML Parsed source, and his version is based on PAX, and 
> this would not need to be pre-compiled and stored. Unfortunately I cannot 
> give more information as this explanation seemed fine to me at that time.


Our original prototypes of ZPT stored a DOM tree in the ZODB, so they only
really parsed the source when it was updated.

When the stuff was rewritten for optimization, DOM was done away with in
favour of TAL "bytecode" which, for some reason, isn't stored persistently.
I asked once, and I seem to remember the answer was "it doesn't pickle well".


Well, Alt-TAL is an experiment to see how fast a pluggable and readable
version of TAL could be.

My first step was to construct a "bytecode" that is pickleable and is not
TAL-specific. This is PAX. I didn't yet announce PAX anywhere as it is
evolving fast to meet the needs of Alt-TAL, but I plan to make it a package
in its own right in the near future.

In Alt-TAL, rendering TAL is a "PAX Transform". This dawned on me as a
result of a comment by Leo Almeida that TAL could probably be implemented as
a XSLT sheet.

Alt-TAL currently only implements the tal: namespace, and tal:on-error is
missing because it implies an exception-handling infrastructure which I
didn't yet even design. So, the reason I didn't announce Alt-TAL was that it
was so incomplete.

But in my tests (and I run tests on a very old ppc machine, so that I may
get a visual feel for the speed differences), the few input templates that
already pass, pass faster than with the original TAL.

Of course this experience has a long way to go. I need tal:on-error, then
all metal: stuff, then make a version of PageTemplate that uses Alt-TAL
(originally I planned Alt-TAL to be a drop-in replacement, but that would
impact performance very badly so I gave up), then benchmark and optimize and
benchmark and rinse and repeat.

In a very extreme case, PAX (or perhaps PAX transform) can be optimized into
C or Pyrex. As it has a lot of "for" loops, I assume this would be a gain.

Of course, as my design skills are stronger than my coding skills, and as my
optimizing skills are very very weak [;-)], I invite anyone interested in
this experience to join in.


[]s,
   |alo
   +
--
  It doesn't bother me that people say things like
   "you'll never get anywhere with this attitude".
   In a few decades, it will make a good paragraph
  in my biography. You know, for a laugh.
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG) http://www.eujogorpg.com.br/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )