Certainly I've not check well the it.py language file. I've found now that inside: Welcome %(username)s! Click on the link %(link)s to verify your email not translated.
So I'm able to translate it. Thanks. Il giorno domenica 9 ottobre 2016 18:34:28 UTC+2, Anthony ha scritto: > > I'm not sure what's going on. Does it work if you explicitly set > auth.messages.verify_email to T('your message')? > > Anthony > > On Sunday, October 9, 2016 at 4:46:12 AM UTC-4, Gael Princivalle wrote: >> >> That's strange. >> >> So if the current uri_language is Italian, the user see all translated >> text in Italian in the user register form, it must receive >> the auth.messages.verify_email message in Italian. >> In my app he receive the message in English: >> Welcome u...@domain.com! Click on the link http://www.domain.com... to >> verify your email >> >> Do you know why? >> All other texts in the app are translated well. >> >> In the db I have: >> if request.uri_language: T.force(request.uri_language) >> >> In routes.py: >> routers = dict( >> BASE = dict( >> domains = { >> "www.mydomain.com" : "myapp", >> } >> ), >> myapp = dict(languages=['en', 'it'], default_language='it'), >> ) >> >> Il giorno sabato 8 ottobre 2016 20:44:56 UTC+2, Anthony ha scritto: >>> >>> auth.messages >>> <https://github.com/web2py/web2py/blob/e6a3081b42ecd58441419930266baf286561c4c7/gluon/tools.py#L1894> >>> >>> is an instance of gluon.storage.Messages >>> <https://github.com/web2py/web2py/blob/e6a3081b42ecd58441419930266baf286561c4c7/gluon/storage.py#L190>, >>> >>> so all messages are automatically translated via current.T. No need to >>> wrap anything in T(). >>> >>> Anthony >>> >>> On Saturday, October 8, 2016 at 9:48:13 AM UTC-4, Gael Princivalle wrote: >>>> >>>> Hello. >>>> >>>> Here we can change the auth.settings messages: >>>> >>>> http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages >>>> >>>> For a multilingual website it's necessary changing: >>>> auth.messages.verify_password = 'Verify Password' >>>> to >>>> auth.messages.verify_password = T('Verify Password') >>>> >>>> I suggest to already make this change for all the messages in a future >>>> web2py release. >>>> Verify Password is in the lnaguage.py file, but not 'Check to delete:' >>>> for example. >>>> >>>> It miss the documentation for two messages: >>>> auth.messages.verify_email = ... >>>> auth.messages.reset_password = ... >>>> >>>> How can I set with T() this messages like : >>>> auth.messages.verify_email = T('Welcome %(username)s ! Click on the >>>> link %(link)s to verify your email.' >>>> >>>> Thanks. >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.