You are not logged in Log in Join
You are here: Home » Members » Lalo's page at Zope.org » Open Page Templates » New release of OpenPT and PlacelessTranslationService » View NewsItem

Log in
Name

Password

 

New release of OpenPT and PlacelessTranslationService

OpenPT (formerly known as AltPT), PlacelessTranslationService and their whole suite (OpenTAL, pax, OpenPTi18n) have a new release at Savannah - go check it. Hilights:

  • Transform operation was a bit optimized; not sure it will be fast enough yet (we will optimize more before 1.0), but should be faster
  • PlacelessTranslationService now really works with ZPT, thanks to Magnus Heino. It also has a per-request negotiator cache that should speed things up
  • TALES implementation is now in OpenTAL (used to be in AltPT); therefore it can be used in non-Zope-based Python software
  • OpenTAL can now read template configuration in the form <tal:config property="value" multiproperty="value1;value2" />. OpenPT uses this to possibly set properties (like encoding, handlers, preferred output encodings) via source; useful for webdav/ftp editing
  • Implemented an OpenPTFile class (similar to DTMLFile)
  • OpenPT can now negotiate output encoding based on an user-supplied list and additional application-specific constraints. PlacelessTranslationService uses this hook to constrain to the set of encodings declared as compatible in the potfile header (so no more UnicodeError when someone tries to see your site in CJK or Hebraic...)
  • The binding here is now named 'context'; here is still supported but deprecated, and will be removed in the future (this matches zope 2.7 behaviour)
  • Now when you instantiate a ZopePageTemplate, you can choose one from a set of built-in files with default text (to add more, just drop foo.pt files in the default_text dir), or upload yours


How OpenPT is different from ZPT

  • More extensible. You can implement your own namespace handlers (the i18n namespace is handled by a separate, optional product, and the Show product gives an example of how to extend it for application-specific purposes)
  • Better i18n and unicode support; templates can be in any encoding your Python supports, and output encoding is negotiated
  • OpenTAL can be used from Python (non-Zope) applications and includes a functional TALES context and interpreter
  • Active and open development; you are invited and encouraged to contribute
  • It is also somewhat slower. You can mitigate this by installing psyco (it will be detected automatically)