diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index cdaa60f0..bfb08604 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -830,10 +830,40 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { this.selectedSticker = null; } } else { - this.logger.error(res); + this.isTranslationProcess = false; + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: '', + message: this.translateService.instant( + 'chat.error.translateServerError' + ) + } + }); + this.logger.error('res', res); } }), - catchError(error => of(this.logger.error(error))) + catchError(error => { + this.isTranslationProcess = false; + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: '', + message: this.translateService.instant( + 'chat.error.translateServerError' + ) + } + }); + return of(this.logger.error('error', error)); + }) ) .subscribe(() => { this.isTranslationProcess = false; diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index 589ac713..57c687db 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -266,7 +266,8 @@ "label": "Chat erros", "inputChatMessage": "Please enter a chat message", "maxLengthOfMassText": "If you include a sticker, you can't send more than {{maxLength}} characters.", - "maxCountOfRoomMemberWith": "you can't open room with more than {{maxCount}} peoples." + "maxCountOfRoomMemberWith": "you can't open room with more than {{maxCount}} peoples.", + "translateServerError": "Failed to translate" }, "noMoreEvents": "There is no more messages", "detailView": "Detail View", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 73efa1c9..7eeab21d 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -266,7 +266,8 @@ "label": "대화 에러", "inputChatMessage": "대화 내용을 입력해 주세요.", "maxLengthOfMassText": "스티커를 포함할 경우 {{maxLength}}자 이상 보낼 수 없습니다.", - "maxCountOfRoomMemberWith": "{{maxCount}}명 이상 대화할 수 없습니다." + "maxCountOfRoomMemberWith": "{{maxCount}}명 이상 대화할 수 없습니다.", + "translateServerError": "번역하지 못했습니다." }, "noMoreEvents": "더이상 검색할 내용이 없습니다.", "detailView": "상세 보기",