Update msg when seting passwords (join or owner)

master
Daniel Berteaud 11 years ago
parent 3c19a340a2
commit 37ef2240f9
  1. 6
      lib/Vroom/I18N/en.pm
  2. 6
      lib/Vroom/I18N/fr.pm
  3. 12
      public/vroom.pl

@ -95,8 +95,10 @@ our %Lexicon = (
"YOU_CAN_PASSWORD_PROTECT_JOIN" => "You can protect this room with a password", "YOU_CAN_PASSWORD_PROTECT_JOIN" => "You can protect this room with a password",
"PASSWORD" => "Password", "PASSWORD" => "Password",
"PASSWORD_PROTECT" => "Password protect", "PASSWORD_PROTECT" => "Password protect",
"PASSWORD_SET" => "Password set", "PASSWORD_PROTECT_SET" => "A password will be needed to join this room",
"PASSWORD_REMOVED" => "Password removed", "PASSWORD_PROTECT_UNSET" => "No password will be asked to join this room",
"ROOM_NOW_PERSISTENT" => "This room is now persistent",
"ROOM_NO_MORE_PERSISTENT" => "This room isn't persistent anymore",
"PASSWORDS_DO_NOT_MATCH" => "Passwords do not match", "PASSWORDS_DO_NOT_MATCH" => "Passwords do not match",
"MAKE_THIS_ROOM_PERSISTENT" => "Make this room persistent", "MAKE_THIS_ROOM_PERSISTENT" => "Make this room persistent",
"SET_OWNER_PASS_PERSISTENT" => "To make this room persistent, you must set a manager password. Keep it carefully, " . "SET_OWNER_PASS_PERSISTENT" => "To make this room persistent, you must set a manager password. Keep it carefully, " .

@ -102,8 +102,10 @@ our %Lexicon = (
"YOU_CAN_PASSWORD_PROTECT_JOIN" => "Protéger l'accès au salon par un mot de passe", "YOU_CAN_PASSWORD_PROTECT_JOIN" => "Protéger l'accès au salon par un mot de passe",
"PASSWORD" => "Mot de passe", "PASSWORD" => "Mot de passe",
"PASSWORD_PROTECT" => "Protéger par mot de passe", "PASSWORD_PROTECT" => "Protéger par mot de passe",
"PASSWORD_SET" => "Le mot de passe a été pris en compte", "PASSWORD_PROTECT_SET" => "Un mot de passe sera demandé pour rejoindre ce salon",
"PASSWORD_REMOVED" => "Le mot de passe a été supprimé", "PASSWORD_PROTECT_UNSET" => "Aucun mot de passe ne sera demandé pour rejoindre ce salon",
"ROOM_NOW_PERSISTENT" => "Ce salon est maintenant persistant",
"ROOM_NO_MORE_PERSISTENT" => "Ce salon n'est plus persistant",
"PASSWORDS_DO_NOT_MATCH" => "Les mots de passe ne correspondent pas", "PASSWORDS_DO_NOT_MATCH" => "Les mots de passe ne correspondent pas",
"MAKE_THIS_ROOM_PERSISTENT" => "Rendre ce salon persistant", "MAKE_THIS_ROOM_PERSISTENT" => "Rendre ce salon persistant",
"SET_OWNER_PASS_PERSISTENT" => "Pour rendre ce salon persistant, vous devez saisir un mot de passe " . "SET_OWNER_PASS_PERSISTENT" => "Pour rendre ce salon persistant, vous devez saisir un mot de passe " .

@ -935,15 +935,13 @@ post '/action' => sub {
if (grep { $room eq $_ } @{$config->{commonRoomNames}}){ if (grep { $room eq $_ } @{$config->{commonRoomNames}}){
$msg = $self->l('ERROR_COMMON_ROOM_NAME'); $msg = $self->l('ERROR_COMMON_ROOM_NAME');
} }
else{ elsif ($self->set_owner_pass($room,$pass)){
$res = $self->set_owner_pass($room,$pass); $msg = ($pass) ? $self->l('ROOM_NOW_PERSISTENT') : $self->l('ROOM_NO_MORE_PERSISTENT');
$status = 'success';
} }
} }
else{ elsif ($type eq 'join' && $self->set_join_pass($room,$pass)){
$res = $self->set_join_pass($room,$pass); $msg = ($pass) ? $self->l('PASSWORD_PROTECT_SET') : $self->l('PASSWORD_PROTECT_UNSET');
}
if ($res){
$msg = ($pass) ? $self->l('PASSWORD_SET') : $self->l('PASSWORD_REMOVED');
$status = 'success'; $status = 'success';
} }
} }

Loading…
Cancel
Save