From 9a3d170297ef90f349f4f667b3e3af7b71062a99 Mon Sep 17 00:00:00 2001 From: SwethaKrish4 <110164892+SwethaKrish4@users.noreply.github.com> Date: Tue, 26 Mar 2024 20:44:28 +0530 Subject: [PATCH] Mydevelop (#706) * MOSIP-31897: added service errors in resource bundle Signed-off-by: SwethaKrish4 <110164892+SwethaKrish4@users.noreply.github.com> * MOSIP-31897: added service errors in resource bundle Signed-off-by: SwethaKrish4 <110164892+SwethaKrish4@users.noreply.github.com> * MOSIP-31897: added service errors in resource bundle Signed-off-by: SwethaKrish4 <110164892+SwethaKrish4@users.noreply.github.com> --------- Signed-off-by: SwethaKrish4 <110164892+SwethaKrish4@users.noreply.github.com> --- src/app/app.utils.ts | 3 ++- src/app/core/components/dialog/dialog.component.html | 7 ++++--- .../project/add-project/add-project.component.html | 2 +- src/assets/i18n/ara.json | 9 +++++++-- src/assets/i18n/eng.json | 9 +++++++-- src/assets/i18n/fra.json | 9 +++++++-- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/app/app.utils.ts b/src/app/app.utils.ts index 14874626..121d38de 100644 --- a/src/app/app.utils.ts +++ b/src/app/app.utils.ts @@ -236,7 +236,8 @@ export default class Utils { if (errorsList && errorsList.length > 0) { let error = errorsList[0]; //check if translation is available - const translatedMsg = resourceBundle.serviceErrors[error.errorCode]; + const serviceErrorMessages = resourceBundle['serviceErrors']; + const translatedMsg = Utils.getTranslatedMessage(serviceErrorMessages, error.errorCode); if (!showErrCode) { if (translatedMsg) { message = translatedMsg; diff --git a/src/app/core/components/dialog/dialog.component.html b/src/app/core/components/dialog/dialog.component.html index 87b48cf4..c97125ea 100644 --- a/src/app/core/components/dialog/dialog.component.html +++ b/src/app/core/components/dialog/dialog.component.html @@ -119,12 +119,13 @@

{{"projectDashboard.title"|transla {{"viewProject.websiteUrl"|translate}} - + {{"viewProject.websiteUrlIsRequired"|translate}} - - {{"dialogMessages.websiteUrlIsInvalid"|translate}} + + {{"addProject.urlIsInvalid"|translate}} diff --git a/src/app/features/project/add-project/add-project.component.html b/src/app/features/project/add-project/add-project.component.html index d62e429d..668af6c5 100644 --- a/src/app/features/project/add-project/add-project.component.html +++ b/src/app/features/project/add-project/add-project.component.html @@ -421,7 +421,7 @@ {{"addProject.baseUrlIsRequired" | translate}} - {{"addProject.urlIsInvalid" | translate}} + {{"addProject.baseUrlIsInvalid" | translate}} diff --git a/src/assets/i18n/ara.json b/src/assets/i18n/ara.json index 99e21686..da87b072 100644 --- a/src/assets/i18n/ara.json +++ b/src/assets/i18n/ara.json @@ -110,7 +110,7 @@ "projectNameIsRequired": "اسم المشروع مطلوب", "projectTypeIsRequired": "نوع المشروع مطلوب", "baseUrlIsRequired": "مطلوب URL الأساسي", - "baseUrlIsInvalid": "عنوان URL الأساسي غير صالح", + "baseUrlIsInvalid": "عنوان URL يسمح فقط بتنسيق wss/ws", "specVersionIsRequired": "إصدار المواصفات مطلوب", "purposeIsRequired": "الغرض مطلوب", "testDataIsRequired": "بيانات الاختبار مطلوبة", @@ -140,7 +140,7 @@ "sbiHashIsRequired": "مطلوب تجزئة SBI", "websiteUrl": "موقع إلكتروني URL", "websiteUrlIsRequired": "مطلوب عنوان URL لموقع الويب", - "urlIsInvalid": "غير مسموح بعنوان URL غير صالح", + "urlIsInvalid": "عنوان URL يسمح فقط بتنسيق http/https", "sdkHash": "تجزئة SDK:", "sdkHashIsRequired": "مطلوب تجزئة SDK", "abisHash": "تجزئة ABIS:", @@ -2018,6 +2018,11 @@ "TOOLKIT_REQ_ERR_043": "يجب ألا يحتوي اسم الملف على امتدادات متعددة", "TOOLKIT_REQ_ERR_044": "غير قادر على تحميل ملف بدون امتداد", "TOOLKIT_REQ_ERR_045": "غير قادر على تحميل ملف البرمجيات الخبيثة", + "TOOLKIT_REQ_ERR_046": "لا يسمح بدخول الأحرف غير الصالحة ", + "TOOLKIT_REQ_ERR_047": "غير مسموح بدخول عنوان URL غير الصالح ", + "TOOLKIT_REQ_ERR_048": "اسم المشروع", + "TOOLKIT_REQ_ERR_049": "رابط الموقع", + "TOOLKIT_REQ_ERR_050": "عنوان URL لـ activeMQ", "TOOLKIT_REQ_ERR_500": "خطأ تقني", "TOOLKIT_DB_ERR_001": "لقد سبق لك إنشاء مشروع بالاسم", "TOOLKIT_DB_ERR_002": "لقد أضفت سابقًا بيانات اختبار القياسات الحيوية بالاسم", diff --git a/src/assets/i18n/eng.json b/src/assets/i18n/eng.json index 439472c8..30c000e5 100644 --- a/src/assets/i18n/eng.json +++ b/src/assets/i18n/eng.json @@ -110,7 +110,7 @@ "projectNameIsRequired": "Project Name is required", "projectTypeIsRequired": "Project Type is required", "baseUrlIsRequired": "Base URL is required", - "baseUrlIsInvalid": "Base URL is invalid", + "baseUrlIsInvalid": "URL is only allow wss/ws format", "specVersionIsRequired": "Spec Version is required", "purposeIsRequired": "Purpose is required", "testDataIsRequired": "Test data is required", @@ -140,7 +140,7 @@ "sbiHashIsRequired": "SBI Hash is required", "websiteUrl": "Website URL:", "websiteUrlIsRequired": "Website URL is required", - "urlIsInvalid": "Invalid URL is not allowed", + "urlIsInvalid": "URL is only allow http/https format", "sdkHash": "SDK Hash:", "sdkHashIsRequired": "SDK Hash is required", "abisHash": "ABIS Hash:", @@ -2018,6 +2018,11 @@ "TOOLKIT_REQ_ERR_043": "File name should not contain multiple extensions", "TOOLKIT_REQ_ERR_044": "Unable to upload a file without extension", "TOOLKIT_REQ_ERR_045": "Unable to upload malware file", + "TOOLKIT_REQ_ERR_046": "Invalid characters are not allowed in ", + "TOOLKIT_REQ_ERR_047": "Invalid URL is not allowed in ", + "TOOLKIT_REQ_ERR_048": "project name", + "TOOLKIT_REQ_ERR_049": "website URL", + "TOOLKIT_REQ_ERR_050": "active MQ URL", "TOOLKIT_DB_ERR_001": "You have previously created a project with the same name", "TOOLKIT_DB_ERR_002": "You have previously added biometric test data with the same name", "TOOLKIT_DB_ERR_003": "You have previously created a collection with the same name", diff --git a/src/assets/i18n/fra.json b/src/assets/i18n/fra.json index 57be0c63..789f0d3d 100644 --- a/src/assets/i18n/fra.json +++ b/src/assets/i18n/fra.json @@ -110,7 +110,7 @@ "projectNameIsRequired": "Le nom du projet est requis", "projectTypeIsRequired": "Le type de projet est requis", "baseUrlIsRequired": "L'URL de base est requise", - "baseUrlIsInvalid": "L'URL de base n'est pas valide", + "baseUrlIsInvalid": "L'URL autorise uniquement le format wss/ws", "specVersionIsRequired": "La version de spécification est requise", "purposeIsRequired": "Le but est requis", "testDataIsRequired": "des données de test sont requises", @@ -140,7 +140,7 @@ "sbiHashIsRequired": "Le hachage SBI est requis", "websiteUrl": "URL de site web:", "websiteUrlIsRequired": "L'URL du site Web est requise", - "urlIsInvalid": "Une URL invalide n'est pas autorisée", + "urlIsInvalid": "L'URL n'autorise que le format http/https", "sdkHash": "Hachage SDK:", "sdkHashIsRequired": "Le hachage SDK est requis", "abisHash": "Hachage ABIS:", @@ -2018,6 +2018,11 @@ "TOOLKIT_REQ_ERR_043": "Le nom du fichier ne doit pas contenir plusieurs extensions", "TOOLKIT_REQ_ERR_044": "Impossible de télécharger un fichier sans extension", "TOOLKIT_REQ_ERR_045": "Impossible de télécharger le fichier malveillant", + "TOOLKIT_REQ_ERR_046": "Les caractères invalides ne sont pas autorisés dans ", + "TOOLKIT_REQ_ERR_047": "Une URL invalide n'est pas autorisée dans ", + "TOOLKIT_REQ_ERR_048": "nom du projet", + "TOOLKIT_REQ_ERR_049": "URL de site web", + "TOOLKIT_REQ_ERR_050": "URL activeMQ", "TOOLKIT_REQ_ERR_500": "Erreur technique", "TOOLKIT_DB_ERR_001": "Vous avez précédemment créé un projet avec le nom", "TOOLKIT_DB_ERR_002": "Vous avez précédemment ajouté des données de test biométrique avec le nom",