Skip to content

Commit

Permalink
Mydevelop (#706)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
SwethaKrish4 authored Mar 26, 2024
1 parent ed35286 commit 9a3d170
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/app/app.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/app/core/components/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ <h2 mat-dialog-title class="mat-dialog-title">{{"projectDashboard.title"|transla
<span class="fieldContainer">
<mat-form-field appearance="legacy" class="fieldContainerBox">
<mat-label>{{"viewProject.websiteUrl"|translate}}</mat-label>
<input matInput formControlName="websiteUrl" #keyboardRef #input />
<input matInput formControlName="websiteUrl" #keyboardRef #input
pattern="^(http|https)://(.*)" maxlength="256"/>
<mat-error *ngIf="projectForm.controls['websiteUrl'].hasError('required')">
{{"viewProject.websiteUrlIsRequired"|translate}}
</mat-error>
<mat-error *ngIf="projectForm.controls['websiteUrl'].hasError('toBeAddedPattern')">
{{"dialogMessages.websiteUrlIsInvalid"|translate}}
<mat-error *ngIf="projectForm.controls['websiteUrl'].hasError('pattern')">
{{"addProject.urlIsInvalid"|translate}}
</mat-error>
</mat-form-field>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
{{"addProject.baseUrlIsRequired" | translate}}
</mat-error>
<mat-error *ngIf="projectForm.controls['abisUrl'].hasError('pattern')">
{{"addProject.urlIsInvalid" | translate}}
{{"addProject.baseUrlIsInvalid" | translate}}
</mat-error>
</mat-form-field>
</span>
Expand Down
9 changes: 7 additions & 2 deletions src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"projectNameIsRequired": "اسم المشروع مطلوب",
"projectTypeIsRequired": "نوع المشروع مطلوب",
"baseUrlIsRequired": "مطلوب URL الأساسي",
"baseUrlIsInvalid": "عنوان URL الأساسي غير صالح",
"baseUrlIsInvalid": "عنوان URL يسمح فقط بتنسيق wss/ws",
"specVersionIsRequired": "إصدار المواصفات مطلوب",
"purposeIsRequired": "الغرض مطلوب",
"testDataIsRequired": "بيانات الاختبار مطلوبة",
Expand Down Expand Up @@ -140,7 +140,7 @@
"sbiHashIsRequired": "مطلوب تجزئة SBI",
"websiteUrl": "موقع إلكتروني URL",
"websiteUrlIsRequired": "مطلوب عنوان URL لموقع الويب",
"urlIsInvalid": "غير مسموح بعنوان URL غير صالح",
"urlIsInvalid": "عنوان URL يسمح فقط بتنسيق http/https",
"sdkHash": "تجزئة SDK:",
"sdkHashIsRequired": "مطلوب تجزئة SDK",
"abisHash": "تجزئة ABIS:",
Expand Down Expand Up @@ -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": "لقد أضفت سابقًا بيانات اختبار القياسات الحيوية بالاسم",
Expand Down
9 changes: 7 additions & 2 deletions src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:",
Expand Down Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 9a3d170

Please sign in to comment.