2008-12-31 16:10:02 +01:00
|
|
|
##@file
|
|
|
|
# Internationalization for Lemonldap::NG portal
|
|
|
|
|
|
|
|
##@class
|
|
|
|
# Internationalization for Lemonldap::NG portal
|
2007-03-04 15:52:51 +01:00
|
|
|
package Lemonldap::NG::Portal::_i18n;
|
|
|
|
|
2008-06-06 05:51:39 +02:00
|
|
|
# Developpers warning : this file must stay UTF-8 encoded
|
|
|
|
|
2007-03-04 15:52:51 +01:00
|
|
|
use AutoLoader qw(AUTOLOAD);
|
2010-01-21 18:38:55 +01:00
|
|
|
our $VERSION = '0.5';
|
2007-03-04 15:52:51 +01:00
|
|
|
|
2008-12-31 16:10:02 +01:00
|
|
|
## @fn string error(int error,string lang)
|
|
|
|
# @param $error Number of error to resolve
|
|
|
|
# @param $lang Language or Accepted-Language HTTP header string
|
|
|
|
# @return Error string for the $code in the $lang language
|
2007-03-04 15:52:51 +01:00
|
|
|
sub error {
|
2010-01-31 09:25:05 +01:00
|
|
|
my ( $error, $lang ) = splice @_;
|
2007-03-04 15:52:51 +01:00
|
|
|
$lang = lc($lang);
|
|
|
|
$lang =~ s/-/_/g;
|
2008-06-06 05:51:39 +02:00
|
|
|
$error = 0 if ( $error < 0 );
|
2007-03-04 15:52:51 +01:00
|
|
|
foreach ( split( /[,;]/, $lang ) ) {
|
|
|
|
next if /=/;
|
|
|
|
if ( __PACKAGE__->can("error_$_") ) {
|
|
|
|
return &{"error_$_"}->[$error];
|
|
|
|
}
|
2008-06-06 05:51:39 +02:00
|
|
|
s/^(..).*$/$1/;
|
|
|
|
if ( __PACKAGE__->can("error_$_") ) {
|
|
|
|
return &{"error_$_"}->[$error];
|
|
|
|
}
|
2007-03-04 15:52:51 +01:00
|
|
|
}
|
2007-03-26 21:27:53 +02:00
|
|
|
return &error_en->[$error];
|
2007-03-04 15:52:51 +01:00
|
|
|
}
|
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
## @fn string msg(int msg,string lang)
|
|
|
|
# @param $msg Number of msg to resolve
|
|
|
|
# @param $lang Language or Accepted-Language HTTP header string
|
|
|
|
# @return Error string for the $code in the $lang language
|
|
|
|
sub msg {
|
2010-01-31 09:25:05 +01:00
|
|
|
my ( $msg, $lang ) = splice @_;
|
2010-01-11 17:04:36 +01:00
|
|
|
$lang = lc($lang);
|
|
|
|
$lang =~ s/-/_/g;
|
|
|
|
$msg = 0 if ( $msg < 0 );
|
|
|
|
foreach ( split( /[,;]/, $lang ) ) {
|
|
|
|
next if /=/;
|
|
|
|
if ( __PACKAGE__->can("msg_$_") ) {
|
|
|
|
return &{"msg_$_"}->[$msg];
|
|
|
|
}
|
|
|
|
s/^(..).*$/$1/;
|
|
|
|
if ( __PACKAGE__->can("msg_$_") ) {
|
|
|
|
return &{"msg_$_"}->[$msg];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return &msg_en->[$msg];
|
|
|
|
}
|
|
|
|
|
2007-03-04 15:52:51 +01:00
|
|
|
1;
|
|
|
|
__END__
|
2008-06-06 05:51:39 +02:00
|
|
|
|
2007-10-22 21:42:19 +02:00
|
|
|
# Order of the constants:
|
2008-08-08 18:19:16 +02:00
|
|
|
# * PE_OK 0
|
|
|
|
# * PE_SESSIONEXPIRED 1
|
|
|
|
# * PE_FORMEMPTY 2
|
|
|
|
# * PE_WRONGMANAGERACCOUNT 3
|
|
|
|
# * PE_USERNOTFOUND 4
|
|
|
|
# * PE_BADCREDENTIALS 5
|
|
|
|
# * PE_LDAPCONNECTFAILED 6
|
|
|
|
# * PE_LDAPERROR 7
|
|
|
|
# * PE_APACHESESSIONERROR 8
|
|
|
|
# * PE_FIRSTACCESS 9
|
|
|
|
# * PE_BADCERTIFICATE 10
|
|
|
|
# * PE_LA_FAILED 11
|
|
|
|
# * PE_LA_ARTFAILED 12
|
|
|
|
# * PE_LA_DEFEDFAILED 13
|
|
|
|
# * PE_LA_QUERYEMPTY 14
|
|
|
|
# * PE_LA_SOAPFAILED 15
|
|
|
|
# * PE_LA_SLOFAILED 16
|
|
|
|
# * PE_LA_SSOFAILED 17
|
|
|
|
# * PE_LA_SSOINITFAILED 18
|
|
|
|
# * PE_LA_SESSIONERROR 19
|
|
|
|
# * PE_LA_SEPFAILED 20
|
|
|
|
# * PE_PP_ACCOUNT_LOCKED 21
|
|
|
|
# * PE_PP_PASSWORD_EXPIRED 22
|
|
|
|
# * PE_CERTIFICATEREQUIRED 23
|
|
|
|
# * PE_ERROR 24
|
|
|
|
# * PE_PP_CHANGE_AFTER_RESET 25
|
|
|
|
# * PE_PP_PASSWORD_MOD_NOT_ALLOWED 26
|
|
|
|
# * PE_PP_MUST_SUPPLY_OLD_PASSWORD 27
|
|
|
|
# * PE_PP_INSUFFICIENT_PASSWORD_QUALITY 28
|
|
|
|
# * PE_PP_PASSWORD_TOO_SHORT 29
|
|
|
|
# * PE_PP_PASSWORD_TOO_YOUNG 30
|
|
|
|
# * PE_PP_PASSWORD_IN_HISTORY 31
|
2008-09-19 17:28:00 +02:00
|
|
|
# * PE_PP_GRACE 32
|
|
|
|
# * PE_PP_EXP_WARNING 33
|
|
|
|
# * PE_PASSWORD_MISMATCH 34
|
|
|
|
# * PE_PASSWORD_OK 35
|
2008-12-03 14:27:30 +01:00
|
|
|
# * PE_NOTIFICATION 36
|
|
|
|
# * PE_BADURL 37
|
2009-03-08 09:50:58 +01:00
|
|
|
# * PE_NOSCHEME 38
|
2009-12-10 12:30:43 +01:00
|
|
|
# * PE_BADOLDPASSWORD 39
|
2010-01-11 15:02:43 +01:00
|
|
|
# * PE_MALFORMEDUSER 40
|
|
|
|
# * PE_SESSIONNOTGRANTED 41
|
2010-01-21 18:38:55 +01:00
|
|
|
# * PE_CONFIRM 42
|
|
|
|
# * PE_MAILFORMEMPTY 43
|
|
|
|
# * PE_BADMAILTOKEN 44
|
|
|
|
# * PE_MAILERROR 45
|
|
|
|
# * PE_MAILOK 46
|
2010-02-18 18:22:04 +01:00
|
|
|
# * PE_LOGOUT_OK 47
|
2007-03-04 15:52:51 +01:00
|
|
|
|
|
|
|
# Not used in errors:
|
|
|
|
# * PE_DONE -1
|
2008-05-11 21:21:39 +02:00
|
|
|
# * PE_REDIRECT -2
|
2007-03-04 15:52:51 +01:00
|
|
|
|
2008-12-31 16:10:02 +01:00
|
|
|
## @fn private arrayRef error_fr()
|
|
|
|
# French translation.
|
|
|
|
# @return Array of error messages
|
2007-03-04 15:52:51 +01:00
|
|
|
sub error_fr {
|
2008-11-26 12:11:03 +01:00
|
|
|
use utf8;
|
2007-03-04 15:52:51 +01:00
|
|
|
[
|
2008-06-06 05:51:39 +02:00
|
|
|
"Utilisateur authentifié",
|
|
|
|
"Votre session a expiré, vous devez vous réauthentifier",
|
|
|
|
"Identifiant ou mot de passe non renseigné",
|
2007-03-04 15:52:51 +01:00
|
|
|
"Compte ou mot de passe LDAP de l'application incorrect",
|
2008-03-31 16:25:14 +02:00
|
|
|
"Utilisateur inexistant",
|
|
|
|
"Mot de passe ou identifiant incorrect",
|
|
|
|
"Connexion impossible au serveur LDAP",
|
|
|
|
"Erreur anormale du serveur LDAP",
|
|
|
|
"Erreur du module Apache::Session choisi",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Authentification exigée",
|
2008-03-31 16:25:14 +02:00
|
|
|
"Certificat invalide",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Échec de l'initialisation de Lasso:Login ou Lasso:Logout",
|
|
|
|
"Échec de la résolution de l'artefact Liberty Alliance",
|
|
|
|
"Échec de la défédération Liberty Alliance",
|
2009-02-12 20:48:53 +01:00
|
|
|
"La requête renvoyée par le fournisseur d'identité Liberty Alliance est vide",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Un des appels SOAP Liberty Alliance a échoué",
|
|
|
|
"Un des appels de déconnexion Liberty Alliance a échoué",
|
|
|
|
"Aucun artefact SAML trouvé, ou échec de l'auto-acceptation SSO",
|
|
|
|
"Initialisation, construction ou requête SSO en échec",
|
2008-03-31 16:25:14 +02:00
|
|
|
"Impossible d'enregistrer l'identifiant de connexion Liberty Alliance",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Un processus terminal Liberty Alliance a échoué",
|
|
|
|
"Votre compte est bloqué",
|
|
|
|
"Votre mot de passe a expiré",
|
|
|
|
"Certificat exigé",
|
2008-08-11 09:26:55 +02:00
|
|
|
"Erreur",
|
|
|
|
"Le mot de passe a été réinitialisé et doit être changé",
|
|
|
|
"Modification du mot de passe non autorisée",
|
|
|
|
"Ancien mot de passe à fournir pour le changer",
|
|
|
|
"Qualité de mot de passe insuffisante",
|
|
|
|
"Mot de passe trop court",
|
|
|
|
"Mot de passe trop récent",
|
|
|
|
"Mot de passe utilisé trop récemment",
|
2008-09-19 17:28:00 +02:00
|
|
|
" authentifications restantes, changez votre mot de passe !",
|
2009-02-12 20:48:53 +01:00
|
|
|
" secondes avant expiration de votre mot de passe, pensez à le changer !",
|
2008-09-19 17:28:00 +02:00
|
|
|
"Les mots de passe ne correspondent pas",
|
|
|
|
"Le mot de passe a été changé",
|
2008-12-03 14:27:30 +01:00
|
|
|
"Vous avez un nouveau message",
|
|
|
|
'Mauvaise URL',
|
2009-03-08 09:50:58 +01:00
|
|
|
'Aucun schéma disponible',
|
2009-05-18 15:53:51 +02:00
|
|
|
'Ancien mot de passe invalide',
|
2009-12-19 09:57:59 +01:00
|
|
|
"Nom d'utilisateur incorrect",
|
2010-01-11 15:02:43 +01:00
|
|
|
"Ouverture de session non autorisée",
|
2010-01-12 12:12:46 +01:00
|
|
|
"Confirmation demandée",
|
2010-01-21 18:38:55 +01:00
|
|
|
"Veuillez saisir votre adresse mail",
|
|
|
|
"La clé de confirmation est invalide ou trop ancienne",
|
2010-01-22 12:25:37 +01:00
|
|
|
"L'envoi du mail a échoué",
|
|
|
|
"Un mail vous a été envoyé",
|
2010-02-18 18:22:04 +01:00
|
|
|
"Vous avez été déconnecté",
|
2007-03-04 15:52:51 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2008-12-31 16:10:02 +01:00
|
|
|
## @fn private arrayRef error_en()
|
|
|
|
# English translation.
|
|
|
|
# @return Array of error messages
|
2007-03-04 15:52:51 +01:00
|
|
|
sub error_en {
|
|
|
|
[
|
2008-06-06 05:51:39 +02:00
|
|
|
"User authenticated",
|
2008-03-31 16:25:14 +02:00
|
|
|
"Your connection has expired; You must to be authentified once again",
|
|
|
|
"User and password fields must be filled",
|
|
|
|
"Wrong directory manager account or password",
|
|
|
|
"User not found in directory",
|
|
|
|
"Wrong credentials",
|
|
|
|
"Unable to connect to LDAP server",
|
|
|
|
"Abnormal error from LDAP server",
|
|
|
|
"Apache::Session module failed",
|
|
|
|
"Authentication required",
|
|
|
|
"Invalid certificate",
|
|
|
|
"Initialization of Lasso:Login or Lasso:Logout failed",
|
|
|
|
"Liberty-Alliance artefact resolution failed",
|
|
|
|
"Liberty-Alliance defederation failed",
|
|
|
|
"Liberty-Alliance query returned by IDP in assertion is empty",
|
|
|
|
"One of Liberty-Alliance soap calls failed",
|
|
|
|
"One of Liberty-Alliance single logout failed",
|
|
|
|
"No SAML artefact found, or auto-accepting SSO failed",
|
|
|
|
"Initializing, building or requesting SSO failed",
|
|
|
|
"Unable to store Liberty-Alliance session id",
|
|
|
|
"A Liberty-Alliance Soap End Point process failed",
|
|
|
|
"Your account is locked",
|
|
|
|
"Your password has expired",
|
2008-05-25 15:17:16 +02:00
|
|
|
"Certificate required",
|
2008-08-11 09:26:55 +02:00
|
|
|
'Error',
|
|
|
|
'Password has been reset and now must be changed',
|
|
|
|
'Password may not be modified',
|
|
|
|
'Old password must also be supplied when setting a new password',
|
|
|
|
'Insufficient password quality',
|
|
|
|
'Password too short',
|
|
|
|
'Password too young',
|
|
|
|
'Password used too recently',
|
2008-09-19 17:28:00 +02:00
|
|
|
' authentications remaining, change your password!',
|
|
|
|
' seconds before password expiration, change it!',
|
|
|
|
'Passwords mismatch',
|
|
|
|
'Password successfully changed',
|
2008-12-03 14:27:30 +01:00
|
|
|
'You have a new message',
|
|
|
|
'Bad URL',
|
2009-03-08 09:50:58 +01:00
|
|
|
'No scheme available',
|
2009-05-18 15:53:51 +02:00
|
|
|
'Bad old password',
|
2009-12-19 09:57:59 +01:00
|
|
|
'Bad username',
|
2010-01-11 15:02:43 +01:00
|
|
|
'Session opening not allowed',
|
2010-01-12 12:12:46 +01:00
|
|
|
'Confirmation required',
|
2010-01-21 18:38:55 +01:00
|
|
|
'Please provide your mail address',
|
|
|
|
'Confirmation key is invalid or too old',
|
|
|
|
'An error occurs when sending mail',
|
2010-01-22 12:25:37 +01:00
|
|
|
'A mail has been sent',
|
2010-02-18 18:22:04 +01:00
|
|
|
'You have been disconnected',
|
2007-03-04 15:52:51 +01:00
|
|
|
];
|
2007-10-22 21:42:19 +02:00
|
|
|
}
|
|
|
|
|
2008-12-31 16:10:02 +01:00
|
|
|
## @fn private arrayRef error_ro()
|
|
|
|
# Romanian translation.
|
|
|
|
# @return Array of error messages
|
2008-06-06 05:51:39 +02:00
|
|
|
sub error_ro {
|
2008-11-26 12:11:03 +01:00
|
|
|
use utf8;
|
2008-06-06 05:51:39 +02:00
|
|
|
[
|
|
|
|
"Utilizator autentificat",
|
|
|
|
"Sesiunea dvs. a expirat, trebuie să vă reautentificaţi",
|
|
|
|
"Identificator sau parolă inexistentă",
|
|
|
|
"Cont sau parolă LDAP a aplicaţiei incorect",
|
|
|
|
"Utilizator inexistent",
|
|
|
|
"Parolă sau identificator incorect",
|
|
|
|
"Conexiune imposibilă la serverul LDAP",
|
|
|
|
"Eroare anormală a serverului LDAP",
|
|
|
|
"Eroare a modulului Apache::Session aleasă",
|
|
|
|
"Autentificare cerută",
|
|
|
|
"Certificat invalid",
|
|
|
|
"Eşec al iniţializării Lasso:Login sau Lasso:Logout",
|
|
|
|
"Eşec al rezoluţiei artefact-ului Liberty Alliance",
|
|
|
|
"Eşec al defederaţiei Liberty Alliance",
|
2009-02-12 20:48:53 +01:00
|
|
|
"Cererea retrimisă de către furnizorul de identitate Liberty Alliance este goală",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Unul dintre apelurile SOAP Liberty Alliance a eşuat",
|
|
|
|
"Unul dintre apelurile de deconectare Liberty Alliance a eşuat",
|
|
|
|
"Nici un artefact SAML găsit, sau eşec al auto-acceptării SSO",
|
|
|
|
"Iniţiere, construcţie sau cerere SSO în eşec",
|
2009-02-12 20:48:53 +01:00
|
|
|
"Imposibil de a înregistra identificatorul de conectare Liberty Alliance",
|
2008-06-06 05:51:39 +02:00
|
|
|
"Un proces terminal Liberty Alliance a eşuat",
|
|
|
|
"Contul dvs. este blocat",
|
|
|
|
"Parola dvs. a expirat",
|
|
|
|
"Certificat cerut",
|
2008-08-11 09:26:55 +02:00
|
|
|
'Eroare',
|
2008-12-25 15:14:15 +01:00
|
|
|
'Parola a fost de resetare şi acum trebuie să fie schimbat',
|
|
|
|
'Parola nu poate fi modificat',
|
2009-02-12 20:48:53 +01:00
|
|
|
'Vechea parolă trebuie să fi, de asemenea, furnizate atunci când stabilesc o nouă parolă',
|
2008-12-25 15:14:15 +01:00
|
|
|
'Calitate parola insuficiente',
|
|
|
|
'Parola prea scurt',
|
|
|
|
'Prea parolă nouă',
|
|
|
|
'Parola folosit prea recent',
|
|
|
|
' authentications rămase, schimbaţi-vă parola!',
|
2009-02-12 20:48:53 +01:00
|
|
|
' secunde înainte de expirarea parola dvs., asiguraţi-vă pentru a schimba!',
|
2008-12-25 15:14:15 +01:00
|
|
|
'Parolele nu se potrivesc',
|
|
|
|
'Parola a fost schimbată',
|
|
|
|
'Ai un mesaj nou',
|
|
|
|
'Rea URL',
|
2010-01-12 12:12:46 +01:00
|
|
|
'Nici o posibilitate disponibilă',
|
|
|
|
'Parola rău vechi',
|
|
|
|
'Nume de utilizator gresit',
|
|
|
|
'Conectare neautorizată',
|
|
|
|
'Confirmare necesare',
|
2010-01-21 18:38:55 +01:00
|
|
|
'Vă rugăm să introduceţi adresa dvs. de e-mail',
|
|
|
|
'Cheie de confirmare este invalid sau prea veche',
|
2010-01-22 12:25:37 +01:00
|
|
|
'Trimiterea mail nu a reuşit',
|
|
|
|
'Un e-mail a fost trimis',
|
2010-02-18 18:22:04 +01:00
|
|
|
'Aţi fost deconectat',
|
2008-06-06 05:51:39 +02:00
|
|
|
];
|
|
|
|
}
|
2010-01-11 17:04:36 +01:00
|
|
|
|
2010-01-15 23:01:04 +01:00
|
|
|
# Order of the constants:
|
|
|
|
# * PM_USER 0
|
|
|
|
# * PM_DATE 1
|
|
|
|
# * PM_IP 2
|
|
|
|
# * PM_SESSIONS_DELETED 3
|
|
|
|
# * PM_OTHER_SESSIONS 4
|
|
|
|
# * PM_REMOVE_OTHER_SESSIONS 5
|
|
|
|
# * PM_PP_GRACE 6
|
|
|
|
# * PM_PP_EXP_WARNING 7
|
2010-02-04 13:30:18 +01:00
|
|
|
# * PM_SAML_IDPSELECT 8
|
|
|
|
# * PM_SAML_IDPCHOOSEN 9
|
|
|
|
# * PM_REMEMBERCHOICE 10
|
2010-01-15 23:01:04 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
sub msg_en {
|
|
|
|
use utf8;
|
|
|
|
[
|
2010-01-12 10:53:49 +01:00
|
|
|
'User',
|
2010-01-11 17:04:36 +01:00
|
|
|
'Date',
|
|
|
|
'IP address',
|
2010-01-12 10:53:49 +01:00
|
|
|
'The following sessions have been deleted',
|
|
|
|
'Other sessions',
|
2010-01-12 11:36:04 +01:00
|
|
|
'Remove other sessions',
|
2010-01-15 23:01:04 +01:00
|
|
|
'authentications remaining, change your password!',
|
|
|
|
'seconds before password expiration, change it!',
|
2010-02-04 13:30:18 +01:00
|
|
|
'Select your Identity Provider',
|
|
|
|
'Redirection to your Identity Provider',
|
|
|
|
'Remember my choice',
|
2010-01-11 17:04:36 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
sub msg_fr {
|
|
|
|
use utf8;
|
|
|
|
[
|
2010-01-12 10:53:49 +01:00
|
|
|
'Utilisateur',
|
2010-01-11 17:04:36 +01:00
|
|
|
'Date',
|
|
|
|
'Adresse IP',
|
2010-01-12 10:53:49 +01:00
|
|
|
'Les sessions suivantes ont été effacées',
|
|
|
|
'Autres sessions',
|
2010-01-12 11:36:04 +01:00
|
|
|
'Supprimer les autres sessions',
|
2010-01-15 23:01:04 +01:00
|
|
|
'authentifications restantes, changez votre mot de passe !',
|
|
|
|
'secondes avant expiration de votre mot de passe, pensez à le changer !',
|
2010-02-04 13:30:18 +01:00
|
|
|
'Choisissez votre fournisseur d\'identité',
|
|
|
|
'Redirection vers votre fournisseur d\'identité',
|
|
|
|
'Se souvenir de mon choix',
|
2010-01-11 17:04:36 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|