Fix flash message text and mark them to traslation

This commit is contained in:
joker-x 2020-09-07 14:26:11 +02:00
parent e980e4d34f
commit b8088acfae
6 changed files with 24 additions and 8 deletions

View file

@ -414,10 +414,11 @@ export class SectionContent extends Component {
}
componentDidMount() {
const t = this.props.t;
const queryParams = this.props.location.search;
if (queryParams.indexOf('cas-login-success') > -1) this.setFlashMessage('success', 'Successful authentication');
if (queryParams.indexOf('cas-logout-success') > -1) this.setFlashMessage('success', 'Successful logout');
if (queryParams.indexOf('cas-login-error') > -1) this.setFlashMessage('danger', 'Fail authentication');
if (queryParams.indexOf('cas-login-success') > -1) this.setFlashMessage('success', t('authenticationSuccessful'));
if (queryParams.indexOf('cas-logout-success') > -1) this.setFlashMessage('success', t('logoutSuccessful'));
if (queryParams.indexOf('cas-login-error') > -1) this.setFlashMessage('danger', t('authenticationFailed'));
window.addEventListener('beforeunload', this.beforeUnloadHandler);
this.historyUnblock = this.props.history.block('Changes you made may not be saved. Are you sure you want to leave this page?');

View file

@ -1064,5 +1064,8 @@
"channelName": "Channel \"{{name}}\"",
"cloneCampaign": "Clone Campaign",
"next": "Next",
"selectCampaignToBeCloned": "Select campaign to be cloned."
"selectCampaignToBeCloned": "Select campaign to be cloned.",
"authenticationSuccessful": "Authentication successful",
"logoutSucessful": "Logout successful",
"authenticationFailed": "Authentication failed"
}

View file

@ -1070,5 +1070,8 @@
"channelName": "Channel \"{{name}}\"",
"cloneCampaign": "Clone Campaign",
"next": "Next",
"selectCampaignToBeCloned": "Select campaign to be cloned."
"selectCampaignToBeCloned": "Select campaign to be cloned.",
"authenticationSuccessful": "Authentication successful",
"logoutSucessful": "Logout successful",
"authenticationFailed": "Authentication failed"
}

View file

@ -1094,5 +1094,8 @@
"selectCampaignToBeCloned": "Elige la campaña que será clonada.",
"tagLanguage": "Lenguaje de marcado",
"tagLanguageMustBeSelected": "Debes seleccionar un lenguaje de marcado",
"helpText": "Texto de ayuda"
"helpText": "Texto de ayuda",
"authenticationSuccessful": "Autentificación completada con éxito",
"logoutSucessful": "Logout completado con éxito",
"authenticationFailed": "Autentificación fallida"
}

View file

@ -1065,5 +1065,8 @@
"channelName": "Channel \"{{name}}\"",
"cloneCampaign": "Clone Campaign",
"next": "Next",
"selectCampaignToBeCloned": "Select campaign to be cloned."
"selectCampaignToBeCloned": "Select campaign to be cloned.",
"authenticationSuccessful": "Authentication successful",
"logoutSucessful": "Logout successful",
"authenticationFailed": "Authentication failed"
}

View file

@ -1143,5 +1143,8 @@
"channelName": "Channel \"{{name}}\"",
"cloneCampaign": "Clone Campaign",
"next": "Next",
"selectCampaignToBeCloned": "Select campaign to be cloned."
"selectCampaignToBeCloned": "Select campaign to be cloned.",
"authenticationSuccessful": "Authentication successful",
"logoutSucessful": "Logout successful",
"authenticationFailed": "Authentication failed"
}