[gen] Finalized pending i18n.
This commit is contained in:
parent
2710fb6c39
commit
8f57163c2a
20 changed files with 156 additions and 105 deletions
|
@ -876,7 +876,7 @@ class ToolMixin(BaseMixin):
|
|||
urlBack = rq['HTTP_REFERER']
|
||||
|
||||
if jsEnabled and not cookiesEnabled:
|
||||
msg = 'You must enable cookies before you can log in.' # XXX transl.
|
||||
msg = self.translate('enable_cookies')
|
||||
return self.goto(urlBack, msg)
|
||||
# Perform the Zope-level authentication
|
||||
login = rq.get('__ac_name', '')
|
||||
|
@ -884,11 +884,11 @@ class ToolMixin(BaseMixin):
|
|||
user = self.acl_users.validate(rq)
|
||||
if self.userIsAnon():
|
||||
rq.RESPONSE.expireCookie('__ac', path='/')
|
||||
msg = 'Login failed.' # XXX to translate
|
||||
msg = self.translate('login_ko')
|
||||
logMsg = 'Authentication failed (tried with login "%s").' % login
|
||||
else:
|
||||
msg = 'Welcome! You are now logged in.' # XXX to translate
|
||||
logMsg = 'User "%s" has been logged in.' % login
|
||||
msg = self.translate('login_ok')
|
||||
logMsg = 'User "%s" logged in.' % login
|
||||
self.log(logMsg)
|
||||
return self.goto(self.getApp().absolute_url(), msg)
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ class BaseMixin:
|
|||
fields in the database.'''
|
||||
rq = self.REQUEST
|
||||
tool = self.getTool()
|
||||
errorMessage = 'Please correct the indicated errors.' # XXX Translate
|
||||
errorMessage = self.translate('validation_error')
|
||||
isNew = rq.get('is_new') == 'True'
|
||||
# If this object is created from an initiator, get info about him.
|
||||
initiator, initiatorPage, initiatorField = self.getInitiatorInfo()
|
||||
|
@ -217,7 +217,7 @@ class BaseMixin:
|
|||
urlBack = tool.getSiteUrl()
|
||||
else:
|
||||
urlBack = self.getUrl()
|
||||
self.say('Changes canceled.') # XXX Translate
|
||||
self.say(self.translate('object_canceled'))
|
||||
return self.goto(urlBack)
|
||||
|
||||
# Object for storing validation errors
|
||||
|
@ -253,12 +253,11 @@ class BaseMixin:
|
|||
obj, msg = self.createOrUpdate(isNew, values, initiator, initiatorField)
|
||||
|
||||
# Redirect the user to the appropriate page
|
||||
if not msg: msg = 'Changes saved.' # XXX Translate
|
||||
if not msg: msg = self.translate('object_saved')
|
||||
# If the object has already been deleted (ie, it is a kind of transient
|
||||
# object like a one-shot form and has already been deleted in method
|
||||
# onEdit), redirect to the main site page.
|
||||
if not getattr(obj.getParentNode().aq_base, obj.id, None):
|
||||
obj.unindex()
|
||||
return self.goto(tool.getSiteUrl(), msg)
|
||||
# If the user can't access the object anymore, redirect him to the
|
||||
# main site page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue