Use translations in flash messages

This commit is contained in:
leigh-mil 2020-01-15 13:49:33 -05:00
parent 0c733dd365
commit d154b90c05
2 changed files with 15 additions and 8 deletions

View File

@ -129,8 +129,8 @@ MESSAGES = {
"category": "success", "category": "success",
}, },
"resend_portfolio_invitation_error": { "resend_portfolio_invitation_error": {
"title_template": "Portfolio invitation error", "title": "flash.portfolio_invite.error.title",
"message_template": "There was an error processing the invitation for {{ user_name }}.", "message": "flash.portfolio_invite.error.message",
"category": "error", "category": "error",
}, },
"revoked_portfolio_access": { "revoked_portfolio_access": {
@ -159,15 +159,13 @@ MESSAGES = {
"category": "success", "category": "success",
}, },
"update_portfolio_member": { "update_portfolio_member": {
"title_template": "Success!", "title": "flash.portfolio_member.update.title",
"message_template": """ "message": "flash.portfolio_member.update.message",
You have successfully updated access permissions for {{ member_name }}.
""",
"category": "success", "category": "success",
}, },
"update_portfolio_member_error": { "update_portfolio_member_error": {
"title_template": "Permissions for {{ member_name }} could not be updated", "title": "flash.portfolio_member.update_error.title",
"message_template": "An unexpected problem occurred with your request, please try again. If the problem persists, contact an administrator.", "message": "flash.portfolio_member.update_error.message",
"category": "error", "category": "error",
}, },
"updated_application_team_settings": { "updated_application_team_settings": {

View File

@ -169,10 +169,19 @@ flash:
revoked: revoked:
title: Removed portfolio access title: Removed portfolio access
message: Portfolio access successfully removed from {member_name}. message: Portfolio access successfully removed from {member_name}.
update:
title: Success!
message: You have successfully updated access permissions for {member_name}.
update_error:
title: Permissions for {member_name} could not be updated
message: An unexpected problem occurred with your request, please try again. If the problem persists, contact an administrator.
portfolio_invite: portfolio_invite:
resent: resent:
title: Invitation resent title: Invitation resent
message: Successfully sent a new invitation to {user_name}. message: Successfully sent a new invitation to {user_name}.
error:
title: Portfolio invitation error
message: There was an error processing the invitation for {user_name}.
session_expired: session_expired:
title: Session Expired title: Session Expired
message: Your session expired due to inactivity. Please log in again to continue. message: Your session expired due to inactivity. Please log in again to continue.