Localize invalid room name error message

master
Daniel Berteaud 11 years ago
parent 9dda1b654c
commit 94e57a3bee
  1. 3
      public/js/vroom.js

@ -21,6 +21,7 @@ $('.dropdown').on('hide.bs.dropdown', function(e){
var locale = { var locale = {
ERROR_MAIL_INVALID: '', ERROR_MAIL_INVALID: '',
ERROR_OCCURRED: '', ERROR_OCCURRED: '',
ERROR_NAME_INVALID: '',
CANT_SHARE_SCREEN: '', CANT_SHARE_SCREEN: '',
SCREEN_SHARING_ONLY_FOR_CHROME: '', SCREEN_SHARING_ONLY_FOR_CHROME: '',
SCREEN_SHARING_CANCELLED: '', SCREEN_SHARING_CANCELLED: '',
@ -242,7 +243,7 @@ function initIndex(){
e.preventDefault(); e.preventDefault();
// Do not submit if we know the name is invalid // Do not submit if we know the name is invalid
if (!$('#roomName').val().match(/^[\w\-]{0,49}$/)){ if (!$('#roomName').val().match(/^[\w\-]{0,49}$/)){
$('#roomName').notify('ERROR_NAME_INVALID', 'error'); $('#roomName').notify(locale.ERROR_NAME_INVALID, 'error');
} }
else{ else{
$.ajax({ $.ajax({

Loading…
Cancel
Save