[Zope3-dev] Job Board Example

Guido van Rossum guido@python.org
Mon, 17 Jun 2002 21:40:26 -0400


Cool!!!

> Done.  If you check out JobBoardI18n in your lib/python/ZopeProducts
> directory, then change your products.zcml file to point to
> 
>     <include package='ZopeProducts.JobBoardI18n' file='configure.zcml' />

You don't need the file='configure.zcml' part since that's the default
value. :-)

It seems that JobBoardEx and JobBoardI18n define some conflicting
resources that make it impossible to have both configured.  I would
like to see that fixed.  I currently get this error when I enable both
in products.zcml:

Zope.Configuration.xmlconfig.ZopeConfigurationConflictError: Conflicting configuration actions
for: ('AddableFactory', u'.JobList.')
  at line 11 column 18 of /home/guido/projects/zzz/lib/python/ZopeProducts/JobBoardEx/configure.zcml
  at line 12 column 18 of /home/guido/projects/zzz/lib/python/ZopeProducts/JobBoardI18n/configure.zcml

This seems strange since the full package names are different.  Could
this be a Zope3 bug?  The only conflict seems to be the zmi:factory
directive; once I have created an i18n job board, I can have both
existing in parallel.

> instead, you'll get the i18n'd job board.  There's an English
> translation and a Bablefish-assisted Italian translation.  I leave it
> to you to decide which translation is better. ;)

Oh, but the Italian sounds sooooo much gentler!

> Note to any native Italian speakers out there: feel free to improve
> the Italian translations in JobBoardI18n/locale/it/LC_MESSAGES/jobboard.po!
> 
> Guido and Stephan, feel free to add Dutch and German translations.
> 
> I'll start working on the Tutorial.html later.
> 
> Let me know if you have any trouble.  I had to blow away my Data.fs
> file, which had the old JobBoardEx example, before I could create a
> new JobBoardI18n example.

(1) I'd like to have an explicit control over the language (in
    addition to the browser preference).  I'd think this would be
    handy for demos.

(2) How do I start a new translation?  Do I just clone the locale/en
    directory and start hacking on the files, or is there more to it?

(3) I think I've hit a bug in the i18n code.  In the i18n version, try
    to submit a job.  When I click on the preview button, I get a
    traceback saying "TypeError: coercing to Unicode: need string or
    buffer, NoneType found", at line 104 in SimpleTranslationService
    (in interpolate).

--Guido van Rossum (home page: http://www.python.org/~guido/)