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,8 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../models/subscription_model.dart';
|
||||
import '../../services/currency_util.dart';
|
||||
import '../../providers/locale_provider.dart';
|
||||
import '../../theme/app_colors.dart';
|
||||
import '../../l10n/app_localizations.dart';
|
||||
|
||||
/// 파이 차트에서 선택된 섹션에 표시되는 배지 위젯
|
||||
class AnalysisBadge extends StatelessWidget {
|
||||
@@ -54,17 +57,26 @@ class AnalysisBadge extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 0),
|
||||
FutureBuilder<String>(
|
||||
future: CurrencyUtil.formatAmount(
|
||||
future: CurrencyUtil.formatAmountWithLocale(
|
||||
subscription.monthlyCost,
|
||||
subscription.currency,
|
||||
context.read<LocaleProvider>().locale.languageCode,
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
final amountText = snapshot.data!;
|
||||
// 금액이 너무 길면 축약
|
||||
final displayText = amountText.length > 8
|
||||
? amountText.replaceAll('원', '').trim()
|
||||
: amountText;
|
||||
// 금액이 너무 길면 축약 (괄호 제거)
|
||||
String displayText = amountText;
|
||||
if (amountText.length > 12) {
|
||||
// 괄호 안의 내용 제거
|
||||
displayText = amountText.replaceAll(RegExp(r'\([^)]*\)'), '').trim();
|
||||
}
|
||||
if (displayText.length > 10) {
|
||||
// 통화 기호만 남기고 숫자만 표시
|
||||
final currencySymbol = CurrencyUtil.getCurrencySymbol(subscription.currency);
|
||||
displayText = displayText.replaceAll(currencySymbol, '').trim();
|
||||
displayText = '$currencySymbol${displayText.substring(0, 6)}...';
|
||||
}
|
||||
return Text(
|
||||
displayText,
|
||||
style: const TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user