aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/client.js12
-rw-r--r--res/langs/en.json3
-rw-r--r--res/langs/ru.json3
3 files changed, 15 insertions, 3 deletions
diff --git a/res/client.js b/res/client.js
index b320491..6cee82b 100644
--- a/res/client.js
+++ b/res/client.js
@@ -1847,7 +1847,17 @@ client_Main.prototype = {
break;
case "ServerMessage":
var id = data.serverMessage.textId;
- this.serverMessage(id == "usernameError" ? StringTools.replace(Lang.get(id),"$MAX","" + this.config.maxLoginLength) : Lang.get(id));
+ var text;
+ if(id == "usernameError") {
+ text = StringTools.replace(Lang.get(id),"$MAX","" + this.config.maxLoginLength);
+ } else if(StringTools.startsWith(id,"accessError")) {
+ var args = id.split("|");
+ var err = Lang.get(args[0]);
+ text = args[1] == null ? "" + err + "." : "" + err + ": " + StringTools.replace(Lang.get("noPermission"),"$PERMISSION",args[1]);
+ } else {
+ text = Lang.get(id);
+ }
+ this.serverMessage(text);
break;
case "SetLeader":
ClientTools.setLeader(this.clients,data.setLeader.clientName);
diff --git a/res/langs/en.json b/res/langs/en.json
index 36ff556..b7f8246 100644
--- a/res/langs/en.json
+++ b/res/langs/en.json
@@ -18,7 +18,8 @@
"hideThisMessage": "Hide this message",
"usernameError": "Username length must be from 1 to $MAX characters and don't repeat another's. Characters &^<>'\" are not allowed.",
"passwordMatchError": "Wrong password.",
- "accessError": "Access Error.",
+ "accessError": "Access error",
+ "noPermission": "No '$PERMISSION' permission.",
"totalVideoLimitError": "Playlist video limit has been reached.",
"userVideoLimitError": "Playlist video limit per user has been reached.",
"videoAlreadyExistsError": "The video already exists in playlist.",
diff --git a/res/langs/ru.json b/res/langs/ru.json
index ec0a642..b98237d 100644
--- a/res/langs/ru.json
+++ b/res/langs/ru.json
@@ -18,7 +18,8 @@
"hideThisMessage": "Скрыть это сообщение",
"usernameError": "Ник должен быть от 1 до $MAX символов и не повторять чужие. Символы &^<>'\" запрещены.",
"passwordMatchError": "Неправильный пароль.",
- "accessError": "Ошибка доступа.",
+ "accessError": "Ошибка доступа",
+ "noPermission": "Нет '$PERMISSION' разрешения.",
"totalVideoLimitError": "Был достингут лимит видео в плейлисте.",
"userVideoLimitError": "Был достингут лимит видео на пользователя.",
"videoAlreadyExistsError": "Видео уже имеется в плейлисте.",
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage