Commit 5b782f0a authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: Translate messages

parent 8de189a1
......@@ -4,6 +4,7 @@
REQUEST = context.REQUEST
response = REQUEST.RESPONSE
portal = context.getPortalObject()
translateString = portal.Base_translateString
password_confirm, password = REQUEST['password_confirm'], REQUEST['password']
new_url = "".join([x for x in REQUEST["HTTP_REFERER"].split("&")
......@@ -13,7 +14,7 @@ if password_confirm != password:
return response.redirect(
"%s&portal_status_message=%s" % (
new_url,
"New password does not match confirmation")
translateString("Passwords do not match."))
)
password_key = REQUEST['password_key']
......@@ -22,7 +23,7 @@ assert password_key
validation_message_list = portal.portal_password.analyzePassword(password, password_key)
if validation_message_list:
message = ' '.join([str(x) for x in validation_message_list])
message = ' '.join([translateString(x) for x in validation_message_list])
return response.redirect(
"%s&portal_status_message=%s" % (
new_url,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment