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:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import '../models/category_model.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
|
||||
class CategoryProvider extends ChangeNotifier {
|
||||
List<CategoryModel> _categories = [];
|
||||
@@ -9,16 +10,16 @@ class CategoryProvider extends ChangeNotifier {
|
||||
|
||||
// 카테고리 표시 순서 정의
|
||||
static const List<String> _categoryOrder = [
|
||||
'음악',
|
||||
'OTT(동영상)',
|
||||
'저장/클라우드',
|
||||
'통신 · 인터넷 · TV',
|
||||
'생활/라이프스타일',
|
||||
'쇼핑/이커머스',
|
||||
'프로그래밍',
|
||||
'협업/오피스',
|
||||
'AI 서비스',
|
||||
'기타',
|
||||
'music',
|
||||
'ottVideo',
|
||||
'storageCloud',
|
||||
'telecomInternetTv',
|
||||
'lifestyle',
|
||||
'shoppingEcommerce',
|
||||
'programming',
|
||||
'collaborationOffice',
|
||||
'aiService',
|
||||
'other',
|
||||
];
|
||||
|
||||
List<CategoryModel> get categories {
|
||||
@@ -53,16 +54,16 @@ class CategoryProvider extends ChangeNotifier {
|
||||
// 기본 카테고리 초기화
|
||||
Future<void> _initDefaultCategories() async {
|
||||
final defaultCategories = [
|
||||
{'name': '음악', 'color': '#E91E63', 'icon': 'music_note'},
|
||||
{'name': 'OTT(동영상)', 'color': '#9C27B0', 'icon': 'movie_filter'},
|
||||
{'name': '저장/클라우드', 'color': '#2196F3', 'icon': 'cloud'},
|
||||
{'name': '통신 · 인터넷 · TV', 'color': '#00BCD4', 'icon': 'wifi'},
|
||||
{'name': '생활/라이프스타일', 'color': '#4CAF50', 'icon': 'home'},
|
||||
{'name': '쇼핑/이커머스', 'color': '#FF9800', 'icon': 'shopping_cart'},
|
||||
{'name': '프로그래밍', 'color': '#795548', 'icon': 'code'},
|
||||
{'name': '협업/오피스', 'color': '#607D8B', 'icon': 'business_center'},
|
||||
{'name': 'AI 서비스', 'color': '#673AB7', 'icon': 'smart_toy'},
|
||||
{'name': '기타', 'color': '#9E9E9E', 'icon': 'category'},
|
||||
{'name': 'music', 'color': '#E91E63', 'icon': 'music_note'},
|
||||
{'name': 'ottVideo', 'color': '#9C27B0', 'icon': 'movie_filter'},
|
||||
{'name': 'storageCloud', 'color': '#2196F3', 'icon': 'cloud'},
|
||||
{'name': 'telecomInternetTv', 'color': '#00BCD4', 'icon': 'wifi'},
|
||||
{'name': 'lifestyle', 'color': '#4CAF50', 'icon': 'home'},
|
||||
{'name': 'shoppingEcommerce', 'color': '#FF9800', 'icon': 'shopping_cart'},
|
||||
{'name': 'programming', 'color': '#795548', 'icon': 'code'},
|
||||
{'name': 'collaborationOffice', 'color': '#607D8B', 'icon': 'business_center'},
|
||||
{'name': 'aiService', 'color': '#673AB7', 'icon': 'smart_toy'},
|
||||
{'name': 'other', 'color': '#9E9E9E', 'icon': 'category'},
|
||||
];
|
||||
|
||||
for (final category in defaultCategories) {
|
||||
@@ -116,4 +117,57 @@ class CategoryProvider extends ChangeNotifier {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 카테고리 이름을 현재 언어에 맞게 반환
|
||||
String getLocalizedCategoryName(BuildContext context, String categoryKey) {
|
||||
final localizations = AppLocalizations.of(context);
|
||||
switch (categoryKey) {
|
||||
case 'music':
|
||||
return localizations.categoryMusic;
|
||||
case 'ottVideo':
|
||||
return localizations.categoryOttVideo;
|
||||
case 'storageCloud':
|
||||
return localizations.categoryStorageCloud;
|
||||
case 'telecomInternetTv':
|
||||
return localizations.categoryTelecomInternetTv;
|
||||
case 'lifestyle':
|
||||
return localizations.categoryLifestyle;
|
||||
case 'shoppingEcommerce':
|
||||
return localizations.categoryShoppingEcommerce;
|
||||
case 'programming':
|
||||
return localizations.categoryProgramming;
|
||||
case 'collaborationOffice':
|
||||
return localizations.categoryCollaborationOffice;
|
||||
case 'aiService':
|
||||
return localizations.categoryAiService;
|
||||
case 'other':
|
||||
return localizations.categoryOther;
|
||||
default:
|
||||
// 이전 버전과의 호환성을 위해 한국어 카테고리 이름도 처리
|
||||
switch (categoryKey) {
|
||||
case '음악':
|
||||
return localizations.categoryMusic;
|
||||
case 'OTT(동영상)':
|
||||
return localizations.categoryOttVideo;
|
||||
case '저장/클라우드':
|
||||
return localizations.categoryStorageCloud;
|
||||
case '통신 · 인터넷 · TV':
|
||||
return localizations.categoryTelecomInternetTv;
|
||||
case '생활/라이프스타일':
|
||||
return localizations.categoryLifestyle;
|
||||
case '쇼핑/이커머스':
|
||||
return localizations.categoryShoppingEcommerce;
|
||||
case '프로그래밍':
|
||||
return localizations.categoryProgramming;
|
||||
case '협업/오피스':
|
||||
return localizations.categoryCollaborationOffice;
|
||||
case 'AI 서비스':
|
||||
return localizations.categoryAiService;
|
||||
case '기타':
|
||||
return localizations.categoryOther;
|
||||
default:
|
||||
return categoryKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user