[spambayes-dev] RE: Translate configuration Page in spambay?

Tony Meyer tameyer at ihug.co.nz
Tue Mar 9 17:51:48 EST 2004

> If you work from source, you can do basic translation by 
> modifying ui.html.  Just install resourcepackage so that 
> ui_html.py will get rebuilt from any changes.

Modifying ui.html will certainly change the vast majority of the web
interface, but almost none of the configuration page.  Almost everything on
that page is dynamically generated from the stuff in Options.py, and you'd
have to do a lot of talking to convince me that it's worthwhile taking it
out of there.  OTOH, if you translate Options.py *and* ui.html, that's
almost everything.

> Unfortunately there are still quite a few literal strings 
> scattered throughout the .py files.  The option descriptions 
> in Options.py are a prime example, as well as the statistics 
> and status messages.  We just need someone with enough time 
> on their hands to move all those literals either into ui.html 
> or out to a message file using gettext or something similar.

I'm +1 on moving literals outside Options.py and ui.html, where possible.
Two things that spring to mind:

  1.  UserInterface.py changes True and False to "Yes" and "No"; the idea is
that these are more understandable to the average user.  These could
certainly be consolidated into two variables that are referenced throughout
the file.  Either Options[Class].py or ui.html could then have the actual
strings, and the variables loaded from there.

  2. UserInterface.py currently has all the help pages.  As the comments in
the file say, this isn't the right place for them, it was simply convenient
at the time.  I'd be very happy for these to be moved out into some other
place, which would also make translation easier.  The pre-formatted bug
reporting text should stay in English unless it's changed to send to
somewhere other than spambayes at python.org.

I'm happy to help with this, if necessary, so feel free to ask (but
preferably on the list, rather than in private email, which languishes when
I'm busy).

=Tony Meyer

More information about the spambayes-dev mailing list