feat(i18n): 공통/주요 화면 문자열 치환, 포맷 정책 적용, 언어 전환 UX 및 스캔 스크립트 추가

This commit is contained in:
Yu Sung
2026-05-08 14:09:58 +09:00
parent c2663a1e9d
commit 43d0ebc9ed
13 changed files with 459 additions and 178 deletions

View File

@@ -2,7 +2,7 @@
<div>
<v-toolbar dark>
<v-spacer />
<v-toolbar-title>크리에이터별 라이브 정산</v-toolbar-title>
<v-toolbar-title>{{ $t('comp.sideMenu.calc.live') }}</v-toolbar-title>
<v-spacer />
</v-toolbar>
@@ -29,7 +29,7 @@
<template v-slot:activator="{ on, attrs }">
<v-text-field
v-bind="attrs"
label="시작일"
:label="$t('view.agent.calculate.common.startDate')"
readonly
dense
:value="start_date"
@@ -58,7 +58,7 @@
<template v-slot:activator="{ on, attrs }">
<v-text-field
v-bind="attrs"
label="종료일"
:label="$t('view.agent.calculate.common.endDate')"
readonly
dense
:value="end_date"
@@ -82,7 +82,7 @@
:loading="is_loading"
@click="fetchItems"
>
조회
{{ $t('view.agent.calculate.common.search') }}
</v-btn>
</v-col>
</v-row>
@@ -99,38 +99,38 @@
>
<template slot="body.prepend">
<tr>
<td>합계</td>
<td>{{ (total.count || 0).toLocaleString() }}</td>
<td>{{ (total.totalCan || 0).toLocaleString() }} </td>
<td>{{ (total.krw || 0).toLocaleString() }} </td>
<td>{{ (total.fee || 0).toLocaleString() }} </td>
<td>{{ (total.settlementAmount || 0).toLocaleString() }} </td>
<td>{{ (total.tax || 0).toLocaleString() }} </td>
<td>{{ (total.depositAmount || 0).toLocaleString() }} </td>
<td>{{ (total.agentSettlementAmount || 0).toLocaleString() }} </td>
<td>{{ $t('view.agent.calculate.common.total') }}</td>
<td>{{ $n(total.count || 0, 'decimal') }}</td>
<td>{{ $n(total.totalCan || 0, 'decimal') }} {{ $t('common.unit.can') }}</td>
<td>{{ $n(total.krw || 0, 'currency') }}</td>
<td>{{ $n(total.fee || 0, 'currency') }}</td>
<td>{{ $n(total.settlementAmount || 0, 'currency') }}</td>
<td>{{ $n(total.tax || 0, 'currency') }}</td>
<td>{{ $n(total.depositAmount || 0, 'currency') }}</td>
<td>{{ $n(total.agentSettlementAmount || 0, 'currency') }}</td>
</tr>
</template>
<template v-slot:item.totalCan="{ item }">
{{ (item.totalCan || 0).toLocaleString() }}
{{ $n(item.totalCan || 0, 'decimal') }} {{ $t('common.unit.can') }}
</template>
<template v-slot:item.krw="{ item }">
{{ (item.krw || 0).toLocaleString() }}
{{ $n(item.krw || 0, 'currency') }}
</template>
<template v-slot:item.fee="{ item }">
{{ (item.fee || 0).toLocaleString() }}
{{ $n(item.fee || 0, 'currency') }}
</template>
<template v-slot:item.settlementAmount="{ item }">
{{ (item.settlementAmount || 0).toLocaleString() }}
{{ $n(item.settlementAmount || 0, 'currency') }}
</template>
<template v-slot:item.tax="{ item }">
{{ (item.tax || 0).toLocaleString() }}
{{ $n(item.tax || 0, 'currency') }}
</template>
<template v-slot:item.depositAmount="{ item }">
{{ (item.depositAmount || 0).toLocaleString() }}
{{ $n(item.depositAmount || 0, 'currency') }}
</template>
<template v-slot:item.agentSettlementAmount="{ item }">
{{ (item.agentSettlementAmount || 0).toLocaleString() }}
{{ $n(item.agentSettlementAmount || 0, 'currency') }}
</template>
</v-data-table>
</v-col>
@@ -177,16 +177,21 @@ export default {
depositAmount: 0,
agentSettlementAmount: 0
},
headers: [
{ text: '닉네임', value: 'creatorNickname', align: 'center', sortable: false },
{ text: '건수', value: 'count', align: 'center', sortable: false },
{ text: '총 CAN', value: 'totalCan', align: 'center', sortable: false },
{ text: '원화', value: 'krw', align: 'center', sortable: false },
{ text: '수수료', value: 'fee', align: 'center', sortable: false },
{ text: '정산금액', value: 'settlementAmount', align: 'center', sortable: false },
{ text: '세금', value: 'tax', align: 'center', sortable: false },
{ text: '입금액', value: 'depositAmount', align: 'center', sortable: false },
{ text: '에이전트 정산금액', value: 'agentSettlementAmount', align: 'center', sortable: false },
// headers는 locale 변경 시 computed에서 생성
}
},
computed: {
headers() {
return [
{ text: this.$t('view.agent.calculate.columns.nickname'), value: 'creatorNickname', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.count'), value: 'count', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.totalCan'), value: 'totalCan', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.krw'), value: 'krw', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.fee'), value: 'fee', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.settlementAmount'), value: 'settlementAmount', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.tax'), value: 'tax', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.depositAmount'), value: 'depositAmount', align: 'center', sortable: false },
{ text: this.$t('view.agent.calculate.columns.agentSettlementAmount'), value: 'agentSettlementAmount', align: 'center', sortable: false }
]
}
},
@@ -227,10 +232,10 @@ export default {
const totalPage = Math.ceil((data.totalCount || 0) / this.page_size)
this.total_page = totalPage > 0 ? totalPage : 1
} else {
this.notifyError(res.data?.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.notifyError(res.data?.message || this.$t('common.error.unknown'))
}
} catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.notifyError(this.$t('common.error.unknown'))
} finally {
this.is_loading = false
}