Thank you Mark and Gustavo for your kind answer.

> Bonjour, Philippe.
>
> Why not give us another chance? I'm sure that in spite of this bad "first 
> impression", you'll end up in love with TG2. ;-)
>   
No I 'm not going to give up   at this point, but I'd like to tell you it's not 
my first try.
I've worked with TG1, and yes I already like it (that's why I'm here  :-) ).... 
when it works. but I had to stop 
mainly because of the lack of documentation.


> We try our best to make it the best framework around, but keep in mind that 
> you may find some issues here and there because it's the last beta.
> I agree that in this field we must improve our documentation. I managed to 
> get 
> a localized TG2 application working thanks to the Pylons' documentation -- 
> with no problems.
>
> I'll try to improve those docs when I have some spare time, but in the mean 
> time you can help us improve TG and help yourself get the application working 
> by letting us know about the problems you find. Do we deserve another chance? 
> :)
>
>   - Gustavo.
>
> PS: Just in case, a common mistake is to mix ASCII strings with Unicode ones. 
> If you're going to use Unicode, use it *everywhere*. Even on the English 
> messages to be translated:
>     msg = _(u"I'm an English message encoded with Unicode!")
>
>   

Ok for the problem I have I don't understand what you're telling me 
Gustavo. I have used poedit like it is  recommended in the doc
I 've extracted the messages for TG site and I ' ve translated some  of 
them in french with Poedit . Never I wrote something  like
msg = _(u"....")
or
msg = _("...").  According to the doc, I don't have to. 

Ok then

If  I  write  with no accents (ASCII 'compatible' I mean) in the 
translation, there is no errors
If I write with accents , for example 'Only for the editor' --> 'Réservé 
aux éditeurs' this traceback is throwed:


URL: http://localhost:8080/editor_user_only
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/WebError-0.10.1-py2.5.egg/weberror/evalexception.py',
 
line 431 in respond
  app_iter = self.application(environ, detect_start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/TurboGears2-2.0b6-py2.5.egg/tg/configuration.py',
 
line 631 in wrapper
  return app(environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/TurboGears2-2.0b6-py2.5.egg/tg/configuration.py',
 
line 534 in remover
  return app(environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/repoze.tm2-1.0a3-py2.5.egg/repoze/tm/__init__.py',
 
line 19 in __call__
  result = self.application(environ, save_status_and_headers)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/repoze.who-1.0.10-py2.5.egg/repoze/who/middleware.py',
 
line 107 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.5.egg/tw/core/middleware.py',
 
line 36 in __call__
  return self.wsgi_app(environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.5.egg/tw/core/middleware.py',
 
line 59 in wsgi_app
  resp = req.get_response(self.application)
File 'build/bdist.linux-x86_64/egg/webob/__init__.py', line 1325 in 
get_response
File 'build/bdist.linux-x86_64/egg/webob/__init__.py', line 1293 in 
call_application
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.5.egg/tw/core/resource_injector.py',
 
line 67 in _injector
  resp = req.get_response(app)
File 'build/bdist.linux-x86_64/egg/webob/__init__.py', line 1325 in 
get_response
File 'build/bdist.linux-x86_64/egg/webob/__init__.py', line 1293 in 
call_application
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Beaker-1.2.2-py2.5.egg/beaker/middleware.py',
 
line 81 in __call__
  return self.app(environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Beaker-1.2.2-py2.5.egg/beaker/middleware.py',
 
line 160 in __call__
  return self.wrap_app(environ, session_start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/middleware.py',
 
line 130 in __call__
  response = self.app(environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/wsgiapp.py',
 
line 125 in __call__
  response = self.dispatch(controller, environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/wsgiapp.py',
 
line 324 in dispatch
  return controller(environ, start_response)
File '/home/phil/comp/tg2env/i18ntest/i18ntest/lib/base.py', line 36 in 
__call__
  return TGController.__call__(self, environ, start_response)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/controllers/core.py',
 
line 221 in __call__
  response = self._dispatch_call()
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/controllers/core.py',
 
line 172 in _dispatch_call
  response = self._inspect_call(func)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/controllers/core.py',
 
line 107 in _inspect_call
  result = self._perform_call(func, args)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/TurboGears2-2.0b6-py2.5.egg/tg/controllers.py',
 
line 745 in _perform_call
  self, controller, params, remainder=remainder)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/TurboGears2-2.0b6-py2.5.egg/tg/controllers.py',
 
line 137 in _perform_call
  output = controller(*remainder, **dict(params))
File '<string>', line 2 in editor_user_only
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/repoze.what_pylons-1.0rc2-py2.5.egg/repoze/what/plugins/pylonshq/protectors.py',
 
line 103 in wrap_action
  self.predicate.check_authorization(request.environ)
File 
'/home/phil/comp/tg2env/lib/python2.5/site-packages/repoze.what-1.0.4-py2.5.egg/repoze/what/predicates.py',
 
line 244 in check_authorization
  logger and logger.info(u'Authorization denied: %s' % error)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in 
position 1: ordinal not in range(128)

Maybe I 've made a newbie mistake, I don't know how Poedit and 
translation really work , 
but my point is that I followed the TG2 doc.

Thanx in advance


Cheers

Philippe
 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to