diff --git a/docs/20260508_국제화도입.md b/docs/20260508_국제화도입.md index de64875..7145a12 100644 --- a/docs/20260508_국제화도입.md +++ b/docs/20260508_국제화도입.md @@ -16,15 +16,15 @@ - [x] 날짜/숫자/통화 포맷 정책 적용(ja: JPY 소수점 미사용 등) - [x] 하드코딩 탐지/미번역 키 점검(정규식 스캔 + missing 핸들러) - [x] 언어 전환 UX(드롭다운) 및 영속 저장(localStorage) - - [ ] P2: 레거시 정산 화면(`views/Calculate/*`) i18n 치환 - - [ ] 공통 키 정의(`view.calculate.common.*`, 단위 `common.unit.*` 보강) - - [ ] `CalculateLive.vue` 텍스트/헤더/합계/오류 치환 - - [ ] `CalculateContent.vue` 텍스트/헤더/합계/오류 치환 - - [ ] `CalculateContentDonation.vue` 텍스트/헤더/합계/오류 치환 - - [ ] `CalculateCommunityPost.vue` 텍스트/헤더/합계/오류 치환 - - [ ] `CalculateChannelDonation.vue` 텍스트/헤더/합계/오류 치환 - - [ ] `CalculateAccumulation.vue` 텍스트/헤더/합계/오류 치환 - - [ ] 검증: `npm run i18n:scan`/런타임 전환 확인 기록 + - [x] P2: 레거시 정산 화면(`views/Calculate/*`) i18n 치환 + - [x] 공통 키 정의(`view.calculate.common.*`, 단위 `common.unit.*` 보강) + - [x] `CalculateLive.vue` 텍스트/헤더/합계/오류 치환 + - [x] `CalculateContent.vue` 텍스트/헤더/합계/오류 치환 + - [x] `CalculateContentDonation.vue` 텍스트/헤더/합계/오류 치환 + - [x] `CalculateCommunityPost.vue` 텍스트/헤더/합계/오류 치환 + - [x] `CalculateChannelDonation.vue` 텍스트/헤더/합계/오류 치환 + - [x] `CalculateAccumulation.vue` 텍스트/헤더/합계/오류 치환 + - [x] 검증: `npm run i18n:scan`/런타임 전환 확인 기록 - [ ] P3: 콘텐츠 관리(`views/Content/*`) i18n 치환 - [ ] 목록/상세/시리즈 화면 라벨/버튼/알림 메시지 치환(`view.content.*`) - [ ] 검증: `npm run i18n:scan`/런타임 전환 확인 기록 @@ -160,3 +160,19 @@ - 실행 명령 2: `npm run serve` 후 `ko ↔ en ↔ ja` 전환 - 확인 항목: 타이틀/필터 구분자/버튼/헤더/합계 단위가 즉시 전환됨 ✓ - 비고: 나머지 레거시 정산 파일은 P2-2차로 순차 치환 예정 + +### 6차 구현 – 레거시 정산 화면 치환(P2-2차) (2026-05-08) +- 무엇을: P2의 나머지 4개 화면(ContentDonation/CommunityPost/ChannelDonation/Accumulation)의 하드코딩 텍스트를 i18n으로 치환하고, 공통/화면별 키를 ko/en/ja 리소스에 추가함. 버튼/기간 구분자/헤더/합계 행/단위(건/캔/원) 및 오류 메시지를 일괄 적용. +- 왜: 업무 핵심 화면 전 범위에서 다국어 일관성과 유지보수성을 확보하기 위함 +- 어떻게: + - 변경 파일: + - `src/views/Calculate/CalculateContentDonation.vue`: 타이틀/기간/조회 버튼/헤더 computed 전환/단위/오류 메시지 i18n 치환 + - `src/views/Calculate/CalculateCommunityPost.vue`: 동일 범위 치환 + 합계 행 단위 치환 + - `src/views/Calculate/CalculateChannelDonation.vue`: 동일 범위 치환 + 합계 행 단위 치환(건/캔/원) + - `src/views/Calculate/CalculateAccumulation.vue`: 동일 범위 치환(등록일/판매금액(캔)/누적 판매수 등) + - `src/locales/{ko,en,ja}.json`: `view.calculate.{contentDonation,community,channelDonation,accumulation}.*`, `view.calculate.common.headers.count`, `common.unit.case` 추가 + - 실행 명령 1: `npm run i18n:scan` + - 기대 결과: 위 4개 파일 내 한/일문 하드코딩 라인이 0 또는 최소(주석) ✓ + - 실행 명령 2: `npm run serve` 후 `ko ↔ en ↔ ja` 전환 + - 확인 항목: 각 화면의 타이틀/기간 구분자/조회 버튼/테이블 헤더/합계 행 단위가 즉시 전환됨 ✓ + - 오류 핸들링: API 실패 시 `common.error.fetchFailed`로 통일 ✓ diff --git a/src/locales/en.json b/src/locales/en.json index 8a7c15c..f4f26fe 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -25,7 +25,8 @@ "unit": { "can": "CAN", "person": "people", - "krw": "KRW" + "krw": "KRW", + "case": "cases" }, "lang": { "ko": "한국어", @@ -68,6 +69,7 @@ "date": "Date", "title": "Title", "type": "Type", + "count": "Count", "totalCan": "Total (CAN)", "krw": "KRW", "fee": "Fee", @@ -92,6 +94,30 @@ "salesCount": "Sales count", "registrationDate": "Registration date" } + }, + "contentDonation": { + "title": "Content donation settlement", + "headers": { + "numberOfDonation": "Donation count" + } + }, + "community": { + "title": "Community settlement", + "headers": { + "contentPreview": "Content (first 10 chars)", + "orderPriceCan": "Sale amount (CAN)", + "numberOfPurchase": "Number of buyers" + } + }, + "channelDonation": { + "title": "Channel donation settlement" + }, + "accumulation": { + "title": "Cumulative status by content", + "headers": { + "orderPriceCan": "Sale amount (CAN)", + "numberOfPeople": "Cumulative sales count" + } } }, "login": { diff --git a/src/locales/ja.json b/src/locales/ja.json index 94a2af7..c97497d 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -25,7 +25,8 @@ "unit": { "can": "CAN", "person": "名", - "krw": "ウォン" + "krw": "ウォン", + "case": "件" }, "lang": { "ko": "한국어", @@ -68,6 +69,7 @@ "date": "日付", "title": "タイトル", "type": "区分", + "count": "件数", "totalCan": "合計(CAN)", "krw": "ウォン", "fee": "手数料", @@ -92,6 +94,30 @@ "salesCount": "販売数", "registrationDate": "登録日" } + }, + "contentDonation": { + "title": "コンテンツ支援精算", + "headers": { + "numberOfDonation": "支援数" + } + }, + "community": { + "title": "コミュニティ精算", + "headers": { + "contentPreview": "内容(先頭10文字)", + "orderPriceCan": "販売金額(CAN)", + "numberOfPurchase": "購入ユーザー数" + } + }, + "channelDonation": { + "title": "チャンネル支援精算" + }, + "accumulation": { + "title": "コンテンツ別累計状況", + "headers": { + "orderPriceCan": "販売金額(CAN)", + "numberOfPeople": "累計販売数" + } } }, "login": { diff --git a/src/locales/ko.json b/src/locales/ko.json index 3418f68..2518857 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -25,7 +25,8 @@ "unit": { "can": "캔", "person": "명", - "krw": "원" + "krw": "원", + "case": "건" }, "lang": { "ko": "한국어", @@ -68,6 +69,7 @@ "date": "날짜", "title": "제목", "type": "구분", + "count": "건수", "totalCan": "합계(캔)", "krw": "원화", "fee": "수수료", @@ -92,6 +94,30 @@ "salesCount": "판매수", "registrationDate": "등록일" } + }, + "contentDonation": { + "title": "콘텐츠 후원 정산", + "headers": { + "numberOfDonation": "후원수" + } + }, + "community": { + "title": "커뮤니티 정산", + "headers": { + "contentPreview": "내용(앞 10글자)", + "orderPriceCan": "판매금액(캔)", + "numberOfPurchase": "구매유저수" + } + }, + "channelDonation": { + "title": "채널 후원 정산" + }, + "accumulation": { + "title": "콘텐츠별 누적 현황", + "headers": { + "orderPriceCan": "판매금액(캔)", + "numberOfPeople": "누적 판매수" + } } }, "login": { diff --git a/src/views/Calculate/CalculateAccumulation.vue b/src/views/Calculate/CalculateAccumulation.vue index 3c6b14a..ce9df61 100644 --- a/src/views/Calculate/CalculateAccumulation.vue +++ b/src/views/Calculate/CalculateAccumulation.vue @@ -2,7 +2,7 @@
- 콘텐츠별 누적 현황 + {{ $t('view.calculate.accumulation.title') }} @@ -20,31 +20,31 @@ hide-default-footer > @@ -76,81 +76,25 @@ export default { page_size: 20, total_page: 0, items: [], - headers: [ - { - text: '크리에이터', - align: 'center', - sortable: false, - value: 'nickname', - }, - { - text: '등록일', - align: 'center', - sortable: false, - value: 'registrationDate', - }, - { - text: '제목', - sortable: false, - value: 'title', - align: 'center', - width: "300px" - }, - { - text: '구분', - align: 'center', - sortable: false, - value: 'orderType', - }, - { - text: '판매금액(캔)', - align: 'center', - sortable: false, - value: 'orderPrice', - }, - { - text: '누적 판매수', - align: 'center', - sortable: false, - value: 'numberOfPeople', - }, - { - text: '합계(캔)', - align: 'center', - sortable: false, - value: 'totalCan', - }, - { - text: '원화', - align: 'center', - sortable: false, - value: 'totalKrw', - }, - { - text: '수수료\n(6.6%)', - align: 'center', - sortable: false, - value: 'paymentFee', - }, - { - text: '정산금액', - align: 'center', - sortable: false, - value: 'settlementAmount', - }, - { - text: '원천세\n(3.3%)', - align: 'center', - sortable: false, - value: 'tax', - }, - { - text: '입금액', - align: 'center', - sortable: false, - value: 'depositAmount', - }, - ], + } + }, + + computed: { + headers() { + return [ + { text: this.$t('view.calculate.common.headers.creator'), align: 'center', sortable: false, value: 'nickname' }, + { text: this.$t('view.calculate.content.headers.registrationDate'), align: 'center', sortable: false, value: 'registrationDate' }, + { text: this.$t('view.calculate.common.headers.title'), align: 'center', sortable: false, value: 'title', width: '300px' }, + { text: this.$t('view.calculate.common.headers.type'), align: 'center', sortable: false, value: 'orderType' }, + { text: this.$t('view.calculate.accumulation.headers.orderPriceCan'), align: 'center', sortable: false, value: 'orderPrice' }, + { text: this.$t('view.calculate.accumulation.headers.numberOfPeople'), align: 'center', sortable: false, value: 'numberOfPeople' }, + { text: this.$t('view.calculate.common.headers.totalCan'), align: 'center', sortable: false, value: 'totalCan' }, + { text: this.$t('view.calculate.common.headers.krw'), align: 'center', sortable: false, value: 'totalKrw' }, + { text: this.$t('view.calculate.common.headers.feeWithPercent', { percent: '6.6%' }), align: 'center', sortable: false, value: 'paymentFee' }, + { text: this.$t('view.calculate.common.headers.settlementAmount'), align: 'center', sortable: false, value: 'settlementAmount' }, + { text: this.$t('view.calculate.common.headers.withholdingTaxWithPercent', { percent: '3.3%' }), align: 'center', sortable: false, value: 'tax' }, + { text: this.$t('view.calculate.common.headers.depositAmount'), align: 'center', sortable: false, value: 'depositAmount' }, + ] } }, @@ -191,12 +135,12 @@ export default { else this.total_page = totalPage } else { - this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(res.data.message || this.$t('common.error.fetchFailed')) } this.is_loading = false } catch (e) { - this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(this.$t('common.error.fetchFailed')) this.is_loading = false } } diff --git a/src/views/Calculate/CalculateChannelDonation.vue b/src/views/Calculate/CalculateChannelDonation.vue index fdd2359..246c511 100644 --- a/src/views/Calculate/CalculateChannelDonation.vue +++ b/src/views/Calculate/CalculateChannelDonation.vue @@ -2,7 +2,7 @@
- 채널 후원 정산 + {{ $t('view.calculate.channelDonation.title') }} @@ -19,7 +19,7 @@ - ~ + {{ $t('view.calculate.common.rangeSeparator') }} @@ -40,7 +40,7 @@ depressed @click="getCalculateChannelDonation" > - 조회 + {{ $t('view.calculate.common.search') }} @@ -60,58 +60,58 @@ @@ -149,62 +149,22 @@ export default { total_page: 0, items: [], total: null, - headers: [ - { - text: '날짜', - align: 'center', - sortable: false, - value: 'date', - }, - { - text: '크리에이터', - align: 'center', - sortable: false, - value: 'creator', - }, - { - text: '건수', - align: 'center', - sortable: false, - value: 'count', - }, - { - text: '캔', - align: 'center', - sortable: false, - value: 'totalCan', - }, - { - text: '원화', - align: 'center', - sortable: false, - value: 'krw', - }, - { - text: '수수료\n(6.6%)', - align: 'center', - sortable: false, - value: 'fee', - }, - { - text: '정산금액', - align: 'center', - sortable: false, - value: 'settlementAmount', - }, - { - text: '원천세\n(3.3%)', - align: 'center', - sortable: false, - value: 'withholdingTax', - }, - { - text: '입금액', - align: 'center', - sortable: false, - value: 'depositAmount', - }, - ], + } + }, + + computed: { + headers() { + return [ + { text: this.$t('view.calculate.common.headers.date'), align: 'center', sortable: false, value: 'date' }, + { text: this.$t('view.calculate.common.headers.creator'), align: 'center', sortable: false, value: 'creator' }, + { text: this.$t('view.calculate.common.headers.count'), align: 'center', sortable: false, value: 'count' }, + { text: this.$t('view.calculate.common.headers.totalCan'), align: 'center', sortable: false, value: 'totalCan' }, + { text: this.$t('view.calculate.common.headers.krw'), align: 'center', sortable: false, value: 'krw' }, + { text: this.$t('view.calculate.common.headers.feeWithPercent', { percent: '6.6%' }), align: 'center', sortable: false, value: 'fee' }, + { text: this.$t('view.calculate.common.headers.settlementAmount'), align: 'center', sortable: false, value: 'settlementAmount' }, + { text: this.$t('view.calculate.common.headers.withholdingTaxWithPercent', { percent: '3.3%' }), align: 'center', sortable: false, value: 'withholdingTax' }, + { text: this.$t('view.calculate.common.headers.depositAmount'), align: 'center', sortable: false, value: 'depositAmount' }, + ] } }, @@ -262,10 +222,10 @@ export default { this.total = res.data.data.total this.total_page = Math.ceil(res.data.data.totalCount / this.page_size) } else { - this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(res.data.message || this.$t('common.error.fetchFailed')) } } catch (e) { - this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(this.$t('common.error.fetchFailed')) } finally { this.is_loading = false } diff --git a/src/views/Calculate/CalculateCommunityPost.vue b/src/views/Calculate/CalculateCommunityPost.vue index 8ddc334..dc78788 100644 --- a/src/views/Calculate/CalculateCommunityPost.vue +++ b/src/views/Calculate/CalculateCommunityPost.vue @@ -2,7 +2,7 @@
- 커뮤니티 정산 + {{ $t('view.calculate.community.title') }} @@ -19,7 +19,7 @@ - ~ + {{ $t('view.calculate.common.rangeSeparator') }} @@ -40,7 +40,7 @@ depressed @click="getCalculateCommunityPost" > - 조회 + {{ $t('view.calculate.common.search') }} @@ -58,14 +58,14 @@ @@ -74,27 +74,27 @@ @@ -130,69 +130,23 @@ export default { page_size: 20, total_page: 0, items: [], - headers: [ - { - text: '날짜', - align: 'center', - sortable: false, - value: 'date', - }, - { - text: '내용(앞 10글자)', - sortable: false, - value: 'title', - align: 'center', - width: "300px" - }, - { - text: '판매금액(캔)', - align: 'center', - sortable: false, - value: 'can', - }, - { - text: '구매유저수', - align: 'center', - sortable: false, - value: 'numberOfPurchase', - }, - { - text: '합계(캔)', - align: 'center', - sortable: false, - value: 'totalCan', - }, - { - text: '원화', - align: 'center', - sortable: false, - value: 'totalKrw', - }, - { - text: '수수료\n(6.6%)', - align: 'center', - sortable: false, - value: 'paymentFee', - }, - { - text: '정산금액', - align: 'center', - sortable: false, - value: 'settlementAmount', - }, - { - text: '원천세\n(3.3%)', - align: 'center', - sortable: false, - value: 'tax', - }, - { - text: '입금액', - align: 'center', - sortable: false, - value: 'depositAmount', - } - ], + } + }, + + computed: { + headers() { + return [ + { text: this.$t('view.calculate.common.headers.date'), align: 'center', sortable: false, value: 'date' }, + { text: this.$t('view.calculate.community.headers.contentPreview'), align: 'center', sortable: false, value: 'title', width: '300px' }, + { text: this.$t('view.calculate.community.headers.orderPriceCan'), align: 'center', sortable: false, value: 'can' }, + { text: this.$t('view.calculate.community.headers.numberOfPurchase'), align: 'center', sortable: false, value: 'numberOfPurchase' }, + { text: this.$t('view.calculate.common.headers.totalCan'), align: 'center', sortable: false, value: 'totalCan' }, + { text: this.$t('view.calculate.common.headers.krw'), align: 'center', sortable: false, value: 'totalKrw' }, + { text: this.$t('view.calculate.common.headers.feeWithPercent', { percent: '6.6%' }), align: 'center', sortable: false, value: 'paymentFee' }, + { text: this.$t('view.calculate.common.headers.settlementAmount'), align: 'center', sortable: false, value: 'settlementAmount' }, + { text: this.$t('view.calculate.common.headers.withholdingTaxWithPercent', { percent: '3.3%' }), align: 'center', sortable: false, value: 'tax' }, + { text: this.$t('view.calculate.common.headers.depositAmount'), align: 'center', sortable: false, value: 'depositAmount' }, + ] } }, @@ -247,12 +201,12 @@ export default { else this.total_page = totalPage } else { - this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(res.data.message || this.$t('common.error.fetchFailed')) } this.is_loading = false } catch (e) { - this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(this.$t('common.error.fetchFailed')) this.is_loading = false } } diff --git a/src/views/Calculate/CalculateContentDonation.vue b/src/views/Calculate/CalculateContentDonation.vue index afda54c..3a2a395 100644 --- a/src/views/Calculate/CalculateContentDonation.vue +++ b/src/views/Calculate/CalculateContentDonation.vue @@ -2,7 +2,7 @@
- 콘텐츠 정산 + {{ $t('view.calculate.contentDonation.title') }} @@ -19,7 +19,7 @@ - ~ + {{ $t('view.calculate.common.rangeSeparator') }} @@ -40,7 +40,7 @@ depressed @click="getCalculateContentDonation" > - 조회 + {{ $t('view.calculate.common.search') }} @@ -58,27 +58,27 @@ hide-default-footer > @@ -114,81 +114,25 @@ export default { page_size: 20, total_page: 0, items: [], - headers: [ - { - text: '후원날짜', - align: 'center', - sortable: false, - value: 'donationDate', - }, - { - text: '크리에이터', - align: 'center', - sortable: false, - value: 'nickname', - }, - { - text: '콘텐츠 제목', - sortable: false, - value: 'title', - align: 'center', - width: "300px" - }, - { - text: '구분', - sortable: false, - value: 'paidOrFree', - align: 'center' - }, - { - text: '후원수', - align: 'center', - sortable: false, - value: 'numberOfDonation', - }, - { - text: '합계(캔)', - align: 'center', - sortable: false, - value: 'totalCan', - }, - { - text: '원화', - align: 'center', - sortable: false, - value: 'totalKrw', - }, - { - text: '수수료\n(6.6%)', - align: 'center', - sortable: false, - value: 'paymentFee', - }, - { - text: '정산금액', - align: 'center', - sortable: false, - value: 'settlementAmount', - }, - { - text: '원천세\n(3.3%)', - align: 'center', - sortable: false, - value: 'tax', - }, - { - text: '입금액', - align: 'center', - sortable: false, - value: 'depositAmount', - }, - { - text: '콘텐츠 등록일', - align: 'center', - sortable: false, - value: 'registrationDate', - }, - ], + } + }, + + computed: { + headers() { + return [ + { text: this.$t('view.calculate.common.headers.date'), align: 'center', sortable: false, value: 'donationDate' }, + { text: this.$t('view.calculate.common.headers.creator'), align: 'center', sortable: false, value: 'nickname' }, + { text: this.$t('view.calculate.common.headers.title'), align: 'center', sortable: false, value: 'title', width: '300px' }, + { text: this.$t('view.calculate.common.headers.type'), align: 'center', sortable: false, value: 'paidOrFree' }, + { text: this.$t('view.calculate.contentDonation.headers.numberOfDonation'), align: 'center', sortable: false, value: 'numberOfDonation' }, + { text: this.$t('view.calculate.common.headers.totalCan'), align: 'center', sortable: false, value: 'totalCan' }, + { text: this.$t('view.calculate.common.headers.krw'), align: 'center', sortable: false, value: 'totalKrw' }, + { text: this.$t('view.calculate.common.headers.feeWithPercent', { percent: '6.6%' }), align: 'center', sortable: false, value: 'paymentFee' }, + { text: this.$t('view.calculate.common.headers.settlementAmount'), align: 'center', sortable: false, value: 'settlementAmount' }, + { text: this.$t('view.calculate.common.headers.withholdingTaxWithPercent', { percent: '3.3%' }), align: 'center', sortable: false, value: 'tax' }, + { text: this.$t('view.calculate.common.headers.depositAmount'), align: 'center', sortable: false, value: 'depositAmount' }, + { text: this.$t('view.calculate.content.headers.registrationDate'), align: 'center', sortable: false, value: 'registrationDate' }, + ] } }, @@ -247,12 +191,12 @@ export default { else this.total_page = totalPage } else { - this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(res.data.message || this.$t('common.error.fetchFailed')) } this.is_loading = false } catch (e) { - this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.notifyError(this.$t('common.error.fetchFailed')) this.is_loading = false } }