[Zope3-Users] Kupu and Zope3

2007-08-20 Thread Jeremy Cook
Is anyone using Kupu (or any other visual editor) with zope3? I saw
hints that it might be ported to zope3 or conversely that kupu must
die. When I tried installing it under zope3 I didn't get awfully far.

Any ideas how to proceed?

Jeremy

-- 
[EMAIL PROTECTED]tlf: +47 55 58 40 65
Parallab  Bergen Centre for Computational Science
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Kupu and Zope3

2007-08-20 Thread Jeremy Cook
Hi Darryl,

before I left work I did get tinymce installed :) without errors. Now
I was just wondering what:

 from training.forms import interfaces, mycontent

refers to in the example given? Is this something from 'formlib',  can
I find them somewhere else, or do I have to implement these myself,?
If the latter then a more complete example would help me!

Thanks,  Jeremy

On 20/08/07, Darryl Cousins [EMAIL PROTECTED] wrote:
 Hey Jeremy,

 On Mon, 2007-08-20 at 11:45 +0200, Jeremy Cook wrote:
  Is anyone using Kupu (or any other visual editor) with zope3? I saw
  hints that it might be ported to zope3 or conversely that kupu must
  die. When I tried installing it under zope3 I didn't get awfully far.

 tinymce implementation is straightforward, I began with a post from
 lovely:
 http://www.lovelysystems.com/reutz/2007/02/19/howto-use-tiny-mce-in-zope3/
 and with z3c.widget (svn.zope.org/z3c.widget)

 http://demo.tfws.org.nz/

 Hope that helps.
 Darryl

 
  Any ideas how to proceed?
 
  Jeremy
 




-- 
[EMAIL PROTECTED]tlf: +47 55 58 40 65
Parallab  Bergen Centre for Computational Science
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with internationalization

2007-07-19 Thread Jeremy Cook

Thanks Dmitry,

I can see how it should work. However I am still having trouble. My
application is initially based on the wcsite example and is intended
to be really not any more complex than that so I wanted to keep it
that way. However I have probably inherited something from wcsite that
I don't fully understand. I made a small amount of progress but I
still get the following error with ++lang++test:

2007-07-19T13:18:26 ERROR SiteError http://neshamn.no/++lang++test
Traceback (most recent call last):
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/publisher/publish.py,
line 130, in publish
   obj = request.traverse(obj)
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/publisher/browser.py,
line 506, in traverse
   ob = super(BrowserRequest, self).traverse(obj)
 File /home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/publisher/http.py,
line 461, in traverse
   ob = super(HTTPRequest, self).traverse(obj)
 File /home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/publisher/base.py,
line 292, in traverse
   obj = publication.traverseName(self, obj, entry_name)
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/app/publication/publicationtraverse.py,
line 45, in traverseName
   ob2 = namespaceLookup(ns, nm, ob, request)
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/traversing/namespace.py,
line 109, in namespaceLookup
   return traverser.traverse(name, ())
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/traversing/namespace.py,
line 358, in traverse
   languages.setPreferredLanguages([name])
 File 
/home/zope3/Zope-3.3.1/build/lib.linux-i686-2.4/zope/app/publisher/browser/__init__.py,
line 117, in setPreferredLanguages
   raise NotCompatibleAdapterError(Adapter not compatible with 
NotCompatibleAdapterError: Adapter not compatible with
zope.i18n.interfaces.IModifiableBrowserLanguages has been used.
129.177.20.93 - - [19/Jul/2007:13:18:26 +0200] GET /++lang++test
HTTP/1.1 500 84 - Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5


I am not sure which adapter it is referring to and I am not sure how
to find out either. Since my site will only be in Norwegian, I have a
workaround which is to hard code the locale to 'no' so that dates and
such are formatted correctly, but I would still like to understand
what is wrong here.

Any ideas?

Jeremy

On 04/07/07, Dmitry Vasiliev [EMAIL PROTECTED] wrote:

Jeremy Cook wrote:
 Is there an example site where ++lang++whatever works? I have tried
 always with this at the beginning of the path to no avail. It would be
 nice to see it working as a confidence builder.

You can look at my site. :-) It only in Russian for now (since I've
rebuilt it from scratch about a month ago) but a few fields already
translated to English so the following URLs work as expected:

http://hlabs.spb.ru/++lang++ru
http://hlabs.spb.ru/++lang++en

--
Dmitry Vasiliev dima at hlabs.spb.ru
http://hlabs.spb.ru




--
[EMAIL PROTECTED]tlf: +47 55 58 40 65
Parallab  Bergen Centre for Computational Science
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with internationalization

2007-07-03 Thread Jeremy Cook

Is there an example site where ++lang++whatever works? I have tried always
with this at the beginning of the path to no avail. It would be nice to see
it working as a confidence builder.

Jeremy

On 03/07/07, Dmitry Vasiliev [EMAIL PROTECTED] wrote:


Jeremy Cook wrote:
 Using ++lang++test, ++lang++de, ++lang++no (or ++anything-else) always
 results in a system error occurred, with an error message Can only
 shift leading traversal names to application names. I do not understand
 this error message or what it is trying to tell me.

'++lang++' always should be at the beginning of the path.

 Also, trying to start to create the NO translation by running
 i18nextract also results in a serious error which seems non trivial to
 work around.

 There was an error processing C:\NLRK-Zope\lib\python\wcsite\rss.pt
 Traceback (most recent call last):
[skip]
 TALError: empty HTML tags cannot use tal:content: 'link', at line 12,
 column 3,
 in file C:\NLRK-Zope\lib\python\wcsite\rss.pt

If you use Zope 3.3 then there is the bug in zope.app.locales.extract -
all templates treated as HTML. The bug was fixed on the trunk and for
workaround you can just replace your extract.py with the extract.py from
the trunk.

And make sure the template begins with the following fragment:

?xml version=1.0?
rss version=2.0 xmlns:tal=http://xml.zope.org/namespaces/tal;
...

Note '?xml' always should be at the beginning of the XML file.

--
Dmitry Vasiliev dima at hlabs.spb.ru
http://hlabs.spb.ru





--
[EMAIL PROTECTED]tlf: +47 55 58 40 65
Parallab  Bergen Centre for Computational Science
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Problems with internationalization

2007-06-29 Thread Jeremy Cook

Hi,

I have been trying to internationalize my application and add a Norwegian
translation but am stuck. By default I am getting only English for things
like date in news items and so on.

Using chapter 9 of the Philipp von Weitershausen book, I have tried various
things.

Using ++lang++test, ++lang++de, ++lang++no (or ++anything-else) always
results in a system error occurred, with an error message Can only shift
leading traversal names to application names. I do not understand this
error message or what it is trying to tell me.

Also, trying to start to create the NO translation by running i18nextract
also results in a serious error which seems non trivial to work around.

Can anyone shed any light on either of these two problems? I seem to be
missing something fundamental here?

Jeremy

C:\NLRK-Zope.\bin\i18nextract -p lib\python\wcsite -d wcsite -o locale
base path: 'C:\\NLRK-Zope\\'
search path: C:\NLRK-Zope\lib\python\wcsite
exclude dirs: []
domain: 'wcsite'
output file: 'C:\\NLRK-Zope\\lib\\python\\wcsite\\locale\\wcsite.pot'
There was an error processing C:\NLRK-Zope\lib\python\wcsite\rss.pt
Traceback (most recent call last):
 File C:\Python24\Lib\site-packages\zope\app\locales\extract.py, line
399, in
tal_strings
   p.parseFile(filename)
 File C:\Python24\Lib\site-packages\zope\tal\htmltalparser.py, line 122,
in p
arseFile
   self.parseString(data)
 File C:\Python24\Lib\site-packages\zope\tal\htmltalparser.py, line 128,
in p
arseString
   self.feed(data)
 File C:\Python24\lib\HTMLParser.py, line 108, in feed
   self.goahead(0)
 File C:\Python24\lib\HTMLParser.py, line 148, in goahead
   k = self.parse_starttag(i)
 File C:\Python24\lib\HTMLParser.py, line 268, in parse_starttag
   self.handle_starttag(tag, attrs)
 File C:\Python24\Lib\site-packages\zope\tal\htmltalparser.py, line 150,
in h
andle_starttag
   self.getpos())
TALError: empty HTML tags cannot use tal:content: 'link', at line 12, column
3,
in file C:\NLRK-Zope\lib\python\wcsite\rss.pt



--
[EMAIL PROTECTED]tlf: +47 55 58 40 65
Parallab  Bergen Centre for Computational Science
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users