internationalization is processing
This commit is contained in:
parent
5b308eaa6e
commit
de8488912c
@ -15,6 +15,7 @@ import { take, map, finalize, tap } from 'rxjs/operators';
|
|||||||
import { SnackBarService } from '@ucap-webmessenger/ui';
|
import { SnackBarService } from '@ucap-webmessenger/ui';
|
||||||
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
export interface FileViewerDialogData {
|
export interface FileViewerDialogData {
|
||||||
fileInfo: FileEventJson;
|
fileInfo: FileEventJson;
|
||||||
@ -47,6 +48,7 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
|||||||
>,
|
>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: FileViewerDialogData,
|
@Inject(MAT_DIALOG_DATA) public data: FileViewerDialogData,
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
|
private translateService: TranslateService,
|
||||||
private snackBarService: SnackBarService,
|
private snackBarService: SnackBarService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
@ -96,20 +98,33 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
|||||||
.saveFile(buffer, this.fileInfo.fileName, mimeType)
|
.saveFile(buffer, this.fileInfo.fileName, mimeType)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
if (!!result) {
|
if (!!result) {
|
||||||
this.snackBarService.open(
|
this.translateService
|
||||||
`파일이 경로[${result}]에 저장되었습니다.`,
|
.get('common.file.savedToPath', {
|
||||||
'',
|
v: result
|
||||||
{
|
})
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe(v => {
|
||||||
|
this.snackBarService.open(v, '', {
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
verticalPosition: 'bottom'
|
verticalPosition: 'bottom'
|
||||||
}
|
});
|
||||||
);
|
});
|
||||||
} else {
|
} else {
|
||||||
this.snackBarService.open('파일 저장에 실패하였습니다.');
|
this.translateService
|
||||||
|
.get('common.file.failToSave')
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe(v => {
|
||||||
|
this.snackBarService.open(v);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(reason => {
|
.catch(reason => {
|
||||||
this.snackBarService.open('파일 저장에 실패하였습니다.');
|
this.translateService
|
||||||
|
.get('common.file.failToSave')
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe(v => {
|
||||||
|
this.snackBarService.open(v);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(reason => {
|
.catch(reason => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="current-head">
|
<div class="current-head">
|
||||||
<h3>대화</h3>
|
<h3>{{ 'chat.label' | translate }}</h3>
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<!-- <button mat-icon-button>
|
<!-- <button mat-icon-button>
|
||||||
<mat-icon>timer</mat-icon>
|
<mat-icon>timer</mat-icon>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
#inputSearch
|
#inputSearch
|
||||||
type="text"
|
type="text"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
placeholder="대화방 이름 검색"
|
placeholder="{{ 'chat.searchRoomByName' | translate }}"
|
||||||
value=""
|
value=""
|
||||||
formControlName="searchInput"
|
formControlName="searchInput"
|
||||||
[matAutocomplete]="auto"
|
[matAutocomplete]="auto"
|
||||||
@ -113,16 +113,21 @@
|
|||||||
>
|
>
|
||||||
<ng-template matMenuContent let-roomInfo="roomInfo">
|
<ng-template matMenuContent let-roomInfo="roomInfo">
|
||||||
<button mat-menu-item (click)="onClickContextMenu('SELECT_ROOM', roomInfo)">
|
<button mat-menu-item (click)="onClickContextMenu('SELECT_ROOM', roomInfo)">
|
||||||
대화방 열기
|
{{ 'chat.openRoom' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
mat-menu-item
|
mat-menu-item
|
||||||
(click)="onClickContextMenu('TOGGLE_ALARM', roomInfo)"
|
(click)="onClickContextMenu('TOGGLE_ALARM', roomInfo)"
|
||||||
>
|
>
|
||||||
대화방 알람 {{ roomInfo.receiveAlarm ? '끄기' : '켜기' }}
|
{{
|
||||||
|
(roomInfo.receiveAlarm
|
||||||
|
? 'chat.turnOffRoomAlert'
|
||||||
|
: 'chat.turnOnRoomAlert'
|
||||||
|
) | translate
|
||||||
|
}}
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="onClickContextMenu('EXIT_ROOM', roomInfo)">
|
<button mat-menu-item (click)="onClickContextMenu('EXIT_ROOM', roomInfo)">
|
||||||
대화방 나가기
|
{{ 'chat.leaveFromRoom' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as ChatStore from '@app/store/messenger/chat';
|
import * as ChatStore from '@app/store/messenger/chat';
|
||||||
import * as RoomStore from '@app/store/messenger/room';
|
import * as RoomStore from '@app/store/messenger/room';
|
||||||
import { tap, debounceTime, delay } from 'rxjs/operators';
|
import { tap, debounceTime, delay, take } from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
RoomUserDetailData,
|
RoomUserDetailData,
|
||||||
RoomUserData
|
RoomUserData
|
||||||
@ -38,6 +38,7 @@ import { MatMenuTrigger } from '@angular/material';
|
|||||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
||||||
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-chat-left-sidenav-chat',
|
selector: 'app-layout-chat-left-sidenav-chat',
|
||||||
@ -82,7 +83,8 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private logger: NGXLogger,
|
private logger: NGXLogger,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private sessionStorageService: SessionStorageService
|
private sessionStorageService: SessionStorageService,
|
||||||
|
private translateService: TranslateService
|
||||||
) {
|
) {
|
||||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||||
KEY_VER_INFO
|
KEY_VER_INFO
|
||||||
@ -239,7 +241,7 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
this.chatContextMenuTrigger.openMenu();
|
this.chatContextMenuTrigger.openMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickContextMenu(type: string, roomInfo: RoomInfo) {
|
onClickContextMenu(type: string, roomInfo: RoomInfo) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'SELECT_ROOM':
|
case 'SELECT_ROOM':
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
@ -251,20 +253,27 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
break;
|
break;
|
||||||
case 'EXIT_ROOM':
|
case 'EXIT_ROOM':
|
||||||
{
|
{
|
||||||
|
this.translateService
|
||||||
|
.get(['chat.leaveFromRoom', 'chat.confirmLeaveFromRoom'])
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe(async values => {
|
||||||
const result = await this.dialogService.open<
|
const result = await this.dialogService.open<
|
||||||
ConfirmDialogComponent,
|
ConfirmDialogComponent,
|
||||||
ConfirmDialogData,
|
ConfirmDialogData,
|
||||||
ConfirmDialogResult
|
ConfirmDialogResult
|
||||||
>(ConfirmDialogComponent, {
|
>(ConfirmDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
title: 'Exit Room',
|
title: values['chat.leaveFromRoom'],
|
||||||
html: `대화방을 나가시겠습니까?<br/>나가기를 하면 대화내용 및 대화방 정보가 삭제됩니다.`
|
html: values['chat.confirmLeaveFromRoom']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
this.store.dispatch(RoomStore.exit({ roomSeq: roomInfo.roomSeq }));
|
this.store.dispatch(
|
||||||
|
RoomStore.exit({ roomSeq: roomInfo.roomSeq })
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -53,8 +53,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="result-num">
|
<div class="result-num">
|
||||||
검색결과<span class="text-accent-color"
|
{{ 'common.searchResult' | translate
|
||||||
>({{ searchUserInfos.length }}명)</span
|
}}<span class="text-accent-color"
|
||||||
|
>({{ searchUserInfos.length
|
||||||
|
}}{{ 'common.howManyPersons' | translate }})</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<ucap-profile-user-list-item
|
<ucap-profile-user-list-item
|
||||||
@ -93,7 +95,7 @@
|
|||||||
<line x1="20" y1="8" x2="20" y2="14"></line>
|
<line x1="20" y1="8" x2="20" y2="14"></line>
|
||||||
<line x1="23" y1="11" x2="17" y2="11"></line>
|
<line x1="23" y1="11" x2="17" y2="11"></line>
|
||||||
</svg>
|
</svg>
|
||||||
<span>새 그룹 추가</span>
|
<span>{{ 'group.addNew' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="onClickGroupMenu('GROUP_EXPAND_MORE')">
|
<button mat-menu-item (click)="onClickGroupMenu('GROUP_EXPAND_MORE')">
|
||||||
<!--<mat-icon>expand_more</mat-icon>-->
|
<!--<mat-icon>expand_more</mat-icon>-->
|
||||||
@ -110,7 +112,7 @@
|
|||||||
>
|
>
|
||||||
<path d="M6 9l6 6 6-6" />
|
<path d="M6 9l6 6 6-6" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>그룹 전체 열기</span>
|
<span>{{ 'group.expandMore' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="onClickGroupMenu('GROUP_EXPAND_LESS')">
|
<button mat-menu-item (click)="onClickGroupMenu('GROUP_EXPAND_LESS')">
|
||||||
<!--<mat-icon>expand_less</mat-icon>-->
|
<!--<mat-icon>expand_less</mat-icon>-->
|
||||||
@ -127,7 +129,7 @@
|
|||||||
>
|
>
|
||||||
<path d="M18 15l-6-6-6 6" />
|
<path d="M18 15l-6-6-6 6" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>그룹 전체 닫기</span>
|
<span>{{ 'group.expandLess' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button mat-menu-item (click)="onClickGroupMenu('GROUP_SAVE')">
|
<!-- <button mat-menu-item (click)="onClickGroupMenu('GROUP_SAVE')">
|
||||||
<mat-icon>save</mat-icon>
|
<mat-icon>save</mat-icon>
|
||||||
@ -161,7 +163,7 @@
|
|||||||
mat-menu-item
|
mat-menu-item
|
||||||
(click)="onClickProfileContextMenu('VIEW_PROFILE', userInfo, group)"
|
(click)="onClickProfileContextMenu('VIEW_PROFILE', userInfo, group)"
|
||||||
>
|
>
|
||||||
프로필 보기
|
{{ 'profile.open' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
mat-menu-item
|
mat-menu-item
|
||||||
|
@ -110,9 +110,10 @@
|
|||||||
|
|
||||||
<div class="result-num">
|
<div class="result-num">
|
||||||
{{ 'common.searchResult' | translate }}
|
{{ 'common.searchResult' | translate }}
|
||||||
<span class="text-accent-color"
|
<span class="text-accent-color">
|
||||||
>({{ searchUserInfos.length }}명)</span
|
({{ searchUserInfos.length
|
||||||
>
|
}}{{ 'common.howManyPersons' | translate }})
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<ucap-profile-user-list-item
|
<ucap-profile-user-list-item
|
||||||
*ngFor="let userInfo of searchUserInfos"
|
*ngFor="let userInfo of searchUserInfos"
|
||||||
@ -194,7 +195,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span *ngIf="isShowSelectedUserList"
|
<span *ngIf="isShowSelectedUserList"
|
||||||
>{{ selectedUserList.length }}
|
>{{ selectedUserList.length }}
|
||||||
{{ 'common.howPersons' | translate }}</span
|
{{ 'common.howManyPersons' | translate }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
@ -4,7 +4,17 @@
|
|||||||
"searchWord": "Search word",
|
"searchWord": "Search word",
|
||||||
"searchResult": "Search result",
|
"searchResult": "Search result",
|
||||||
"useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}",
|
"useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}",
|
||||||
"howPersons": "person(s)",
|
"howManyPersons": "person(s)",
|
||||||
|
"file": {
|
||||||
|
"saved": "The file has been saved.",
|
||||||
|
"savedToPath": "The file has been saved to path[{{v}}].",
|
||||||
|
"failToSave": "File save failed."
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"yes": "Yes",
|
||||||
|
"no": "No",
|
||||||
|
"confirm": "Confirm"
|
||||||
|
},
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"Africa/Abidjan": "Africa/Abidjan",
|
"Africa/Abidjan": "Africa/Abidjan",
|
||||||
"Africa/Accra": "Africa/Accra",
|
"Africa/Accra": "Africa/Accra",
|
||||||
@ -601,6 +611,9 @@
|
|||||||
"Zulu": "Zulu"
|
"Zulu": "Zulu"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"profile": {
|
||||||
|
"open": "Open profile"
|
||||||
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"label": "Group",
|
"label": "Group",
|
||||||
"addNew": "Add new group",
|
"addNew": "Add new group",
|
||||||
@ -612,9 +625,16 @@
|
|||||||
"nameDefault": "Default"
|
"nameDefault": "Default"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
|
"label": "Chat",
|
||||||
"room": "Chat room",
|
"room": "Chat room",
|
||||||
|
"searchRoomByName": "Search by room name",
|
||||||
"newTimerChat": "New Timer Chat",
|
"newTimerChat": "New Timer Chat",
|
||||||
"newChat": "New Chat"
|
"newChat": "New Chat",
|
||||||
|
"openRoom": "Open room",
|
||||||
|
"turnOnRoomAlert": "turn on room alert",
|
||||||
|
"turnOffRoomAlert": "turn off room alert",
|
||||||
|
"leaveFromRoom": "leave room",
|
||||||
|
"confirmLeaveFromRoom": "Are you sure you want to leave the chat room?<br/>Leave your chat history and chat room information."
|
||||||
},
|
},
|
||||||
"organization": {
|
"organization": {
|
||||||
"chart": "Organization chart"
|
"chart": "Organization chart"
|
||||||
|
@ -4,7 +4,17 @@
|
|||||||
"searchWord": "검색어",
|
"searchWord": "검색어",
|
||||||
"searchResult": "검색 결과",
|
"searchResult": "검색 결과",
|
||||||
"useOnlyForSpecialCharacter": "특수문자는 {{v}}만 사용할 수 있습니다.",
|
"useOnlyForSpecialCharacter": "특수문자는 {{v}}만 사용할 수 있습니다.",
|
||||||
"howPersons": "명",
|
"howManyPersons": "명",
|
||||||
|
"file": {
|
||||||
|
"saved": "파일이 저장되었습니다.",
|
||||||
|
"savedToPath": "파일이 경로[{{v}}]에 저장되었습니다.",
|
||||||
|
"failToSave": "파일 저장에 실패하였습니다."
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"yes": "네",
|
||||||
|
"no": "아니오",
|
||||||
|
"confirm": "확인"
|
||||||
|
},
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"Africa/Abidjan": "아프리카/아비 장",
|
"Africa/Abidjan": "아프리카/아비 장",
|
||||||
"Africa/Accra": "아프리카/아크라",
|
"Africa/Accra": "아프리카/아크라",
|
||||||
@ -601,6 +611,9 @@
|
|||||||
"Zulu": "줄루"
|
"Zulu": "줄루"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"profile": {
|
||||||
|
"open": "프로필 보기"
|
||||||
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"label": "그룹",
|
"label": "그룹",
|
||||||
"addNew": "새 그룹 추가",
|
"addNew": "새 그룹 추가",
|
||||||
@ -612,9 +625,16 @@
|
|||||||
"nameDefault": "기본"
|
"nameDefault": "기본"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
|
"label": "대화",
|
||||||
"room": "대화방",
|
"room": "대화방",
|
||||||
|
"searchRoomByName": "대화방 이름 검색",
|
||||||
"newTimerChat": "새로운 타이머 대화",
|
"newTimerChat": "새로운 타이머 대화",
|
||||||
"newChat": "새로운 대화"
|
"newChat": "새로운 대화",
|
||||||
|
"openRoom": "대화방 열기",
|
||||||
|
"turnOnRoomAlert": "대화방 알람 켜기",
|
||||||
|
"turnOffRoomAlert": "대화방 알람 끄기",
|
||||||
|
"leaveFromRoom": "대화방 나가기",
|
||||||
|
"confirmLeaveFromRoom": "대화방을 나가시겠습니까?<br/>나가기를 하면 대화내용 및 대화방 정보가 삭제됩니다."
|
||||||
},
|
},
|
||||||
"organization": {
|
"organization": {
|
||||||
"chart": "조직도"
|
"chart": "조직도"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user