On Friday 02 June 2006 03:52, Chris Withers wrote: > Stephan Richter wrote: > > On Wednesday 31 May 2006 04:29, Chris Withers wrote: > >> - Can my existing .pot and .po files be used? > > > > Yes, the PO file format is totally independent of Zope and Python. > > But with PTS, I don't need to build .mo's myself, right? ;-)
I know absolutely nothing about PTS, this is a Zope 3 list. > >> - How would I mark up constant and computers strings in zodb-based > >> Python Scripts? > > > > That issue has not been addressed at all, since we are not supporting TTW > > development. > > That doesn't answer my question ;-) Yes it does. It says there is currently no solution for Python scripts. And we do not work on a solution yet, because in Zope 3 we do not do TTW development. > >> - How do I ask the translation service what the currently negotiated > >> language is? > > > > There are other > > interfaces for this; I believe ILanguageNegotiator. > > Will that let me find out what the currently negotiated language is? Yes, that's the point of this API. > >> - How do I ask the translation service what all the available languages > >> are for a particular domain? > > > > I do not think there is an API for that, but you could certainly develop > > one. > > Where and how would I do this? I'd suggest this is an oversight in the > existing API's and it'd be better to add to an existing API rather than > come up with a new one... You can always write a proposal. But I would check the existing API first. > >> - How do a write/register a negotiator that choose a language based on > >> an attribute of the user object and then falls back to normal browser > >> negotiation if that attribute isn't present? > > > > Just implement the right interface and register it. This is not too hard > > and I think there are code examples out there. > > Can you point me at some? I reckon I'll be okay writing the actual > python, it's just going through the torture of zcml to find the right > goat to sacrifice that I'm worried about, particularly as this is Five, > not "just Zope 3"... Someone mentioned that Phillip's book has an example. I know nothing about Five, so I cannot comment on the rest. > >> - How do I generate .pot files from ZPTs, Python Scipts and External > >> Methods? I used to use PTS' .missing functionality and just spider the > >> whole app. Is something similar available in Zope 2.9/3 land? > > > > In Zope 3 you can simply call utilities/i18nextract.py; it will extract > > all message strings from Python, ZPT and ZCML files. > > Yeah, but not ones in the ZODB, right? As I said, Zope 3 does not support TTW development, so there are no tools built for such a task yet, though it would not be horribly tricky. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users