From 59c7958855794e0694a22b295879be1183ceff43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B0=D1=82=D1=8C=D1=8F=D0=BD=D0=B0=20=D0=90=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=D0=B5=D0=B5=D0=B2=D0=B0?= Date: Thu, 30 May 2024 13:45:48 +0300 Subject: [PATCH] add view --- src/app.js | 2 +- src/locales/ru.js | 2 +- src/view.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.js b/src/app.js index 5105ed0..1f47998 100644 --- a/src/app.js +++ b/src/app.js @@ -38,7 +38,7 @@ const state = { yup.setLocale({ string: { - url: () => ({ key: 'errors.invalidRss' }), + url: () => ({ key: 'errors.invalidUrl' }), }, mixed: { notoneOf: () => ({ key: 'errors.existsRss' }), diff --git a/src/locales/ru.js b/src/locales/ru.js index 2cf1b8a..023fc08 100644 --- a/src/locales/ru.js +++ b/src/locales/ru.js @@ -7,7 +7,7 @@ export default { button: 'Добавить', errors: { existsRss: 'RSS уже существует', - invalidRss: 'Ресурс не содержит валидный RSS', + invalidUrl: 'Ресурс не содержит валидный RSS', }, }, }; diff --git a/src/view.js b/src/view.js index 00340ac..73a63ce 100644 --- a/src/view.js +++ b/src/view.js @@ -23,7 +23,7 @@ export default (elements, i18n, state) => { case 'form.errors': errorElement.classList.remove('text-success'); errorElement.classList.add('text-danger'); - errorElement.textContent = t('invalidRss'); + errorElement.textContent = t('invalidUrl'); break; default: }