Skip to content

Commit

Permalink
refactor(mosip#625): [Adityan] refactor error message name
Browse files Browse the repository at this point in the history
  • Loading branch information
Adityan Kannan authored and Adityan Kannan committed Mar 14, 2023
1 parent 5121dc3 commit 3e5ac1e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"title": "فشل حفظ {{vcLabel}}",
"message": "شئ ما ذهب خطأ بينما إنقاذ {{vcLabel}} ل ال محل."
},
"sqlFullError": {
"diskFullError": {
"title": "فشل حفظ {{vcLabel}}",
"message": "لا يمكن استلام المزيد من {{vcLabelPlural}} أو حفظه لأن بيانات التطبيق ممتلئة."
}
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"title": "Failed to save the {{vcLabelSingular}}",
"message": "Something went wrong while saving {{vcLabelSingular}} to the store."
},
"sqlFullError": {
"diskFullError": {
"title": "Failed to save the {{vcLabelSingular}}",
"message": "No more {{vcLabelPlural}} can be received or saved as App Data is full."
}
Expand Down
2 changes: 1 addition & 1 deletion locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"title": "Nabigong i-save ang {{vcLabelSingular}}",
"message": "Nagkaproblema habang nagse-save ng {{vcLabelSingular}} sa tindahan."
},
"sqlFullError": {
"diskFullError": {
"title": "Nabigong i-save ang {{vcLabelSingular}}",
"message": "Wala nang mga {{vcLabelSingular}} na matatanggap o mai-save dahil puno na ang Data ng App."
}
Expand Down
2 changes: 1 addition & 1 deletion locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"title": "{{vcLabelSingular}} सहेजने में विफल",
"message": "{{vcLabelSingular}} को स्टोर में सेव करते समय कोई गड़बड़ी हुई."
},
"sqlFullError": {
"diskFullError": {
"title": "{{vcLabelSingular}} सहेजने में विफल",
"message": "ऐप डेटा पूर्ण होने के कारण कोई और {{vcLabelPlural}} प्राप्त या सहेजा नहीं जा सकता है।"
}
Expand Down
2 changes: 1 addition & 1 deletion locales/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"title": "{{vcLabelSingular}} ಉಳಿಸಲು ವಿಫಲವಾಗಿದೆ",
"message": "ಸ್ಟೋರ್‌ನಲ್ಲಿ {{vcLabelSingular}} ಉಳಿಸುವಾಗ ಏನೋ ತಪ್ಪಾಗಿದೆ."
},
"sqlFullError": {
"diskFullError": {
"title": "{{vcLabelSingular}} ಉಳಿಸಲು ವಿಫಲವಾಗಿದೆ",
"message": "ಅಪ್ಲಿಕೇಶನ್ ಡೇಟಾ ತುಂಬಿರುವುದರಿಂದ ಹೆಚ್ಚಿನ {{vcLabelPlural}} ಸ್ವೀಕರಿಸಲು ಅಥವಾ ಉಳಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ."
}
Expand Down
2 changes: 1 addition & 1 deletion locales/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"title": "{{vcLabelSingular}}ஐ சேமிப்பதில் தோல்வி",
"message": "கடையில் {{vcLabelSingular}}ஐ சேமிக்கும் போது ஏதோ தவறு ஏற்பட்டது."
},
"sqlFullError": {
"diskFullError": {
"title": "{{vcLabelSingular}}ஐ சேமிக்க முடியவில்லை",
"message": "ஆப்ஸ் டேட்டா நிரம்பியதால் {{vcLabelPlural}} பெறவோ சேமிக்கவோ முடியாது."
}
Expand Down
2 changes: 1 addition & 1 deletion screens/Request/ReceiveVcScreen.strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"title": "Failed to save {{vcLabelSingular}}",
"message": "Something went wrong while saving {{vcLabelSingular}} to the store."
},
"sqlFullError": {
"diskFullError": {
"title": "Failed to save {{vcLabelPlural}}",
"message": "No more {{vcLabelPlural}} can be received or saved as App Data is full."
}
Expand Down
6 changes: 3 additions & 3 deletions screens/Request/ReceiveVcScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const ReceiveVcScreen: React.FC = () => {
controller.isAccepting
);
let storeErrorTranslationPath = 'errors.savingFailed';
const isSQLFullError =
const isDiskFullError =
controller.storeError?.message?.match('SQLITE_FULL') != null;

if (isSQLFullError) {
storeErrorTranslationPath = 'errors.sqlFullError';
if (isDiskFullError) {
storeErrorTranslationPath = 'errors.diskFullError';
}

return (
Expand Down

0 comments on commit 3e5ac1e

Please sign in to comment.