--- Rob Shortt <[EMAIL PROTECTED]> escreveu: 
> 
> Gustavo, can you please check to see if this change is ok for you?
> 
> -Rob
> 

Almost. I fixed the problems and other unchecked place and commited,
please check.

I have a comment on your code:

> > +                 fv.res += '<h4>ERROR: no program found on % at
> %</h4>' % (chan, start)

Please, take care when doing stuff like that.
1) fv.res is unicode, since i18n messages are unicode and str + unicode
-> unicode
2) chan can be a string with non-ascii chars, since it came from
POST/GET, when python tries to merge it with fv.res and so make it
unicode, it will break! If you came to this problem, please transform
chan to unicode. Seems to be that browsers exchange data in latin-1, so
i'm using this code:

   chan = Unicode(fv.formValue(form, 'chan'))
   if isinstance( chan, str ):
      chan = Unicode( chan, 'latin-1' )

This way we try to convert to unicode using the default encoding, if it
fails, fall back to latin-1.

3) Please, collaborate with i18n efforts! :)

Don't use this:
'<h4>ERROR: no program found on %s at %s</h4>' % (chan, start)

Use this instead:
'<h4>'+_('ERROR')+': '+(_('no program found on %s at %s') %
(chan,start))+'</h4>'

Also, try to not use formating or 'accessories' chars in i18n strings,
that helps us a lot! Don't use _('ERROR:'), use _('ERROR') + ':', since
probably should be ERROR used somewhere. This is also valid in other
places, like 'Today' and 'Today:' and sometimes 'Today: %s' and
'Today:%s' ...

Gustavo

______________________________________________________________________

Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
http://br.yahoo.com/info/mail.html


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to