feat: 다국어 지원 및 다중 통화 환율 변환 기능 확대
- ExchangeRateService에 JPY, CNY 환율 지원 추가 - 구독 서비스별 다국어 표시 이름 지원 - 분석 화면 차트 및 UI/UX 개선 - 설정 화면 전면 리팩토링 - SMS 스캔 기능 사용성 개선 - 전체 앱 다국어 번역 확대 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
|
||||
/// 카테고리별 구독 그룹의 헤더 위젯
|
||||
///
|
||||
@@ -10,6 +11,8 @@ class CategoryHeaderWidget extends StatelessWidget {
|
||||
final int subscriptionCount;
|
||||
final double totalCostUSD;
|
||||
final double totalCostKRW;
|
||||
final double totalCostJPY;
|
||||
final double totalCostCNY;
|
||||
|
||||
const CategoryHeaderWidget({
|
||||
Key? key,
|
||||
@@ -17,6 +20,8 @@ class CategoryHeaderWidget extends StatelessWidget {
|
||||
required this.subscriptionCount,
|
||||
required this.totalCostUSD,
|
||||
required this.totalCostKRW,
|
||||
required this.totalCostJPY,
|
||||
required this.totalCostCNY,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -38,7 +43,7 @@ class CategoryHeaderWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
_buildCostDisplay(),
|
||||
_buildCostDisplay(context),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -59,11 +64,11 @@ class CategoryHeaderWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 통화별 합계를 표시하는 문자열을 생성합니다.
|
||||
String _buildCostDisplay() {
|
||||
String _buildCostDisplay(BuildContext context) {
|
||||
final parts = <String>[];
|
||||
|
||||
// 개수는 항상 표시
|
||||
parts.add('$subscriptionCount개');
|
||||
parts.add(AppLocalizations.of(context).subscriptionCount(subscriptionCount));
|
||||
|
||||
// 통화 부분을 별도로 처리
|
||||
final currencyParts = <String>[];
|
||||
@@ -88,6 +93,26 @@ class CategoryHeaderWidget extends StatelessWidget {
|
||||
currencyParts.add(formatter.format(totalCostKRW));
|
||||
}
|
||||
|
||||
// 엔화가 있는 경우
|
||||
if (totalCostJPY > 0) {
|
||||
final formatter = NumberFormat.currency(
|
||||
locale: 'ja_JP',
|
||||
symbol: '¥',
|
||||
decimalDigits: 0,
|
||||
);
|
||||
currencyParts.add(formatter.format(totalCostJPY));
|
||||
}
|
||||
|
||||
// 위안화가 있는 경우
|
||||
if (totalCostCNY > 0) {
|
||||
final formatter = NumberFormat.currency(
|
||||
locale: 'zh_CN',
|
||||
symbol: '¥',
|
||||
decimalDigits: 2,
|
||||
);
|
||||
currencyParts.add(formatter.format(totalCostCNY));
|
||||
}
|
||||
|
||||
// 통화가 하나 이상 있는 경우
|
||||
if (currencyParts.isNotEmpty) {
|
||||
// 통화가 여러 개인 경우 + 로 연결, 하나인 경우 그대로
|
||||
|
||||
Reference in New Issue
Block a user