From 8f87b75c0217bbc274fd0f3f4bb7d74d1b88d20c Mon Sep 17 00:00:00 2001 From: Ivaschenko Christina Date: Mon, 22 Jan 2018 10:26:19 +0700 Subject: [PATCH] feat(account-actions): Remove "lock/enable account" feature from Accounts - translate error --- src/app/shared/services/error.service.ts | 5 +++++ src/i18n/en.json | 4 +++- src/i18n/ru.json | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/shared/services/error.service.ts b/src/app/shared/services/error.service.ts index 29d7820e99..269d2c8679 100644 --- a/src/app/shared/services/error.service.ts +++ b/src/app/shared/services/error.service.ts @@ -48,6 +48,11 @@ export class ErrorService { { regex: /maxSnaps exceeds limit: (\d+) for interval type: hourly/, translation: 'ERRORS.SNAPSHOT_POLICIES.HOURLY_TURN_OFF' + }, + { + regex: + /User (.*) .*or their account.* in domain (.*) is disabled\/locked. Please contact the administrator./, + translation: 'ERRORS.AUTH.DISABLED' } ]; diff --git a/src/i18n/en.json b/src/i18n/en.json index 801693b494..7486a0d072 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -91,13 +91,15 @@ "AUTH": { "INCORRECT_USERNAME": "Incorrect username", "INCORRECT_PASSWORD": "Incorrect password", - "INCORRECT_DOMAIN": "Unable to find domain {{ val1 }}" + "INCORRECT_DOMAIN": "Unable to find domain {{ val1 }}", + "DISABLED": "User {{ val1 }} (or their account) {{ val2 }} is disabled. Please contact the administrator." }, "ISO": { "VMS_IN_USE": "Unable to delete the ISO as it's used by the following VMs:
{{ vms }}" }, "SNAPSHOT": { "LIMIT_EXCEEDED": "Snapshot limit has been exceeded. You need to delete some of your previous snapshots first." + "LIMIT_EXCEEDED": "Snapshot limit has been exceeded. You need to delete some of your previous snapshots first." }, "SSH": { "KEY_PAIR_ALREADY_EXISTS": "SSH key with name '{{ val1 }}' already exists" diff --git a/src/i18n/ru.json b/src/i18n/ru.json index 48ce415273..318e553298 100644 --- a/src/i18n/ru.json +++ b/src/i18n/ru.json @@ -91,7 +91,8 @@ "AUTH": { "INCORRECT_USERNAME": "Неверное имя пользователя", "INCORRECT_PASSWORD": "Неверный пароль", - "INCORRECT_DOMAIN": "Не удалось найти домен {{ val1 }}" + "INCORRECT_DOMAIN": "Не удалось найти домен {{ val1 }}", + "DISABLED": "Пользователь {{ val1 }} (или его акаунт) {{ val2 }} деактивирован. Пожалуйста свяжитесь с администратором ." }, "ISO": { "VMS_IN_USE": "Невозможно удалить ISO файл, так как он используется следующими машинами:
{{ vms }}"