diff --git a/package-lock.json b/package-lock.json index 3b643f54..32478997 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2406,6 +2406,15 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, + "@types/moment-timezone": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.12.tgz", + "integrity": "sha512-hnHH2+Efg2vExr/dSz+IX860nSiyk9Sk4pJF2EmS11lRpMcNXeB4KBW5xcgw2QPsb9amTXdsVNEe5IoJXiT0uw==", + "dev": true, + "requires": { + "moment": ">=2.14.0" + } + }, "@types/node": { "version": "10.14.22", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", @@ -2792,7 +2801,6 @@ "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -4607,7 +4615,6 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/conf/-/conf-6.2.0.tgz", "integrity": "sha512-fvl40R6YemHrFsNiyP7TD0tzOe3pQD2dfT2s20WvCaq57A1oV+RImbhn2Y4sQGDz1lB0wNSb7dPcPIvQB69YNA==", - "dev": true, "requires": { "ajv": "^6.10.2", "debounce-fn": "^3.0.1", @@ -4625,7 +4632,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", - "dev": true, "requires": { "is-obj": "^2.0.0" } @@ -4633,14 +4639,12 @@ "is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, "make-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "dev": true, "requires": { "semver": "^6.0.0" } @@ -4649,7 +4653,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.1.tgz", "integrity": "sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw==", - "dev": true, "requires": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", @@ -5187,7 +5190,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-3.0.1.tgz", "integrity": "sha512-aBoJh5AhpqlRoHZjHmOzZlRx+wz2xVwGL9rjs+Kj0EWUrL4/h4K7OD176thl2Tdoqui/AaA4xhHrNArGLAaI3Q==", - "dev": true, "requires": { "mimic-fn": "^2.1.0" } @@ -5923,7 +5925,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/electron-store/-/electron-store-5.1.0.tgz", "integrity": "sha512-uhAF/4+zDb+y0hWqlBirEPEAR4ciCZDp4fRWGFNV62bG+ArdQPpXk7jS0MEVj3CfcG5V7hx7Dpq5oD+1j6GD8Q==", - "dev": true, "requires": { "conf": "^6.2.0", "type-fest": "^0.7.1" @@ -5932,8 +5933,7 @@ "type-fest": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==" } } }, @@ -6168,8 +6168,7 @@ "env-paths": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", - "dev": true + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" }, "err-code": { "version": "1.1.2", @@ -6663,14 +6662,12 @@ "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fastparse": { "version": "1.1.2", @@ -6871,7 +6868,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -7721,8 +7717,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indexof": { "version": "0.0.1", @@ -8149,8 +8144,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-windows": { "version": "1.0.2", @@ -8541,14 +8535,12 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-schema-typed": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.2.tgz", - "integrity": "sha512-40FRIcBSz4y0Ego3gMpbkhtIgebpxKRgW/7i1FfDNL4/xEPQKBM12tKSiCZFNQvad5K4IS3I5Sc8cxza/KSwog==", - "dev": true + "integrity": "sha512-40FRIcBSz4y0Ego3gMpbkhtIgebpxKRgW/7i1FfDNL4/xEPQKBM12tKSiCZFNQvad5K4IS3I5Sc8cxza/KSwog==" }, "json-stable-stringify": { "version": "1.0.1", @@ -9589,7 +9581,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -10015,8 +10006,7 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "mimic-response": { "version": "1.0.1", @@ -10142,6 +10132,15 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", "dev": true }, + "moment-timezone": { + "version": "0.5.27", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.27.tgz", + "integrity": "sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw==", + "dev": true, + "requires": { + "moment": ">= 2.9.0" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -10833,7 +10832,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, "requires": { "mimic-fn": "^2.1.0" } @@ -10950,7 +10948,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", - "dev": true, "requires": { "p-try": "^2.0.0" } @@ -10959,7 +10956,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -10982,8 +10978,7 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "package-json": { "version": "6.5.0", @@ -11232,8 +11227,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -11358,7 +11352,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, "requires": { "find-up": "^3.0.0" } @@ -11826,8 +11819,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "q": { "version": "1.4.1", @@ -12951,8 +12943,7 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "slash": { "version": "1.0.0", @@ -14253,7 +14244,6 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, "requires": { "is-typedarray": "^1.0.0" } @@ -14465,7 +14455,6 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, "requires": { "punycode": "^2.1.0" } diff --git a/package.json b/package.json index 15b52435..8f3279a8 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "@types/filesize": "^4.1.0", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", + "@types/moment-timezone": "^0.5.12", "@types/node": "^10.14.22", "@types/semver": "^6.0.2", "@types/webpack": "^4.39.5", @@ -118,6 +119,7 @@ "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "moment": "^2.24.0", + "moment-timezone": "^0.5.27", "ng-packagr": "^5.4.0", "ngrx-store-freeze": "^0.2.4", "ngx-logger": "^4.0.5", diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html index 2587ae2a..9b9b336a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html @@ -79,7 +79,7 @@
  • date : - {{ selectedFile.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} + {{ selectedFile.info.sendDate | ucapDate: 'YYYY.MM.DD' }}
  • diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html index 0e46c4cc..240c4b2a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html @@ -50,13 +50,12 @@
  • date : - {{ selectedFile.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} + {{ selectedFile.info.sendDate | ucapDate: 'YYYY.MM.DD' }} ~ {{ selectedFile.info.sendDate - | dateDistanceToDay: loginRes.fileRetentionPeriod - | dateToStringFormat: 'YYYY.MM.DD' + | ucapDate: 'YYYY.MM.DD':fileRetentionPeriodOptions }}
  • @@ -185,13 +184,12 @@
    - {{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }} + {{ element.info.sendDate | ucapDate: 'YYYY.MM.DD' }} ~ {{ element.info.sendDate - | dateDistanceToDay: loginRes.fileRetentionPeriod - | dateToStringFormat: 'YYYY.MM.DD' + | ucapDate: 'YYYY.MM.DD':fileRetentionPeriodOptions }}
    @@ -209,7 +207,7 @@ sendDate - + {{ element.info.size | ucapBytes }} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts index 2d8eadbb..d5b2aa69 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts @@ -23,7 +23,8 @@ import { DialogService, ConfirmDialogComponent, ConfirmDialogResult, - ConfirmDialogData + ConfirmDialogData, + DateOptions } from '@ucap-webmessenger/ui'; import { CommonApiService } from '@ucap-webmessenger/api-common'; import { EventType } from '@ucap-webmessenger/protocol-event'; @@ -397,4 +398,10 @@ export class FileBoxComponent implements OnInit, OnDestroy { this.onSelectedIndexChange(this.currentTabIndex); } } + + get fileRetentionPeriodOptions(): DateOptions { + return { + manipulate: { amount: this.loginRes.fileRetentionPeriod, unit: 'days' } + }; + } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html index c073949b..21e7e0d8 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.html @@ -56,12 +56,11 @@ >발송예정시간 {{ - messageInfo.regDate - | dateToStringFormat: 'YYYY.MM.dd (KS) a/p HH:mm' + messageInfo.regDate | ucapDate: 'YYYY.MM.DD (ddd) a hh:mm' }} {{ messageInfo.reservationTime - | dateToStringFormat: 'YYYY.MM.dd (KS) a/p HH:mm' + | ucapDate: 'YYYY.MM.DD (ddd) a hh:mm' }} @@ -130,7 +129,7 @@ {{ user.userName }} {{ - user.readDate | dateToStringFormat: 'YYYY-MM-DD HH:mm:ss' + user.readDate | ucapDate: 'YYYY-MM-DD HH:mm:ss' }} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.ts index d23bfb16..a640a1bc 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.ts @@ -10,7 +10,8 @@ import { Store } from '@ngrx/store'; import { DialogService, - TranslateService as UCapTranslateService + TranslateService as UCapTranslateService, + DateService as UCapDateService } from '@ucap-webmessenger/ui'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; @@ -50,6 +51,7 @@ export class MessengerSettingsDialogComponent implements OnInit { private sessionStorageService: SessionStorageService, private localStorageService: LocalStorageService, private ucapTranslateService: UCapTranslateService, + private ucapDateService: UCapDateService, @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, private translateService: TranslateService, private store: Store, @@ -87,6 +89,11 @@ export class MessengerSettingsDialogComponent implements OnInit { ) { this.ucapTranslateService.use(setting.hrInfoLocale); } + + if (this.appUserInfo.settings.general.timezone !== setting.timezone) { + this.ucapDateService.use(setting.timezone); + } + if (this.appUserInfo.settings.general.autoLaunch !== setting.autoLaunch) { this.nativeService.changeAutoLaunch(setting.autoLaunch); } diff --git a/projects/ucap-webmessenger-app/src/app/services/app.service.ts b/projects/ucap-webmessenger-app/src/app/services/app.service.ts index 1164f4ca..6983d023 100644 --- a/projects/ucap-webmessenger-app/src/app/services/app.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/app.service.ts @@ -7,6 +7,7 @@ import { AppNotificationService } from './notification.service'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { AppNativeService } from './native.service'; import { TranslateService as UCapTranslateService } from '@ucap-webmessenger/ui'; +import { DateService as UCapDateService } from '@ucap-webmessenger/ui'; import { TranslateService } from '@ngx-translate/core'; @Injectable() @@ -18,6 +19,7 @@ export class AppService { private appNativeService: AppNativeService, private translateService: TranslateService, private ucapTranslateService: UCapTranslateService, + private ucapDateService: UCapDateService, @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService ) { this.translateService.setDefaultLang('ko'); @@ -25,6 +27,10 @@ export class AppService { this.ucapTranslateService.setDefaultLang('ko'); this.ucapTranslateService.use('ko'); + + this.ucapDateService.setDefaultTimezone('Asia/Seoul'); + this.ucapDateService.use('Asia/Seoul'); + this.ucapDateService.setLocale(this.translateService.currentLang); } public postInit(): Promise { diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/init/effects.ts b/projects/ucap-webmessenger-app/src/app/store/setting/init/effects.ts index 99b43a10..ec81eb8d 100644 --- a/projects/ucap-webmessenger-app/src/app/store/setting/init/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/setting/init/effects.ts @@ -1,15 +1,17 @@ import { Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; -import { TranslateService as UCapTranslateService } from '@ucap-webmessenger/ui'; import { map, tap } from 'rxjs/operators'; +import { TranslateService } from '@ngx-translate/core'; + +import { TranslateService as UCapTranslateService } from '@ucap-webmessenger/ui'; +import { DateService as UCapDateService } from '@ucap-webmessenger/ui'; import * as AuthenticationStore from '@app/store/account/authentication'; import { LocalStorageService } from '@ucap-webmessenger/web-storage'; import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type'; import { environment } from '../../../../environments/environment'; -import { TranslateService } from '@ngx-translate/core'; @Injectable() export class Effects { @@ -29,6 +31,7 @@ export class Effects { this.ucapTranslateService.use( appUserInfo.settings.general.hrInfoLocale ); + this.ucapDateService.use(appUserInfo.settings.general.timezone); }) ), { dispatch: false } @@ -37,6 +40,7 @@ export class Effects { private actions$: Actions, private translateService: TranslateService, private ucapTranslateService: UCapTranslateService, + private ucapDateService: UCapDateService, private localStorageService: LocalStorageService ) {} } diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index 6ae392b1..816a749f 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -2,7 +2,602 @@ "common": { "search": "Search", "searchWord": "Search word", - "useOnlyForSpecialCharacter": "Can only use Special characters: {{0}}" + "useOnlyForSpecialCharacter": "Can only use Special characters: {{0}}", + "timezone": { + "Africa/Abidjan": "Africa/Abidjan", + "Africa/Accra": "Africa/Accra", + "Africa/Addis_Ababa": "Africa/Addis_Ababa", + "Africa/Algiers": "Africa/Algiers", + "Africa/Asmara": "Africa/Asmara", + "Africa/Asmera": "Africa/Asmera", + "Africa/Bamako": "Africa/Bamako", + "Africa/Bangui": "Africa/Bangui", + "Africa/Banjul": "Africa/Banjul", + "Africa/Bissau": "Africa/Bissau", + "Africa/Blantyre": "Africa/Blantyre", + "Africa/Brazzaville": "Africa/Brazzaville", + "Africa/Bujumbura": "Africa/Bujumbura", + "Africa/Cairo": "Africa/Cairo", + "Africa/Casablanca": "Africa/Casablanca", + "Africa/Ceuta": "Africa/Ceuta", + "Africa/Conakry": "Africa/Conakry", + "Africa/Dakar": "Africa/Dakar", + "Africa/Dar_es_Salaam": "Africa/Dar_es_Salaam", + "Africa/Djibouti": "Africa/Djibouti", + "Africa/Douala": "Africa/Douala", + "Africa/El_Aaiun": "Africa/El_Aaiun", + "Africa/Freetown": "Africa/Freetown", + "Africa/Gaborone": "Africa/Gaborone", + "Africa/Harare": "Africa/Harare", + "Africa/Johannesburg": "Africa/Johannesburg", + "Africa/Juba": "Africa/Juba", + "Africa/Kampala": "Africa/Kampala", + "Africa/Khartoum": "Africa/Khartoum", + "Africa/Kigali": "Africa/Kigali", + "Africa/Kinshasa": "Africa/Kinshasa", + "Africa/Lagos": "Africa/Lagos", + "Africa/Libreville": "Africa/Libreville", + "Africa/Lome": "Africa/Lome", + "Africa/Luanda": "Africa/Luanda", + "Africa/Lubumbashi": "Africa/Lubumbashi", + "Africa/Lusaka": "Africa/Lusaka", + "Africa/Malabo": "Africa/Malabo", + "Africa/Maputo": "Africa/Maputo", + "Africa/Maseru": "Africa/Maseru", + "Africa/Mbabane": "Africa/Mbabane", + "Africa/Mogadishu": "Africa/Mogadishu", + "Africa/Monrovia": "Africa/Monrovia", + "Africa/Nairobi": "Africa/Nairobi", + "Africa/Ndjamena": "Africa/Ndjamena", + "Africa/Niamey": "Africa/Niamey", + "Africa/Nouakchott": "Africa/Nouakchott", + "Africa/Ouagadougou": "Africa/Ouagadougou", + "Africa/Porto-Novo": "Africa/Porto-Novo", + "Africa/Sao_Tome": "Africa/Sao_Tome", + "Africa/Timbuktu": "Africa/Timbuktu", + "Africa/Tripoli": "Africa/Tripoli", + "Africa/Tunis": "Africa/Tunis", + "Africa/Windhoek": "Africa/Windhoek", + "America/Adak": "America/Adak", + "America/Anchorage": "America/Anchorage", + "America/Anguilla": "America/Anguilla", + "America/Antigua": "America/Antigua", + "America/Araguaina": "America/Araguaina", + "America/Argentina/Buenos_Aires": "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca": "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia": "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba": "America/Argentina/Cordoba", + "America/Argentina/Jujuy": "America/Argentina/Jujuy", + "America/Argentina/La_Rioja": "America/Argentina/La_Rioja", + "America/Argentina/Mendoza": "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos": "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta": "America/Argentina/Salta", + "America/Argentina/San_Juan": "America/Argentina/San_Juan", + "America/Argentina/San_Luis": "America/Argentina/San_Luis", + "America/Argentina/Tucuman": "America/Argentina/Tucuman", + "America/Argentina/Ushuaia": "America/Argentina/Ushuaia", + "America/Aruba": "America/Aruba", + "America/Asuncion": "America/Asuncion", + "America/Atikokan": "America/Atikokan", + "America/Atka": "America/Atka", + "America/Bahia": "America/Bahia", + "America/Bahia_Banderas": "America/Bahia_Banderas", + "America/Barbados": "America/Barbados", + "America/Belem": "America/Belem", + "America/Belize": "America/Belize", + "America/Blanc-Sablon": "America/Blanc-Sablon", + "America/Boa_Vista": "America/Boa_Vista", + "America/Bogota": "America/Bogota", + "America/Boise": "America/Boise", + "America/Buenos_Aires": "America/Buenos_Aires", + "America/Cambridge_Bay": "America/Cambridge_Bay", + "America/Campo_Grande": "America/Campo_Grande", + "America/Cancun": "America/Cancun", + "America/Caracas": "America/Caracas", + "America/Catamarca": "America/Catamarca", + "America/Cayenne": "America/Cayenne", + "America/Cayman": "America/Cayman", + "America/Chicago": "America/Chicago", + "America/Chihuahua": "America/Chihuahua", + "America/Coral_Harbour": "America/Coral_Harbour", + "America/Cordoba": "America/Cordoba", + "America/Costa_Rica": "America/Costa_Rica", + "America/Creston": "America/Creston", + "America/Cuiaba": "America/Cuiaba", + "America/Curacao": "America/Curacao", + "America/Danmarkshavn": "America/Danmarkshavn", + "America/Dawson": "America/Dawson", + "America/Dawson_Creek": "America/Dawson_Creek", + "America/Denver": "America/Denver", + "America/Detroit": "America/Detroit", + "America/Dominica": "America/Dominica", + "America/Edmonton": "America/Edmonton", + "America/Eirunepe": "America/Eirunepe", + "America/El_Salvador": "America/El_Salvador", + "America/Ensenada": "America/Ensenada", + "America/Fort_Nelson": "America/Fort_Nelson", + "America/Fort_Wayne": "America/Fort_Wayne", + "America/Fortaleza": "America/Fortaleza", + "America/Glace_Bay": "America/Glace_Bay", + "America/Godthab": "America/Godthab", + "America/Goose_Bay": "America/Goose_Bay", + "America/Grand_Turk": "America/Grand_Turk", + "America/Grenada": "America/Grenada", + "America/Guadeloupe": "America/Guadeloupe", + "America/Guatemala": "America/Guatemala", + "America/Guayaquil": "America/Guayaquil", + "America/Guyana": "America/Guyana", + "America/Halifax": "America/Halifax", + "America/Havana": "America/Havana", + "America/Hermosillo": "America/Hermosillo", + "America/Indiana/Indianapolis": "America/Indiana/Indianapolis", + "America/Indiana/Knox": "America/Indiana/Knox", + "America/Indiana/Marengo": "America/Indiana/Marengo", + "America/Indiana/Petersburg": "America/Indiana/Petersburg", + "America/Indiana/Tell_City": "America/Indiana/Tell_City", + "America/Indiana/Vevay": "America/Indiana/Vevay", + "America/Indiana/Vincennes": "America/Indiana/Vincennes", + "America/Indiana/Winamac": "America/Indiana/Winamac", + "America/Indianapolis": "America/Indianapolis", + "America/Inuvik": "America/Inuvik", + "America/Iqaluit": "America/Iqaluit", + "America/Jamaica": "America/Jamaica", + "America/Jujuy": "America/Jujuy", + "America/Juneau": "America/Juneau", + "America/Kentucky/Louisville": "America/Kentucky/Louisville", + "America/Kentucky/Monticello": "America/Kentucky/Monticello", + "America/Knox_IN": "America/Knox_IN", + "America/Kralendijk": "America/Kralendijk", + "America/La_Paz": "America/La_Paz", + "America/Lima": "America/Lima", + "America/Los_Angeles": "America/Los_Angeles", + "America/Louisville": "America/Louisville", + "America/Lower_Princes": "America/Lower_Princes", + "America/Maceio": "America/Maceio", + "America/Managua": "America/Managua", + "America/Manaus": "America/Manaus", + "America/Marigot": "America/Marigot", + "America/Martinique": "America/Martinique", + "America/Matamoros": "America/Matamoros", + "America/Mazatlan": "America/Mazatlan", + "America/Mendoza": "America/Mendoza", + "America/Menominee": "America/Menominee", + "America/Merida": "America/Merida", + "America/Metlakatla": "America/Metlakatla", + "America/Mexico_City": "America/Mexico_City", + "America/Miquelon": "America/Miquelon", + "America/Moncton": "America/Moncton", + "America/Monterrey": "America/Monterrey", + "America/Montevideo": "America/Montevideo", + "America/Montreal": "America/Montreal", + "America/Montserrat": "America/Montserrat", + "America/Nassau": "America/Nassau", + "America/New_York": "America/New_York", + "America/Nipigon": "America/Nipigon", + "America/Nome": "America/Nome", + "America/Noronha": "America/Noronha", + "America/North_Dakota/Beulah": "America/North_Dakota/Beulah", + "America/North_Dakota/Center": "America/North_Dakota/Center", + "America/North_Dakota/New_Salem": "America/North_Dakota/New_Salem", + "America/Ojinaga": "America/Ojinaga", + "America/Panama": "America/Panama", + "America/Pangnirtung": "America/Pangnirtung", + "America/Paramaribo": "America/Paramaribo", + "America/Phoenix": "America/Phoenix", + "America/Port-au-Prince": "America/Port-au-Prince", + "America/Port_of_Spain": "America/Port_of_Spain", + "America/Porto_Acre": "America/Porto_Acre", + "America/Porto_Velho": "America/Porto_Velho", + "America/Puerto_Rico": "America/Puerto_Rico", + "America/Punta_Arenas": "America/Punta_Arenas", + "America/Rainy_River": "America/Rainy_River", + "America/Rankin_Inlet": "America/Rankin_Inlet", + "America/Recife": "America/Recife", + "America/Regina": "America/Regina", + "America/Resolute": "America/Resolute", + "America/Rio_Branco": "America/Rio_Branco", + "America/Rosario": "America/Rosario", + "America/Santa_Isabel": "America/Santa_Isabel", + "America/Santarem": "America/Santarem", + "America/Santiago": "America/Santiago", + "America/Santo_Domingo": "America/Santo_Domingo", + "America/Sao_Paulo": "America/Sao_Paulo", + "America/Scoresbysund": "America/Scoresbysund", + "America/Shiprock": "America/Shiprock", + "America/Sitka": "America/Sitka", + "America/St_Barthelemy": "America/St_Barthelemy", + "America/St_Johns": "America/St_Johns", + "America/St_Kitts": "America/St_Kitts", + "America/St_Lucia": "America/St_Lucia", + "America/St_Thomas": "America/St_Thomas", + "America/St_Vincent": "America/St_Vincent", + "America/Swift_Current": "America/Swift_Current", + "America/Tegucigalpa": "America/Tegucigalpa", + "America/Thule": "America/Thule", + "America/Thunder_Bay": "America/Thunder_Bay", + "America/Tijuana": "America/Tijuana", + "America/Toronto": "America/Toronto", + "America/Tortola": "America/Tortola", + "America/Vancouver": "America/Vancouver", + "America/Virgin": "America/Virgin", + "America/Whitehorse": "America/Whitehorse", + "America/Winnipeg": "America/Winnipeg", + "America/Yakutat": "America/Yakutat", + "America/Yellowknife": "America/Yellowknife", + "Antarctica/Casey": "Antarctica/Casey", + "Antarctica/Davis": "Antarctica/Davis", + "Antarctica/DumontDUrville": "Antarctica/DumontDUrville", + "Antarctica/Macquarie": "Antarctica/Macquarie", + "Antarctica/Mawson": "Antarctica/Mawson", + "Antarctica/McMurdo": "Antarctica/McMurdo", + "Antarctica/Palmer": "Antarctica/Palmer", + "Antarctica/Rothera": "Antarctica/Rothera", + "Antarctica/South_Pole": "Antarctica/South_Pole", + "Antarctica/Syowa": "Antarctica/Syowa", + "Antarctica/Troll": "Antarctica/Troll", + "Antarctica/Vostok": "Antarctica/Vostok", + "Arctic/Longyearbyen": "Arctic/Longyearbyen", + "Asia/Aden": "Asia/Aden", + "Asia/Almaty": "Asia/Almaty", + "Asia/Amman": "Asia/Amman", + "Asia/Anadyr": "Asia/Anadyr", + "Asia/Aqtau": "Asia/Aqtau", + "Asia/Aqtobe": "Asia/Aqtobe", + "Asia/Ashgabat": "Asia/Ashgabat", + "Asia/Ashkhabad": "Asia/Ashkhabad", + "Asia/Atyrau": "Asia/Atyrau", + "Asia/Baghdad": "Asia/Baghdad", + "Asia/Bahrain": "Asia/Bahrain", + "Asia/Baku": "Asia/Baku", + "Asia/Bangkok": "Asia/Bangkok", + "Asia/Barnaul": "Asia/Barnaul", + "Asia/Beirut": "Asia/Beirut", + "Asia/Bishkek": "Asia/Bishkek", + "Asia/Brunei": "Asia/Brunei", + "Asia/Calcutta": "Asia/Calcutta", + "Asia/Chita": "Asia/Chita", + "Asia/Choibalsan": "Asia/Choibalsan", + "Asia/Chongqing": "Asia/Chongqing", + "Asia/Chungking": "Asia/Chungking", + "Asia/Colombo": "Asia/Colombo", + "Asia/Dacca": "Asia/Dacca", + "Asia/Damascus": "Asia/Damascus", + "Asia/Dhaka": "Asia/Dhaka", + "Asia/Dili": "Asia/Dili", + "Asia/Dubai": "Asia/Dubai", + "Asia/Dushanbe": "Asia/Dushanbe", + "Asia/Famagusta": "Asia/Famagusta", + "Asia/Gaza": "Asia/Gaza", + "Asia/Harbin": "Asia/Harbin", + "Asia/Hebron": "Asia/Hebron", + "Asia/Ho_Chi_Minh": "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong": "Asia/Hong_Kong", + "Asia/Hovd": "Asia/Hovd", + "Asia/Irkutsk": "Asia/Irkutsk", + "Asia/Istanbul": "Asia/Istanbul", + "Asia/Jakarta": "Asia/Jakarta", + "Asia/Jayapura": "Asia/Jayapura", + "Asia/Jerusalem": "Asia/Jerusalem", + "Asia/Kabul": "Asia/Kabul", + "Asia/Kamchatka": "Asia/Kamchatka", + "Asia/Karachi": "Asia/Karachi", + "Asia/Kashgar": "Asia/Kashgar", + "Asia/Kathmandu": "Asia/Kathmandu", + "Asia/Katmandu": "Asia/Katmandu", + "Asia/Khandyga": "Asia/Khandyga", + "Asia/Kolkata": "Asia/Kolkata", + "Asia/Krasnoyarsk": "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur": "Asia/Kuala_Lumpur", + "Asia/Kuching": "Asia/Kuching", + "Asia/Kuwait": "Asia/Kuwait", + "Asia/Macao": "Asia/Macao", + "Asia/Macau": "Asia/Macau", + "Asia/Magadan": "Asia/Magadan", + "Asia/Makassar": "Asia/Makassar", + "Asia/Manila": "Asia/Manila", + "Asia/Muscat": "Asia/Muscat", + "Asia/Nicosia": "Asia/Nicosia", + "Asia/Novokuznetsk": "Asia/Novokuznetsk", + "Asia/Novosibirsk": "Asia/Novosibirsk", + "Asia/Omsk": "Asia/Omsk", + "Asia/Oral": "Asia/Oral", + "Asia/Phnom_Penh": "Asia/Phnom_Penh", + "Asia/Pontianak": "Asia/Pontianak", + "Asia/Pyongyang": "Asia/Pyongyang", + "Asia/Qatar": "Asia/Qatar", + "Asia/Qostanay": "Asia/Qostanay", + "Asia/Qyzylorda": "Asia/Qyzylorda", + "Asia/Rangoon": "Asia/Rangoon", + "Asia/Riyadh": "Asia/Riyadh", + "Asia/Saigon": "Asia/Saigon", + "Asia/Sakhalin": "Asia/Sakhalin", + "Asia/Samarkand": "Asia/Samarkand", + "Asia/Seoul": "Asia/Seoul", + "Asia/Shanghai": "Asia/Shanghai", + "Asia/Singapore": "Asia/Singapore", + "Asia/Srednekolymsk": "Asia/Srednekolymsk", + "Asia/Taipei": "Asia/Taipei", + "Asia/Tashkent": "Asia/Tashkent", + "Asia/Tbilisi": "Asia/Tbilisi", + "Asia/Tehran": "Asia/Tehran", + "Asia/Tel_Aviv": "Asia/Tel_Aviv", + "Asia/Thimbu": "Asia/Thimbu", + "Asia/Thimphu": "Asia/Thimphu", + "Asia/Tokyo": "Asia/Tokyo", + "Asia/Tomsk": "Asia/Tomsk", + "Asia/Ujung_Pandang": "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar": "Asia/Ulaanbaatar", + "Asia/Ulan_Bator": "Asia/Ulan_Bator", + "Asia/Urumqi": "Asia/Urumqi", + "Asia/Ust-Nera": "Asia/Ust-Nera", + "Asia/Vientiane": "Asia/Vientiane", + "Asia/Vladivostok": "Asia/Vladivostok", + "Asia/Yakutsk": "Asia/Yakutsk", + "Asia/Yangon": "Asia/Yangon", + "Asia/Yekaterinburg": "Asia/Yekaterinburg", + "Asia/Yerevan": "Asia/Yerevan", + "Atlantic/Azores": "Atlantic/Azores", + "Atlantic/Bermuda": "Atlantic/Bermuda", + "Atlantic/Canary": "Atlantic/Canary", + "Atlantic/Cape_Verde": "Atlantic/Cape_Verde", + "Atlantic/Faeroe": "Atlantic/Faeroe", + "Atlantic/Faroe": "Atlantic/Faroe", + "Atlantic/Jan_Mayen": "Atlantic/Jan_Mayen", + "Atlantic/Madeira": "Atlantic/Madeira", + "Atlantic/Reykjavik": "Atlantic/Reykjavik", + "Atlantic/South_Georgia": "Atlantic/South_Georgia", + "Atlantic/St_Helena": "Atlantic/St_Helena", + "Atlantic/Stanley": "Atlantic/Stanley", + "Australia/ACT": "Australia/ACT", + "Australia/Adelaide": "Australia/Adelaide", + "Australia/Brisbane": "Australia/Brisbane", + "Australia/Broken_Hill": "Australia/Broken_Hill", + "Australia/Canberra": "Australia/Canberra", + "Australia/Currie": "Australia/Currie", + "Australia/Darwin": "Australia/Darwin", + "Australia/Eucla": "Australia/Eucla", + "Australia/Hobart": "Australia/Hobart", + "Australia/LHI": "Australia/LHI", + "Australia/Lindeman": "Australia/Lindeman", + "Australia/Lord_Howe": "Australia/Lord_Howe", + "Australia/Melbourne": "Australia/Melbourne", + "Australia/NSW": "Australia/NSW", + "Australia/North": "Australia/North", + "Australia/Perth": "Australia/Perth", + "Australia/Queensland": "Australia/Queensland", + "Australia/South": "Australia/South", + "Australia/Sydney": "Australia/Sydney", + "Australia/Tasmania": "Australia/Tasmania", + "Australia/Victoria": "Australia/Victoria", + "Australia/West": "Australia/West", + "Australia/Yancowinna": "Australia/Yancowinna", + "Brazil/Acre": "Brazil/Acre", + "Brazil/DeNoronha": "Brazil/DeNoronha", + "Brazil/East": "Brazil/East", + "Brazil/West": "Brazil/West", + "CET": "CET", + "CST6CDT": "CST6CDT", + "Canada/Atlantic": "Canada/Atlantic", + "Canada/Central": "Canada/Central", + "Canada/Eastern": "Canada/Eastern", + "Canada/Mountain": "Canada/Mountain", + "Canada/Newfoundland": "Canada/Newfoundland", + "Canada/Pacific": "Canada/Pacific", + "Canada/Saskatchewan": "Canada/Saskatchewan", + "Canada/Yukon": "Canada/Yukon", + "Chile/Continental": "Chile/Continental", + "Chile/EasterIsland": "Chile/EasterIsland", + "Cuba": "Cuba", + "EET": "EET", + "EST": "EST", + "EST5EDT": "EST5EDT", + "Egypt": "Egypt", + "Eire": "Eire", + "Etc/GMT": "Etc/GMT", + "Etc/GMT+0": "Etc/GMT+0", + "Etc/GMT+1": "Etc/GMT+1", + "Etc/GMT+10": "Etc/GMT+10", + "Etc/GMT+11": "Etc/GMT+11", + "Etc/GMT+12": "Etc/GMT+12", + "Etc/GMT+2": "Etc/GMT+2", + "Etc/GMT+3": "Etc/GMT+3", + "Etc/GMT+4": "Etc/GMT+4", + "Etc/GMT+5": "Etc/GMT+5", + "Etc/GMT+6": "Etc/GMT+6", + "Etc/GMT+7": "Etc/GMT+7", + "Etc/GMT+8": "Etc/GMT+8", + "Etc/GMT+9": "Etc/GMT+9", + "Etc/GMT-0": "Etc/GMT-0", + "Etc/GMT-1": "Etc/GMT-1", + "Etc/GMT-10": "Etc/GMT-10", + "Etc/GMT-11": "Etc/GMT-11", + "Etc/GMT-12": "Etc/GMT-12", + "Etc/GMT-13": "Etc/GMT-13", + "Etc/GMT-14": "Etc/GMT-14", + "Etc/GMT-2": "Etc/GMT-2", + "Etc/GMT-3": "Etc/GMT-3", + "Etc/GMT-4": "Etc/GMT-4", + "Etc/GMT-5": "Etc/GMT-5", + "Etc/GMT-6": "Etc/GMT-6", + "Etc/GMT-7": "Etc/GMT-7", + "Etc/GMT-8": "Etc/GMT-8", + "Etc/GMT-9": "Etc/GMT-9", + "Etc/GMT0": "Etc/GMT0", + "Etc/Greenwich": "Etc/Greenwich", + "Etc/UCT": "Etc/UCT", + "Etc/UTC": "Etc/UTC", + "Etc/Universal": "Etc/Universal", + "Etc/Zulu": "Etc/Zulu", + "Europe/Amsterdam": "Europe/Amsterdam", + "Europe/Andorra": "Europe/Andorra", + "Europe/Astrakhan": "Europe/Astrakhan", + "Europe/Athens": "Europe/Athens", + "Europe/Belfast": "Europe/Belfast", + "Europe/Belgrade": "Europe/Belgrade", + "Europe/Berlin": "Europe/Berlin", + "Europe/Bratislava": "Europe/Bratislava", + "Europe/Brussels": "Europe/Brussels", + "Europe/Bucharest": "Europe/Bucharest", + "Europe/Budapest": "Europe/Budapest", + "Europe/Busingen": "Europe/Busingen", + "Europe/Chisinau": "Europe/Chisinau", + "Europe/Copenhagen": "Europe/Copenhagen", + "Europe/Dublin": "Europe/Dublin", + "Europe/Gibraltar": "Europe/Gibraltar", + "Europe/Guernsey": "Europe/Guernsey", + "Europe/Helsinki": "Europe/Helsinki", + "Europe/Isle_of_Man": "Europe/Isle_of_Man", + "Europe/Istanbul": "Europe/Istanbul", + "Europe/Jersey": "Europe/Jersey", + "Europe/Kaliningrad": "Europe/Kaliningrad", + "Europe/Kiev": "Europe/Kiev", + "Europe/Kirov": "Europe/Kirov", + "Europe/Lisbon": "Europe/Lisbon", + "Europe/Ljubljana": "Europe/Ljubljana", + "Europe/London": "Europe/London", + "Europe/Luxembourg": "Europe/Luxembourg", + "Europe/Madrid": "Europe/Madrid", + "Europe/Malta": "Europe/Malta", + "Europe/Mariehamn": "Europe/Mariehamn", + "Europe/Minsk": "Europe/Minsk", + "Europe/Monaco": "Europe/Monaco", + "Europe/Moscow": "Europe/Moscow", + "Europe/Nicosia": "Europe/Nicosia", + "Europe/Oslo": "Europe/Oslo", + "Europe/Paris": "Europe/Paris", + "Europe/Podgorica": "Europe/Podgorica", + "Europe/Prague": "Europe/Prague", + "Europe/Riga": "Europe/Riga", + "Europe/Rome": "Europe/Rome", + "Europe/Samara": "Europe/Samara", + "Europe/San_Marino": "Europe/San_Marino", + "Europe/Sarajevo": "Europe/Sarajevo", + "Europe/Saratov": "Europe/Saratov", + "Europe/Simferopol": "Europe/Simferopol", + "Europe/Skopje": "Europe/Skopje", + "Europe/Sofia": "Europe/Sofia", + "Europe/Stockholm": "Europe/Stockholm", + "Europe/Tallinn": "Europe/Tallinn", + "Europe/Tirane": "Europe/Tirane", + "Europe/Tiraspol": "Europe/Tiraspol", + "Europe/Ulyanovsk": "Europe/Ulyanovsk", + "Europe/Uzhgorod": "Europe/Uzhgorod", + "Europe/Vaduz": "Europe/Vaduz", + "Europe/Vatican": "Europe/Vatican", + "Europe/Vienna": "Europe/Vienna", + "Europe/Vilnius": "Europe/Vilnius", + "Europe/Volgograd": "Europe/Volgograd", + "Europe/Warsaw": "Europe/Warsaw", + "Europe/Zagreb": "Europe/Zagreb", + "Europe/Zaporozhye": "Europe/Zaporozhye", + "Europe/Zurich": "Europe/Zurich", + "GB": "GB", + "GB-Eire": "GB-Eire", + "GMT": "GMT", + "GMT+0": "GMT+0", + "GMT-0": "GMT-0", + "GMT0": "GMT0", + "Greenwich": "Greenwich", + "HST": "HST", + "Hongkong": "Hongkong", + "Iceland": "Iceland", + "Indian/Antananarivo": "Indian/Antananarivo", + "Indian/Chagos": "Indian/Chagos", + "Indian/Christmas": "Indian/Christmas", + "Indian/Cocos": "Indian/Cocos", + "Indian/Comoro": "Indian/Comoro", + "Indian/Kerguelen": "Indian/Kerguelen", + "Indian/Mahe": "Indian/Mahe", + "Indian/Maldives": "Indian/Maldives", + "Indian/Mauritius": "Indian/Mauritius", + "Indian/Mayotte": "Indian/Mayotte", + "Indian/Reunion": "Indian/Reunion", + "Iran": "Iran", + "Israel": "Israel", + "Jamaica": "Jamaica", + "Japan": "Japan", + "Kwajalein": "Kwajalein", + "Libya": "Libya", + "MET": "MET", + "MST": "MST", + "MST7MDT": "MST7MDT", + "Mexico/BajaNorte": "Mexico/BajaNorte", + "Mexico/BajaSur": "Mexico/BajaSur", + "Mexico/General": "Mexico/General", + "NZ": "NZ", + "NZ-CHAT": "NZ-CHAT", + "Navajo": "Navajo", + "PRC": "PRC", + "PST8PDT": "PST8PDT", + "Pacific/Apia": "Pacific/Apia", + "Pacific/Auckland": "Pacific/Auckland", + "Pacific/Bougainville": "Pacific/Bougainville", + "Pacific/Chatham": "Pacific/Chatham", + "Pacific/Chuuk": "Pacific/Chuuk", + "Pacific/Easter": "Pacific/Easter", + "Pacific/Efate": "Pacific/Efate", + "Pacific/Enderbury": "Pacific/Enderbury", + "Pacific/Fakaofo": "Pacific/Fakaofo", + "Pacific/Fiji": "Pacific/Fiji", + "Pacific/Funafuti": "Pacific/Funafuti", + "Pacific/Galapagos": "Pacific/Galapagos", + "Pacific/Gambier": "Pacific/Gambier", + "Pacific/Guadalcanal": "Pacific/Guadalcanal", + "Pacific/Guam": "Pacific/Guam", + "Pacific/Honolulu": "Pacific/Honolulu", + "Pacific/Johnston": "Pacific/Johnston", + "Pacific/Kiritimati": "Pacific/Kiritimati", + "Pacific/Kosrae": "Pacific/Kosrae", + "Pacific/Kwajalein": "Pacific/Kwajalein", + "Pacific/Majuro": "Pacific/Majuro", + "Pacific/Marquesas": "Pacific/Marquesas", + "Pacific/Midway": "Pacific/Midway", + "Pacific/Nauru": "Pacific/Nauru", + "Pacific/Niue": "Pacific/Niue", + "Pacific/Norfolk": "Pacific/Norfolk", + "Pacific/Noumea": "Pacific/Noumea", + "Pacific/Pago_Pago": "Pacific/Pago_Pago", + "Pacific/Palau": "Pacific/Palau", + "Pacific/Pitcairn": "Pacific/Pitcairn", + "Pacific/Pohnpei": "Pacific/Pohnpei", + "Pacific/Ponape": "Pacific/Ponape", + "Pacific/Port_Moresby": "Pacific/Port_Moresby", + "Pacific/Rarotonga": "Pacific/Rarotonga", + "Pacific/Saipan": "Pacific/Saipan", + "Pacific/Samoa": "Pacific/Samoa", + "Pacific/Tahiti": "Pacific/Tahiti", + "Pacific/Tarawa": "Pacific/Tarawa", + "Pacific/Tongatapu": "Pacific/Tongatapu", + "Pacific/Truk": "Pacific/Truk", + "Pacific/Wake": "Pacific/Wake", + "Pacific/Wallis": "Pacific/Wallis", + "Pacific/Yap": "Pacific/Yap", + "Poland": "Poland", + "Portugal": "Portugal", + "ROC": "ROC", + "ROK": "ROK", + "Singapore": "Singapore", + "Turkey": "Turkey", + "UCT": "UCT", + "US/Alaska": "US/Alaska", + "US/Aleutian": "US/Aleutian", + "US/Arizona": "US/Arizona", + "US/Central": "US/Central", + "US/East-Indiana": "US/East-Indiana", + "US/Eastern": "US/Eastern", + "US/Hawaii": "US/Hawaii", + "US/Indiana-Starke": "US/Indiana-Starke", + "US/Michigan": "US/Michigan", + "US/Mountain": "US/Mountain", + "US/Pacific": "US/Pacific", + "US/Pacific-New": "US/Pacific-New", + "US/Samoa": "US/Samoa", + "UTC": "UTC", + "Universal": "Universal", + "W-SU": "W-SU", + "WET": "WET", + "Zulu": "Zulu" + } }, "group": { "label": "Group", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 0a490518..d0e6f55c 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -2,7 +2,602 @@ "common": { "search": "검색", "searchWord": "검색어", - "useOnlyForSpecialCharacter": "특수문자는 {{0}}만 사용할 수 있습니다." + "useOnlyForSpecialCharacter": "특수문자는 {{0}}만 사용할 수 있습니다.", + "timezone": { + "Africa/Abidjan": "아프리카/아비 장", + "Africa/Accra": "아프리카/아크라", + "Africa/Addis_Ababa": "아프리카/아디스 아바바", + "Africa/Algiers": "아프리카/알제", + "Africa/Asmara": "아프리카/아스 마라", + "Africa/Asmera": "아프리카/아스 메라", + "Africa/Bamako": "아프리카/바마코", + "Africa/Bangui": "아프리카/반 귀이", + "Africa/Banjul": "아프리카/반줄", + "Africa/Bissau": "아프리카/비사우", + "Africa/Blantyre": "아프리카/블랜 타이어", + "Africa/Brazzaville": "아프리카/브라자빌", + "Africa/Bujumbura": "아프리카/부줌 부라", + "Africa/Cairo": "아프리카/카이로", + "Africa/Casablanca": "아프리카/카사 블랑카", + "Africa/Ceuta": "아프리카/세 우타", + "Africa/Conakry": "아프리카/코나 크리", + "Africa/Dakar": "아프리카/다카르", + "Africa/Dar_es_Salaam": "아프리카/다르 에스 살람", + "Africa/Djibouti": "아프리카/지부티", + "Africa/Douala": "아프리카/두 알라", + "Africa/El_Aaiun": "아프리카/엘 아이 운", + "Africa/Freetown": "아프리카/프리 타운", + "Africa/Gaborone": "아프리카/가보 로네", + "Africa/Harare": "아프리카/해러", + "Africa/Johannesburg": "아프리카/요하네스 버그", + "Africa/Juba": "아프리카/유바", + "Africa/Kampala": "아프리카/캄팔라", + "Africa/Khartoum": "아프리카/하르툼", + "Africa/Kigali": "아프리카/키 갈리", + "Africa/Kinshasa": "아프리카/킨 샤사", + "Africa/Lagos": "아프리카/라고스", + "Africa/Libreville": "아프리카/리버빌", + "Africa/Lome": "아프리카/로마", + "Africa/Luanda": "아프리카/루안다", + "Africa/Lubumbashi": "아프리카/루 붐바시", + "Africa/Lusaka": "아프리카/루사카", + "Africa/Malabo": "아프리카/말라 보", + "Africa/Maputo": "아프리카/마푸토", + "Africa/Maseru": "아프리카/마세 루", + "Africa/Mbabane": "아프리카/음 바바 네", + "Africa/Mogadishu": "아프리카/모가디슈", + "Africa/Monrovia": "아프리카/몬로 비아", + "Africa/Nairobi": "아프리카/나이로비", + "Africa/Ndjamena": "아프리카/냐자 메나", + "Africa/Niamey": "아프리카/니암", + "Africa/Nouakchott": "아프리카/누악 쇼트", + "Africa/Ouagadougou": "아프리카/오아가 두구", + "Africa/Porto-Novo": "아프리카/포르토 노보", + "Africa/Sao_Tome": "아프리카/사 오토메", + "Africa/Timbuktu": "아프리카/팀북투", + "Africa/Tripoli": "아프리카/트리폴리", + "Africa/Tunis": "아프리카/튀니지", + "Africa/Windhoek": "아프리카/빈트 후크", + "America/Adak": "아메리카/아닥", + "America/Anchorage": "아메리카/앵커리지", + "America/Anguilla": "아메리카/앵귈라", + "America/Antigua": "아메리카/안티구아", + "America/Araguaina": "아메리카/아라구아나", + "America/Argentina/Buenos_Aires": "아메리카/아르헨티나/부에노스 아이레스", + "America/Argentina/Catamarca": "아메리카/아르헨티나/카타 마르카", + "America/Argentina/ComodRivadavia": "아메리카/아르헨티나/코모드 리바다비아", + "America/Argentina/Cordoba": "아메리카/아르헨티나/코르도바", + "America/Argentina/Jujuy": "아메리카/아르헨티나/주이", + "America/Argentina/La_Rioja": "아메리카/아르헨티나/라 리오하", + "America/Argentina/Mendoza": "아메리카/아르헨티나/멘도사", + "America/Argentina/Rio_Gallegos": "아메리카/아르헨티나/리오 갈레고스", + "America/Argentina/Salta": "아메리카/아르헨티나/살타", + "America/Argentina/San_Juan": "아메리카/아르헨티나/산후 안", + "America/Argentina/San_Luis": "아메리카/아르헨티나/산 루이스", + "America/Argentina/Tucuman": "아메리카/아르헨티나/투쿠 만", + "America/Argentina/Ushuaia": "아메리카/아르헨티나/우수아", + "America/Aruba": "아메리카/아루바", + "America/Asuncion": "아메리카/아순시온", + "America/Atikokan": "아메리카/아 티코 칸", + "America/Atka": "아메리카/아트카", + "America/Bahia": "아메리카/바이아", + "America/Bahia_Banderas": "아메리카/바이아 반데라스", + "America/Barbados": "아메리카/바베이도스", + "America/Belem": "아메리카/벨렘", + "America/Belize": "아메리카/벨리즈", + "America/Blanc-Sablon": "아메리카/블랑-사블 론", + "America/Boa_Vista": "아메리카/보아 비스타", + "America/Bogota": "아메리카/보고타", + "America/Boise": "아메리카/보이즈", + "America/Buenos_Aires": "아메리카/부에노스 아이레스", + "America/Cambridge_Bay": "아메리카/캠브리지 _ 베이", + "America/Campo_Grande": "아메리카/캄포 그란데", + "America/Cancun": "아메리카/칸쿤", + "America/Caracas": "아메리카/카라카스", + "America/Catamarca": "아메리카/카타 마르카", + "America/Cayenne": "아메리카/카이엔", + "America/Cayman": "아메리카/케이맨", + "America/Chicago": "아메리카/시카고", + "America/Chihuahua": "아메리카/치와와", + "America/Coral_Harbour": "아메리카/코럴 하버", + "America/Cordoba": "아메리카/코르도바", + "America/Costa_Rica": "아메리카/코스타리카", + "America/Creston": "아메리카/크레 스턴", + "America/Cuiaba": "아메리카/쿠이 아바", + "America/Curacao": "아메리카/쿠라 카오", + "America/Danmarkshavn": "아메리카/단마크하븐", + "America/Dawson": "아메리카/도슨", + "America/Dawson_Creek": "아메리카/도슨 크릭", + "America/Denver": "아메리카/덴버", + "America/Detroit": "아메리카/디트로이트", + "America/Dominica": "아메리카/도미니카", + "America/Edmonton": "아메리카/에드먼턴", + "America/Eirunepe": "아메리카/에루네페", + "America/El_Salvador": "아메리카/엘살바도르", + "America/Ensenada": "아메리카/엔 세나다", + "America/Fort_Nelson": "아메리카/포트 넬슨", + "America/Fort_Wayne": "아메리카/포트 웨인", + "America/Fortaleza": "아메리카/포르탈레자", + "America/Glace_Bay": "아메리카/그레이스 베이", + "America/Godthab": "아메리카/고트 하브", + "America/Goose_Bay": "아메리카/구스 베이", + "America/Grand_Turk": "아메리카/그랜드 터크", + "America/Grenada": "아메리카/그레나다", + "America/Guadeloupe": "아메리카/과들루프", + "America/Guatemala": "아메리카/과테말라", + "America/Guayaquil": "아메리카/과야퀼", + "America/Guyana": "아메리카/가이아나", + "America/Halifax": "아메리카/할리팩스", + "America/Havana": "아메리카/하바나", + "America/Hermosillo": "아메리카/헤르모실로", + "America/Indiana/Indianapolis": "아메리카/인디애나/인디애나폴리스", + "America/Indiana/Knox": "아메리카/인디애나/녹스", + "America/Indiana/Marengo": "아메리카/인디애나/마렝고", + "America/Indiana/Petersburg": "아메리카/인디애나/피터스버그", + "America/Indiana/Tell_City": "아메리카/인디애나/텔시티", + "America/Indiana/Vevay": "아메리카/인디애나/비베이", + "America/Indiana/Vincennes": "아메리카/인디애나/빈센테", + "America/Indiana/Winamac": "아메리카/인디애나/윈아멕", + "America/Indianapolis": "아메리카/인디애나폴리스", + "America/Inuvik": "아메리카/이누빅", + "America/Iqaluit": "아메리카/이칼루이트", + "America/Jamaica": "아메리카/자메이카", + "America/Jujuy": "아메리카/주이", + "America/Juneau": "아메리카/주노", + "America/Kentucky/Louisville": "아메리카/켄터키/루이스 빌", + "America/Kentucky/Monticello": "아메리카/켄터키/몬티 첼로", + "America/Knox_IN": "아메리카/녹스 IN", + "America/Kralendijk": "아메리카/크라랜디직", + "America/La_Paz": "아메리카/라 파즈", + "America/Lima": "아메리카/리마", + "America/Los_Angeles": "아메리카/로스 앤젤레스", + "America/Louisville": "아메리카/루이스 빌", + "America/Lower_Princes": "아메리카/하위 프린스", + "America/Maceio": "아메리카/마세 이오", + "America/Managua": "아메리카/마나과", + "America/Manaus": "아메리카/마나우스", + "America/Marigot": "아메리카/마리 고", + "America/Martinique": "아메리카/마르티니크", + "America/Matamoros": "아메리카/마타 모로", + "America/Mazatlan": "아메리카/마자 틀란", + "America/Mendoza": "아메리카/멘도사", + "America/Menominee": "아메리카/메노 민", + "America/Merida": "아메리카/메리다", + "America/Metlakatla": "아메리카/메틀 라카 틀라", + "America/Mexico_City": "아메리카/멕시코시티", + "America/Miquelon": "아메리카/미켈론", + "America/Moncton": "아메리카/몬크톤", + "America/Monterrey": "아메리카/몬테레이", + "America/Montevideo": "아메리카/몬테비데오", + "America/Montreal": "아메리카/몬트리올", + "America/Montserrat": "아메리카/몬체 라트", + "America/Nassau": "아메리카/나소", + "America/New_York": "아메리카/뉴욕", + "America/Nipigon": "아메리카/니피곤", + "America/Nome": "아메리카/노메", + "America/Noronha": "아메리카/노로냐", + "America/North_Dakota/Beulah": "아메리카/노스 다코타/부라", + "America/North_Dakota/Center": "아메리카/노스 다코타/센터", + "America/North_Dakota/New_Salem": "아메리카/노스 다코타/뉴 살렘", + "America/Ojinaga": "아메리카/오지나가", + "America/Panama": "아메리카/파나마", + "America/Pangnirtung": "아메리카/판니르퉁", + "America/Paramaribo": "아메리카/파라마리보", + "America/Phoenix": "아메리카/피닉스", + "America/Port-au-Prince": "아메리카/포트 오 프린스", + "America/Port_of_Spain": "아메리카/포트 오브 스페인", + "America/Porto_Acre": "아메리카/포르토 아크레", + "America/Porto_Velho": "아메리카/포르토 벨호", + "America/Puerto_Rico": "아메리카/푸에르토 리코", + "America/Punta_Arenas": "아메리카/푼타 아레나", + "America/Rainy_River": "아메리카/레이니 리버", + "America/Rankin_Inlet": "아메리카/랜킨 인렛", + "America/Recife": "아메리카/레시페", + "America/Regina": "아메리카/레지나", + "America/Resolute": "아메리카/리졸루트", + "America/Rio_Branco": "아메리카/리오 브랑코", + "America/Rosario": "아메리카/로자리오", + "America/Santa_Isabel": "아메리카/산타 이사벨", + "America/Santarem": "아메리카/산타렘", + "America/Santiago": "아메리카/산티아고", + "America/Santo_Domingo": "아메리카/산토 도밍고", + "America/Sao_Paulo": "아메리카/상파울루", + "America/Scoresbysund": "아메리카/스코어스비순드", + "America/Shiprock": "아메리카/쉽락", + "America/Sitka": "아메리카/싯카", + "America/St_Barthelemy": "아메리카/세인트 바델레미", + "America/St_Johns": "아메리카/세인트 존스", + "America/St_Kitts": "아메리카/세인트 키츠", + "America/St_Lucia": "아메리카/세인트 루시아", + "America/St_Thomas": "아메리카/세인트 토마스", + "America/St_Vincent": "아메리카/세인트 빈센트", + "America/Swift_Current": "아메리카/스위프트 커런트", + "America/Tegucigalpa": "아메리카/테구시갈파", + "America/Thule": "아메리카/툴레", + "America/Thunder_Bay": "아메리카/선더 베이", + "America/Tijuana": "아메리카/티후아나", + "America/Toronto": "아메리카/토론토", + "America/Tortola": "아메리카/토르톨라", + "America/Vancouver": "아메리카/밴쿠버", + "America/Virgin": "아메리카/버진", + "America/Whitehorse": "아메리카/화이트호스", + "America/Winnipeg": "아메리카/위니펙", + "America/Yakutat": "아메리카/야쿠타트", + "America/Yellowknife": "아메리카/옐로나이프", + "Antarctica/Casey": "남극/케이시", + "Antarctica/Davis": "남극/데이비스", + "Antarctica/DumontDUrville": "남극/듀몽듀르빌", + "Antarctica/Macquarie": "남극/맥쿼리", + "Antarctica/Mawson": "남극/모손", + "Antarctica/McMurdo": "남극 대륙/맥머도", + "Antarctica/Palmer": "남극/팔머", + "Antarctica/Rothera": "남극/로 데라", + "Antarctica/South_Pole": "남극/남극", + "Antarctica/Syowa": "남극/요와", + "Antarctica/Troll": "남극/트롤", + "Antarctica/Vostok": "남극/보스 토크", + "Arctic/Longyearbyen": "북극/롱 이어 비엔", + "Asia/Aden": "아시아/아덴", + "Asia/Almaty": "아시아/알마티", + "Asia/Amman": "아시아/암만", + "Asia/Anadyr": "아시아/아나 디르", + "Asia/Aqtau": "아시아/악 타우", + "Asia/Aqtobe": "아시아/악 토베", + "Asia/Ashgabat": "아시아/아시가 바트", + "Asia/Ashkhabad": "아시아/아쉬 카바 드", + "Asia/Atyrau": "아시아/아티 라우", + "Asia/Baghdad": "아시아/바그다드", + "Asia/Bahrain": "아시아/바레인", + "Asia/Baku": "아시아/바쿠", + "Asia/Bangkok": "아시아/방콕", + "Asia/Barnaul": "아시아/바르나울", + "Asia/Beirut": "아시아/베이루트", + "Asia/Bishkek": "아시아/비슈케크", + "Asia/Brunei": "아시아/브루나이", + "Asia/Calcutta": "아시아/캘커타", + "Asia/Chita": "아시아/치타", + "Asia/Choibalsan": "아시아/최발산", + "Asia/Chongqing": "아시아/충칭", + "Asia/Chungking": "아시아/청킹", + "Asia/Colombo": "아시아/콜롬보", + "Asia/Dacca": "아시아/다카", + "Asia/Damascus": "아시아/다마스커스", + "Asia/Dhaka": "아시아/다카", + "Asia/Dili": "아시아/힌디어", + "Asia/Dubai": "아시아/두바이", + "Asia/Dushanbe": "아시아/두샨베", + "Asia/Famagusta": "아시아/파 마구 스타", + "Asia/Gaza": "아시아/가자", + "Asia/Harbin": "아시아/하얼빈", + "Asia/Hebron": "아시아/헤브론", + "Asia/Ho_Chi_Minh": "아시아/호치민", + "Asia/Hong_Kong": "아시아/홍콩", + "Asia/Hovd": "아시아/호브드", + "Asia/Irkutsk": "아시아/이르쿠츠크", + "Asia/Istanbul": "아시아/이스탄불", + "Asia/Jakarta": "아시아/자카르타", + "Asia/Jayapura": "아시아/자야푸라", + "Asia/Jerusalem": "아시아/예루살렘", + "Asia/Kabul": "아시아/카불", + "Asia/Kamchatka": "아시아/캄차카", + "Asia/Karachi": "아시아/카라치", + "Asia/Kashgar": "아시아/카슈가르", + "Asia/Kathmandu": "아시아/카트만두", + "Asia/Katmandu": "아시아/카트만두", + "Asia/Khandyga": "아시아/칸디가", + "Asia/Kolkata": "아시아/콜카타", + "Asia/Krasnoyarsk": "아시아/크라스 노야 르 스크", + "Asia/Kuala_Lumpur": "아시아/쿠알라 룸푸르", + "Asia/Kuching": "아시아/쿠칭", + "Asia/Kuwait": "아시아/쿠웨이트", + "Asia/Macao": "아시아/마카오", + "Asia/Macau": "아시아/마카오", + "Asia/Magadan": "아시아/마가 단", + "Asia/Makassar": "아시아/마카 사르", + "Asia/Manila": "아시아/마닐라", + "Asia/Muscat": "아시아/무스카트", + "Asia/Nicosia": "아시아/니코 시아", + "Asia/Novokuznetsk": "아시아/노보 쿠즈네츠 크", + "Asia/Novosibirsk": "아시아/노보시비르스크", + "Asia/Omsk": "아시아/옴 스크", + "Asia/Oral": "아시아/오랄", + "Asia/Phnom_Penh": "아시아/프놈펜", + "Asia/Pontianak": "아시아/폰티아낙", + "Asia/Pyongyang": "아시아/평양", + "Asia/Qatar": "아시아/카타르", + "Asia/Qostanay": "아시아/쿠스타나이", + "Asia/Qyzylorda": "아시아/키질로르다", + "Asia/Rangoon": "아시아/랑군", + "Asia/Riyadh": "아시아/리야드", + "Asia/Saigon": "아시아/사이공", + "Asia/Sakhalin": "아시아/사할린", + "Asia/Samarkand": "아시아/사마르 칸트", + "Asia/Seoul": "아시아/서울", + "Asia/Shanghai": "아시아/상하이", + "Asia/Singapore": "아시아/싱가포르", + "Asia/Srednekolymsk": "아시아/스레 네 콜림 스크", + "Asia/Taipei": "아시아/타이페이", + "Asia/Tashkent": "아시아/타슈켄트", + "Asia/Tbilisi": "아시아/트빌리시", + "Asia/Tehran": "아시아/테헤란", + "Asia/Tel_Aviv": "아시아/텔아비브", + "Asia/Thimbu": "아시아/팀부", + "Asia/Thimphu": "아시아/팀푸", + "Asia/Tokyo": "아시아/도쿄", + "Asia/Tomsk": "아시아/톰스크", + "Asia/Ujung_Pandang": "아시아/엔드", + "Asia/Ulaanbaatar": "아시아/울란바토르", + "Asia/Ulan_Bator": "아시아/울란바토르", + "Asia/Urumqi": "아시아/우루무치", + "Asia/Ust-Nera": "아시아/우스트네라", + "Asia/Vientiane": "아시아/비엔티안", + "Asia/Vladivostok": "아시아/블라디보스토크", + "Asia/Yakutsk": "아시아/야쿠츠크", + "Asia/Yangon": "아시아/양곤", + "Asia/Yekaterinburg": "아시아/예카테린부르크", + "Asia/Yerevan": "아시아/예레반", + "Atlantic/Azores": "대서양/아조레스", + "Atlantic/Bermuda": "대서양/버뮤다", + "Atlantic/Canary": "대서양/카나리아", + "Atlantic/Cape_Verde": "대서양/카보 베르데", + "Atlantic/Faeroe": "대서양/파에로", + "Atlantic/Faroe": "대서양/파로", + "Atlantic/Jan_Mayen": "대서양/얀 마옌", + "Atlantic/Madeira": "대서양/마데이라", + "Atlantic/Reykjavik": "대서양/레이캬비크", + "Atlantic/South_Georgia": "대서양/사우스 조지아", + "Atlantic/St_Helena": "대서양/세인트 헬레나", + "Atlantic/Stanley": "대서양/스탠리", + "Australia/ACT": "오스트레일리아/ACT", + "Australia/Adelaide": "오스트레일리아/애들레이드", + "Australia/Brisbane": "오스트레일리아/브리즈번", + "Australia/Broken_Hill": "오스트레일리아/브로큰 힐", + "Australia/Canberra": "오스트레일리아/캔버라", + "Australia/Currie": "오스트레일리아/커리", + "Australia/Darwin": "오스트레일리아/다윈", + "Australia/Eucla": "오스트레일리아/유클라", + "Australia/Hobart": "오스트레일리아/호바트", + "Australia/LHI": "오스트레일리아/LHI", + "Australia/Lindeman": "오스트레일리아/린드만", + "Australia/Lord_Howe": "오스트레일리아/로드 호우", + "Australia/Melbourne": "오스트레일리아/멜버른", + "Australia/NSW": "오스트레일리아/NSW", + "Australia/North": "오스트레일리아/북부", + "Australia/Perth": "오스트레일리아/퍼스", + "Australia/Queensland": "오스트레일리아/퀸즐랜드", + "Australia/South": "오스트레일리아/남부", + "Australia/Sydney": "오스트레일리아/시드니", + "Australia/Tasmania": "오스트레일리아/태즈 매니아", + "Australia/Victoria": "오스트레일리아/빅토리아", + "Australia/West": "오스트레일리아/서부", + "Australia/Yancowinna": "오스트레일리아/얀 카우 나", + "Brazil/Acre": "브라질/에이커", + "Brazil/DeNoronha": "브라질/드노르온하", + "Brazil/East": "브라질/동부", + "Brazil/West": "브라질/서부", + "CET": "CET", + "CST6CDT": "CST6CDT", + "Canada/Atlantic": "캐나다/대서양", + "Canada/Central": "캐나다/중앙", + "Canada/Eastern": "캐나다/동부", + "Canada/Mountain": "캐나다/마운틴", + "Canada/Newfoundland": "캐나다/뉴펀들랜드", + "Canada/Pacific": "캐나다/태평양", + "Canada/Saskatchewan": "캐나다/서스캐처원", + "Canada/Yukon": "캐나다/유콘", + "Chile/Continental": "칠레/컨티넨탈", + "Chile/EasterIsland": "칠레/이스터섬", + "Cuba": "쿠바", + "EET": "EET", + "EST": "EST", + "EST5EDT": "EST5EDT", + "Egypt": "이집트", + "Eire": "에이레", + "Etc/GMT": "기타/GMT", + "Etc/GMT+0": "기타/GMT+0", + "Etc/GMT+1": "기타/GMT+1", + "Etc/GMT+10": "기타/GMT+10", + "Etc/GMT+11": "기타/GMT+11", + "Etc/GMT+12": "기타/GMT+12", + "Etc/GMT+2": "기타/GMT+2", + "Etc/GMT+3": "기타/GMT+3", + "Etc/GMT+4": "기타/GMT+4", + "Etc/GMT+5": "기타/GMT+5", + "Etc/GMT+6": "기타/GMT+6", + "Etc/GMT+7": "기타/GMT+7", + "Etc/GMT+8": "기타/GMT+8", + "Etc/GMT+9": "기타/GMT+9", + "Etc/GMT-0": "기타/GMT-0", + "Etc/GMT-1": "기타/GMT-1", + "Etc/GMT-10": "기타/GMT-10", + "Etc/GMT-11": "기타/GMT-11", + "Etc/GMT-12": "기타/GMT-12", + "Etc/GMT-13": "기타/GMT-13", + "Etc/GMT-14": "기타/GMT-14", + "Etc/GMT-2": "기타/GMT-2", + "Etc/GMT-3": "기타/GMT-3", + "Etc/GMT-4": "기타/GMT-4", + "Etc/GMT-5": "기타/GMT-5", + "Etc/GMT-6": "기타/GMT-6", + "Etc/GMT-7": "기타/GMT-7", + "Etc/GMT-8": "기타/GMT-8", + "Etc/GMT-9": "기타/GMT-9", + "Etc/GMT0": "기타/GMT0", + "Etc/Greenwich": "기타/그리니치", + "Etc/UCT": "기타/UCT", + "Etc/UTC": "기타/UTC", + "Etc/Universal": "기타/유니버설", + "Etc/Zulu": "기타/줄루", + "Europe/Amsterdam": "유럽/암스테르담", + "Europe/Andorra": "유럽/안도라", + "Europe/Astrakhan": "유럽/아스트라칸", + "Europe/Athens": "유럽/아테네", + "Europe/Belfast": "유럽/벨파스트", + "Europe/Belgrade": "유럽/베오그라드", + "Europe/Berlin": "유럽/베를린", + "Europe/Bratislava": "유럽/브라티슬라바", + "Europe/Brussels": "유럽/브뤼셀", + "Europe/Bucharest": "유럽/부쿠레슈티", + "Europe/Budapest": "유럽/부다페스트", + "Europe/Busingen": "유럽/빙고", + "Europe/Chisinau": "유럽/치사 나우", + "Europe/Copenhagen": "유럽/코펜하겐", + "Europe/Dublin": "유럽/더블린", + "Europe/Gibraltar": "유럽/지브롤터", + "Europe/Guernsey": "유럽/건지", + "Europe/Helsinki": "유럽/헬싱키", + "Europe/Isle_of_Man": "유럽/아일 오브 맨", + "Europe/Istanbul": "유럽/이스탄불", + "Europe/Jersey": "유럽/저지", + "Europe/Kaliningrad": "유럽/칼리닌그라드", + "Europe/Kiev": "유럽/키예프", + "Europe/Kirov": "유럽/키로프", + "Europe/Lisbon": "유럽/리스본", + "Europe/Ljubljana": "유럽/류블 랴나", + "Europe/London": "유럽/런던", + "Europe/Luxembourg": "유럽/룩셈부르크", + "Europe/Madrid": "유럽/마드리드", + "Europe/Malta": "유럽/몰타", + "Europe/Mariehamn": "유럽/마리에 함", + "Europe/Minsk": "유럽/민스크", + "Europe/Monaco": "유럽/모나코", + "Europe/Moscow": "유럽/모스크바", + "Europe/Nicosia": "유럽/니코 시아", + "Europe/Oslo": "유럽/오슬로", + "Europe/Paris": "유럽/파리", + "Europe/Podgorica": "유럽/포드로 리카", + "Europe/Prague": "유럽/프라하", + "Europe/Riga": "유럽/리가", + "Europe/Rome": "유럽/로마", + "Europe/Samara": "유럽/사마라", + "Europe/San_Marino": "유럽/산 마리노", + "Europe/Sarajevo": "유럽/사라예보", + "Europe/Saratov": "유럽/사라 토프", + "Europe/Simferopol": "유럽/심 페로 폴", + "Europe/Skopje": "유럽/스코 페", + "Europe/Sofia": "유럽/소피아", + "Europe/Stockholm": "유럽/스톡홀름", + "Europe/Tallinn": "유럽/탈린", + "Europe/Tirane": "유럽/티 라네", + "Europe/Tiraspol": "유럽/티라스 폴", + "Europe/Ulyanovsk": "유럽/울리 야놉 스크", + "Europe/Uzhgorod": "유럽/우즈 고로드", + "Europe/Vaduz": "유럽/파두 츠", + "Europe/Vatican": "유럽/바티칸", + "Europe/Vienna": "유럽/비엔나", + "Europe/Vilnius": "유럽/빌니우스", + "Europe/Volgograd": "유럽/볼고그라드", + "Europe/Warsaw": "유럽/바르샤바", + "Europe/Zagreb": "유럽/자그레브", + "Europe/Zaporozhye": "유럽/자포 로제", + "Europe/Zurich": "유럽/취리히", + "GB": "GB", + "GB-Eire": "GB-Eire", + "GMT": "GMT", + "GMT+0": "GMT+0", + "GMT-0": "GMT-0", + "GMT0": "GMT0", + "Greenwich": "그리니치", + "HST": "HST", + "Hongkong": "홍콩", + "Iceland": "아이슬란드", + "Indian/Antananarivo": "인도/안타나나리보", + "Indian/Chagos": "인도/차고 스", + "Indian/Christmas": "인도/크리스마스", + "Indian/Cocos": "인도/코코스", + "Indian/Comoro": "인도/코모로", + "Indian/Kerguelen": "인도/케르겔렌", + "Indian/Mahe": "인도/마헤", + "Indian/Maldives": "인도/몰디브", + "Indian/Mauritius": "인도/모리셔스", + "Indian/Mayotte": "인도/마 요트", + "Indian/Reunion": "인도/리유니언", + "Iran": "이란", + "Israel": "이스라엘", + "Jamaica": "자메이카", + "Japan": "일본", + "Kwajalein": "콰잘 레인", + "Libya": "리비아", + "MET": "MET", + "MST": "MST", + "MST7MDT": "MST7MDT", + "Mexico/BajaNorte": "멕시코/바하 노르 테", + "Mexico/BajaSur": "멕시코/바하 수르", + "Mexico/General": "멕시코/제너럴", + "NZ": "NZ", + "NZ-CHAT": "NZ-CHAT", + "Navajo": "나바호", + "PRC": "PRC", + "PST8PDT": "PST8PDT", + "Pacific/Apia": "태평양/아피아", + "Pacific/Auckland": "태평양/오클랜드", + "Pacific/Bougainville": "태평양/부 겐빌", + "Pacific/Chatham": "태평양/채텀", + "Pacific/Chuuk": "태평양/축", + "Pacific/Easter": "태평양/이스터", + "Pacific/Efate": "태평양/이파테", + "Pacific/Enderbury": "태평양/엔더버리", + "Pacific/Fakaofo": "태평양/파카오포", + "Pacific/Fiji": "태평양/피지", + "Pacific/Funafuti": "태평양/후나후티", + "Pacific/Galapagos": "태평양/갈라파고스", + "Pacific/Gambier": "태평양/겜비어", + "Pacific/Guadalcanal": "태평양/과달카날", + "Pacific/Guam": "태평양/괌", + "Pacific/Honolulu": "태평양/호놀룰루", + "Pacific/Johnston": "태평양/존스턴", + "Pacific/Kiritimati": "태평양/키리 티 마티", + "Pacific/Kosrae": "태평양/코스 라에", + "Pacific/Kwajalein": "태평양/콰자 레인", + "Pacific/Majuro": "태평양/마주로", + "Pacific/Marquesas": "태평양/마르크사", + "Pacific/Midway": "퍼시픽/미드웨이", + "Pacific/Nauru": "태평양/나우루", + "Pacific/Niue": "태평양/니우에", + "Pacific/Norfolk": "태평양/노퍽", + "Pacific/Noumea": "태평양/누메아", + "Pacific/Pago_Pago": "태평양/파고 파고", + "Pacific/Palau": "태평양/팔라우", + "Pacific/Pitcairn": "태평양/핏 케언", + "Pacific/Pohnpei": "태평양/퐁 페이", + "Pacific/Ponape": "태평양/포네이프", + "Pacific/Port_Moresby": "태평양/포트 모르즈비", + "Pacific/Rarotonga": "태평양/로로 통가", + "Pacific/Saipan": "태평양/사이판", + "Pacific/Samoa": "태평양/사모아", + "Pacific/Tahiti": "태평양/타히티", + "Pacific/Tarawa": "태평양/타라와", + "Pacific/Tongatapu": "태평양/통가 타푸", + "Pacific/Truk": "태평양/트럭", + "Pacific/Wake": "퍼시픽/웨이크", + "Pacific/Wallis": "태평양/왈리스", + "Pacific/Yap": "태평양/야프", + "Poland": "폴란드", + "Portugal": "포르투갈", + "ROC": "ROC", + "ROK": "ROK", + "Singapore": "싱가포르", + "Turkey": "터키", + "UCT": "UCT", + "US/Alaska": "미국/알래스카", + "US/Aleutian": "미국/알류 티안", + "US/Arizona": "미국/애리조나", + "US/Central": "미국/중앙", + "US/East-Indiana": "미국/동부 인디애나", + "US/Eastern": "미국/동부", + "US/Hawaii": "미국/하와이", + "US/Indiana-Starke": "미국/인디애나-스타크", + "US/Michigan": "미국/미시간", + "US/Mountain": "미국/마운틴", + "US/Pacific": "미국/태평양", + "US/Pacific-New": "미국/태평양 뉴", + "US/Samoa": "미국/사모아", + "UTC": "UTC", + "Universal": "유니버설", + "W-SU": "W-SU", + "WET": "WET", + "Zulu": "줄루" + } }, "group": { "label": "그룹", diff --git a/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts index fb0ed8e3..2c9f3c67 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.daesang.dev.ts @@ -45,7 +45,7 @@ export const environment: Environment = { locale: 'ko', hrInfoLocale: 'ko', startupHideWindow: false, - timezone: '+9' + timezone: 'Asia/Seoul' }, notification: { chatMessage: true diff --git a/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts index 9ba30fc0..0e68bcce 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.daesang.prod.ts @@ -45,7 +45,7 @@ export const environment: Environment = { locale: 'ko', hrInfoLocale: 'ko', startupHideWindow: false, - timezone: '+9' + timezone: 'Asia/Seoul' }, notification: { chatMessage: true diff --git a/projects/ucap-webmessenger-app/src/environments/environment.dev.ts b/projects/ucap-webmessenger-app/src/environments/environment.dev.ts index ad46be51..dac9ed7d 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.dev.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.dev.ts @@ -45,7 +45,7 @@ export const environment: Environment = { locale: 'ko', hrInfoLocale: 'ko', startupHideWindow: false, - timezone: '+9' + timezone: 'Asia/Seoul' }, notification: { chatMessage: true diff --git a/projects/ucap-webmessenger-app/src/environments/environment.prod.ts b/projects/ucap-webmessenger-app/src/environments/environment.prod.ts index 9d1196ac..37c9e464 100644 --- a/projects/ucap-webmessenger-app/src/environments/environment.prod.ts +++ b/projects/ucap-webmessenger-app/src/environments/environment.prod.ts @@ -45,7 +45,7 @@ export const environment: Environment = { locale: 'ko', hrInfoLocale: 'ko', startupHideWindow: false, - timezone: '+9' + timezone: 'Asia/Seoul' }, notification: { chatMessage: true diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/date-splitter.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/date-splitter.component.html index 77116ff6..a5f439bd 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/date-splitter.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/date-splitter.component.html @@ -1,7 +1,7 @@
    {{ - this.message.sendDate | dateToStringFormat: 'YYYY.MM.DD KL' + this.message.sendDate | ucapDate: 'YYYY.MM.DD dddd' }}
    diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html index 2024e311..b1d43fcd 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html @@ -18,7 +18,7 @@ {{ message.title }} - {{ message.regDate | dateToStringFormat: 'MM:DD' }} + {{ message.regDate | ucapDate: 'MM:DD' }} diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html index 9cc80548..58f2c85d 100644 --- a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html @@ -63,7 +63,9 @@
    - {{ roomInfo.finalEventDate | dateToStringChatList }} + + {{ roomInfo.finalEventDate | ucapDate: 'C' }}
    diff --git a/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.html b/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.html index b4e1867d..f5841e09 100644 --- a/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.html +++ b/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.html @@ -118,11 +118,11 @@ [value]="setting.timezone" (selectionChange)="onSelectionChangeTimezone($event)" > - - 한국어 (대한민국) - - - 영어 (미국) + + {{ timezone.displayName }} diff --git a/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.ts b/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.ts index 8c41ddb2..e112777e 100644 --- a/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.ts +++ b/projects/ucap-webmessenger-ui-settings/src/lib/components/general.component.ts @@ -5,8 +5,13 @@ import { Output, EventEmitter, Input, - ViewChild + ViewChild, + OnDestroy } from '@angular/core'; + +import moment from 'moment'; +import 'moment-timezone'; + import { MatTabChangeEvent, MatTabGroup, @@ -14,13 +19,22 @@ import { MatSelectChange } from '@angular/material'; import { GeneralSetting } from '../models/settings'; +import { NGXLogger } from 'ngx-logger'; +import { TranslateService } from '@ngx-translate/core'; +import { take } from 'rxjs/operators'; +import { Subscription, merge } from 'rxjs'; + +export interface TimezoneData { + displayName: string; + name: string; +} @Component({ selector: 'ucap-settings-general', templateUrl: './general.component.html', styleUrls: ['./general.component.scss'] }) -export class GeneralComponent implements OnInit { +export class GeneralComponent implements OnInit, OnDestroy { @Input() setting: GeneralSetting; @@ -30,10 +44,27 @@ export class GeneralComponent implements OnInit { @ViewChild('themeTabGroup', { static: true }) themeTabGroup: MatTabGroup; - constructor(private changeDetectorRef: ChangeDetectorRef) {} + get timezoneList(): TimezoneData[] { + return this._timezoneList; + } + set timezoneList(timezoneList: TimezoneData[]) { + this._timezoneList = timezoneList; + } + // tslint:disable-next-line: variable-name + _timezoneList: TimezoneData[]; + + langChangeSubscription: Subscription; + + constructor( + private translateService: TranslateService, + private changeDetectorRef: ChangeDetectorRef, + private logger: NGXLogger + ) { + moment.locale('ko'); + } ngOnInit() { - let themeIndex; + let themeIndex: number; switch (this.setting.appTheme) { case 'theme-default': themeIndex = 0; @@ -46,6 +77,22 @@ export class GeneralComponent implements OnInit { break; } this.themeTabGroup.selectedIndex = themeIndex; + + this.setTimezoneData(); + + this.langChangeSubscription = merge( + this.translateService.onLangChange, + this.translateService.onDefaultLangChange, + this.translateService.onTranslationChange + ).subscribe(() => { + this.setTimezoneData(); + }); + } + + ngOnDestroy(): void { + if (!!this.langChangeSubscription) { + this.langChangeSubscription.unsubscribe(); + } } onSelectedTabChange(e: MatTabChangeEvent) { @@ -93,4 +140,27 @@ export class GeneralComponent implements OnInit { this.setting = setting; this.changed.emit(this.setting); } + + private setTimezoneData() { + this.translateService + .get('common.timezone') + .pipe(take(1)) + .subscribe(timezoneData => { + let timezoneList: TimezoneData[] = []; + for (const name of moment.tz.names()) { + const displayName = `(UTC${moment.tz(name).format('Z')}) ${ + timezoneData[name] + }`; + timezoneList.push({ + displayName, + name + }); + } + timezoneList = timezoneList.sort((a: TimezoneData, b: TimezoneData) => { + return a.displayName.localeCompare(b.displayName); + }); + + this.timezoneList = timezoneList; + }); + } } diff --git a/projects/ucap-webmessenger-ui/src/lib/pipes/date.pipe.ts b/projects/ucap-webmessenger-ui/src/lib/pipes/date.pipe.ts new file mode 100644 index 00000000..b600798b --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/pipes/date.pipe.ts @@ -0,0 +1,128 @@ +import { + Injectable, + Pipe, + PipeTransform, + OnDestroy, + ChangeDetectorRef +} from '@angular/core'; +import { Subscription } from 'rxjs'; +import { ObjectUtil } from '@ucap-webmessenger/core'; + +import { DateService, DateOptions } from '../services/date.service'; + +@Injectable() +@Pipe({ + name: 'ucapDate', + pure: false // required to update the value when the promise is resolved +}) +export class DatePipe implements PipeTransform, OnDestroy { + value = ''; + lastDate: any; + lastFormat: string; + lastOptions: DateOptions; + changedLocaleSubscription: Subscription; + changedTimezoneSubscription: Subscription; + changedDefaultTimezoneSubscription: Subscription; + + constructor( + private dateService: DateService, + private changeDetectorRef: ChangeDetectorRef + ) {} + + ngOnDestroy(): void { + this._dispose(); + } + + transform(date: any, format: string = 'L', options?: DateOptions): any { + if (!date || 0 === date.length) { + return ''; + } + + if ( + ObjectUtil.equals(date, this.lastDate) && + ObjectUtil.equals(format, this.lastFormat) && + ObjectUtil.equals(options, this.lastOptions) + ) { + return this.value; + } + + // store the target, in case it changes + this.lastDate = date; + // store the key, in case it changes + this.lastFormat = format; + // store the key, in case it changes + this.lastOptions = options; + + // set the value + this.updateValue(date, format, options); + + // if there is a subscription to onLangChange, clean it + this._dispose(); + + // subscribe to onLangChange event, in case the language changes + if (!this.changedTimezoneSubscription) { + this.changedTimezoneSubscription = this.dateService.changedTimezone.subscribe( + () => { + if (this.lastDate) { + this.lastDate = null; // we want to make sure it doesn't return the same value until it's been updated + this.updateValue(date, format, options); + } + } + ); + } + + // subscribe to onDefaultLangChange event, in case the default language changes + if (!this.changedDefaultTimezoneSubscription) { + this.changedDefaultTimezoneSubscription = this.dateService.changedDefaultTimezone.subscribe( + () => { + if (this.lastDate) { + this.lastDate = null; // we want to make sure it doesn't return the same value until it's been updated + this.updateValue(date, format, options); + } + } + ); + } + + // subscribe to onDefaultLangChange event, in case the default language changes + if (!this.changedLocaleSubscription) { + this.changedLocaleSubscription = this.dateService.changedLocale.subscribe( + () => { + if (this.lastDate) { + this.lastDate = null; // we want to make sure it doesn't return the same value until it's been updated + this.updateValue(date, format, options); + } + } + ); + } + + return this.value; + } + + updateValue(date: any, format: string = 'L', options?: DateOptions): void { + try { + const value = this.dateService.get(date, format, options); + this.value = value; + } catch (error) { + this.value = date; + } + this.lastDate = date; + this.lastFormat = format; + this.lastOptions = options; + this.changeDetectorRef.markForCheck(); + } + + private _dispose(): void { + if (!!this.changedTimezoneSubscription) { + this.changedTimezoneSubscription.unsubscribe(); + this.changedTimezoneSubscription = undefined; + } + if (!!this.changedDefaultTimezoneSubscription) { + this.changedDefaultTimezoneSubscription.unsubscribe(); + this.changedDefaultTimezoneSubscription = undefined; + } + if (!!this.changedLocaleSubscription) { + this.changedLocaleSubscription.unsubscribe(); + this.changedLocaleSubscription = undefined; + } + } +} diff --git a/projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe.ts b/projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe.ts index 8208e629..98281d17 100644 --- a/projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe.ts +++ b/projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe.ts @@ -22,8 +22,8 @@ export class TranslatePipe implements PipeTransform, OnDestroy { lastTarget: any; lastKey: string; lastSeparator: string; - onLangChange: Subscription; - onDefaultLangChange: Subscription; + changedLangSubscription: Subscription; + changedDefaultLangSubscription: Subscription; constructor( private translateService: TranslateService, @@ -75,8 +75,8 @@ export class TranslatePipe implements PipeTransform, OnDestroy { this._dispose(); // subscribe to onLangChange event, in case the language changes - if (!this.onLangChange) { - this.onLangChange = this.translateService.onLangChange.subscribe( + if (!this.changedLangSubscription) { + this.changedLangSubscription = this.translateService.changedLang.subscribe( (event: LangChangeEvent) => { if (this.lastKey) { this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated @@ -87,8 +87,8 @@ export class TranslatePipe implements PipeTransform, OnDestroy { } // subscribe to onDefaultLangChange event, in case the default language changes - if (!this.onDefaultLangChange) { - this.onDefaultLangChange = this.translateService.onDefaultLangChange.subscribe( + if (!this.changedDefaultLangSubscription) { + this.changedDefaultLangSubscription = this.translateService.changedDefaultLang.subscribe( () => { if (this.lastKey) { this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated @@ -105,13 +105,13 @@ export class TranslatePipe implements PipeTransform, OnDestroy { * Clean any existing subscription to change events */ private _dispose(): void { - if (typeof this.onLangChange !== 'undefined') { - this.onLangChange.unsubscribe(); - this.onLangChange = undefined; + if (!!this.changedLangSubscription) { + this.changedLangSubscription.unsubscribe(); + this.changedLangSubscription = undefined; } - if (typeof this.onDefaultLangChange !== 'undefined') { - this.onDefaultLangChange.unsubscribe(); - this.onDefaultLangChange = undefined; + if (!!this.changedDefaultLangSubscription) { + this.changedDefaultLangSubscription.unsubscribe(); + this.changedDefaultLangSubscription = undefined; } } diff --git a/projects/ucap-webmessenger-ui/src/lib/services/date.service.ts b/projects/ucap-webmessenger-ui/src/lib/services/date.service.ts new file mode 100644 index 00000000..8883bcce --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/services/date.service.ts @@ -0,0 +1,272 @@ +import { Injectable, EventEmitter } from '@angular/core'; + +import moment from 'moment'; +import 'moment-timezone'; +import { + TranslateService, + LangChangeEvent, + DefaultLangChangeEvent +} from '@ngx-translate/core'; +import { Subscription } from 'rxjs'; + +export type DateUnit = + | 'year' + | 'years' + | 'y' + | 'month' + | 'months' + | 'M' + | 'week' + | 'weeks' + | 'w' + | 'day' + | 'days' + | 'd' + | 'hour' + | 'hours' + | 'h' + | 'minute' + | 'minutes' + | 'm' + | 'second' + | 'seconds' + | 's' + | 'millisecond' + | 'milliseconds' + | 'ms'; + +export interface DateOptions { + manipulate?: { + amount?: number; + unit?: DateUnit; + startOf?: DateUnit; + endOf?: DateUnit; + }; +} + +export interface TimezoneChangeEvent { + name: string; +} + +export interface DefaultTimezoneChangeEvent { + name: string; +} + +export interface LocaleChangeEvent { + locale: string; +} + +@Injectable({ + providedIn: 'root' +}) +export class DateService { + // tslint:disable-next-line: variable-name + private _changedTimezone: EventEmitter< + TimezoneChangeEvent + > = new EventEmitter(); + // tslint:disable-next-line: variable-name + private _changedDefaultTimezone: EventEmitter< + DefaultTimezoneChangeEvent + > = new EventEmitter(); + // tslint:disable-next-line: variable-name + private _changedLocale: EventEmitter = new EventEmitter< + LocaleChangeEvent + >(); + + private onLangChangeSubscription: Subscription; + + // tslint:disable-next-line: variable-name + private _defaultTimezone: string; + // tslint:disable-next-line: variable-name + private _currentTimezone: string; + // tslint:disable-next-line: variable-name + private _currentLocale: string; + + get changedTimezone(): EventEmitter { + return this._changedTimezone; + } + + get changedDefaultTimezone() { + return this._changedDefaultTimezone; + } + + get changedLocale() { + return this._changedLocale; + } + + /** + * The default lang to fallback when translations are missing on the current lang + */ + get defaultTimezone(): string { + return this._defaultTimezone; + } + + set defaultTimezone(defaultTimezone: string) { + this._defaultTimezone = defaultTimezone; + } + + /** + * The lang currently used + */ + get currentTimezone(): string { + return this._currentTimezone; + } + + set currentTimezone(currentTimezone: string) { + this._currentTimezone = currentTimezone; + } + + /** + * The locale currently used + */ + get currentLocale(): string { + return this._currentLocale; + } + + set currentLocale(currentLocale: string) { + this._currentLocale = currentLocale; + } + + constructor(private translateService: TranslateService) { + this.onLangChangeSubscription = this.translateService.onLangChange.subscribe( + (event: LangChangeEvent) => { + if (this._currentLocale !== event.lang) { + this.changeLocale(event.lang); + } + } + ); + } + + /** + * Sets the default language to use as a fallback + */ + setDefaultTimezone(timezone: string): void { + if (timezone === this.defaultTimezone) { + return; + } + + this.changeDefaultTimezone(timezone); + } + + /** + * Gets the default language used + */ + getDefaultTimezone(): string { + return this.defaultTimezone; + } + + /** + * Sets the default language to use as a fallback + */ + setLocale(locale: string): void { + if (locale === this.currentLocale) { + return; + } + + this.changeLocale(locale); + } + + /** + * Gets the default language used + */ + getLocale(): string { + return this.currentLocale; + } + + /** + * Changes the lang currently used + */ + public use(timezone: string): void { + // don't change the language if the language given is already selected + if (timezone === this.currentTimezone) { + return; + } + + this.changeTimezone(timezone); + } + + /** + * Gets the translated value of a key (or an array of keys) + * @returns the translated key, or an object of translated keys + */ + public get(date: any, format: string = 'L', options?: DateOptions): string { + if (!date || 0 === date.length) { + throw new Error(`Parameter "date" required`); + } + + let d = moment.tz(date, 'Asia/Seoul').utc(); + + d = d.tz(this.currentTimezone); + + if (!!options) { + if (!!options.manipulate) { + if (!!options.manipulate.amount && !!options.manipulate.unit) { + d = d.add(options.manipulate.amount, options.manipulate.unit); + } + + if (!!options.manipulate.startOf) { + d = d.startOf(options.manipulate.startOf); + } + if (!!options.manipulate.endOf) { + d = d.startOf(options.manipulate.endOf); + } + } + } + + if ('C' === format) { + return this.chatFormat(d); + } + + return d.format(format); + } + + /** + * Changes the current lang + */ + private changeTimezone(timezone: string): void { + this.currentTimezone = timezone; + this.changedTimezone.emit({ name: timezone }); + + // if there is no default lang, use the one that we just set + if (!this.defaultTimezone) { + this.changeDefaultTimezone(timezone); + } + } + + /** + * Changes the default lang + */ + private changeDefaultTimezone(timezone: string): void { + this.defaultTimezone = timezone; + this.changedDefaultTimezone.emit({ name: timezone }); + } + + /** + * Changes the default lang + */ + private changeLocale(locale: string): void { + this.currentLocale = locale; + moment.locale(locale); + this.changedLocale.emit({ locale }); + } + + private chatFormat(m: moment.Moment): string { + const today = moment(); + const yesterday = moment().subtract(1, 'day'); + + if (m.isSame(today, 'day')) { + return m.format('a hh:mm'); + } else if (m.isSame(yesterday, 'day')) { + return moment + .localeData() + .calendar('lastDay') + .replace('LT', '') + .replace('[', '') + .replace(']', '') + .replace('at', '') + .trim(); + } else { + return m.format('MM.DD'); + } + } +} diff --git a/projects/ucap-webmessenger-ui/src/lib/services/translate.service.ts b/projects/ucap-webmessenger-ui/src/lib/services/translate.service.ts index 15d445c3..1ea6234e 100644 --- a/projects/ucap-webmessenger-ui/src/lib/services/translate.service.ts +++ b/projects/ucap-webmessenger-ui/src/lib/services/translate.service.ts @@ -13,11 +13,11 @@ export interface DefaultLangChangeEvent { }) export class TranslateService { // tslint:disable-next-line: variable-name - private _onLangChange: EventEmitter = new EventEmitter< + private _changedLang: EventEmitter = new EventEmitter< LangChangeEvent >(); // tslint:disable-next-line: variable-name - private _onDefaultLangChange: EventEmitter< + private _changedDefaultLang: EventEmitter< DefaultLangChangeEvent > = new EventEmitter(); // tslint:disable-next-line: variable-name @@ -31,8 +31,8 @@ export class TranslateService { * // do something * }); */ - get onLangChange(): EventEmitter { - return this._onLangChange; + get changedLang(): EventEmitter { + return this._changedLang; } /** @@ -41,8 +41,8 @@ export class TranslateService { * // do something * }); */ - get onDefaultLangChange() { - return this._onDefaultLangChange; + get changedDefaultLang() { + return this._changedDefaultLang; } /** @@ -143,7 +143,7 @@ export class TranslateService { */ private changeLang(lang: string): void { this.currentLang = lang; - this.onLangChange.emit({ lang }); + this.changedLang.emit({ lang }); // if there is no default lang, use the one that we just set if (!this.defaultLang) { @@ -156,6 +156,6 @@ export class TranslateService { */ private changeDefaultLang(lang: string): void { this.defaultLang = lang; - this.onDefaultLangChange.emit({ lang }); + this.changedDefaultLang.emit({ lang }); } } diff --git a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts index b41ebf0d..fb84ce3c 100644 --- a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts +++ b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts @@ -44,6 +44,7 @@ import { DialogService } from './services/dialog.service'; import { SnackBarService } from './services/snack-bar.service'; import { SplashScreenService } from './services/splash-screen.service'; import { TranslateService } from './services/translate.service'; +import { DateService } from './services/date.service'; import { ClickOutsideDirective } from './directives/click-outside.directive'; import { FileUploadForDirective } from './directives/file-upload-for.directive'; @@ -63,6 +64,7 @@ import { import { SecondsToMinutesPipe } from './pipes/seconds-to-minutes.pipe'; import { LinkyPipe } from './pipes/linky.pipe'; import { TranslatePipe } from './pipes/translate.pipe'; +import { DatePipe } from './pipes/date.pipe'; import { MatTabsModule } from '@angular/material'; @@ -99,7 +101,8 @@ const PIPES = [ DateDistanceToDatePipe, SecondsToMinutesPipe, LinkyPipe, - TranslatePipe + TranslatePipe, + DatePipe ]; const SERVICES = [ BottomSheetService, @@ -107,7 +110,8 @@ const SERVICES = [ DialogService, SnackBarService, SplashScreenService, - TranslateService + TranslateService, + DateService ]; @NgModule({ diff --git a/projects/ucap-webmessenger-ui/src/public-api.ts b/projects/ucap-webmessenger-ui/src/public-api.ts index 118f1af5..0c69fba6 100644 --- a/projects/ucap-webmessenger-ui/src/public-api.ts +++ b/projects/ucap-webmessenger-ui/src/public-api.ts @@ -34,6 +34,7 @@ export * from './lib/services/dialog.service'; export * from './lib/services/snack-bar.service'; export * from './lib/services/splash-screen.service'; export * from './lib/services/translate.service'; +export * from './lib/services/date.service'; export * from './lib/types/file-viewer.type';