feat(i18n): 改造10个组件为i18n国际化,同步更新9种语言翻译文件

- 组件改造:EmptyState、ExportPanel、SearchConditionItem、SearchHistoryPanel、
  SearchResultCard、SearchResultList、Select、SortSwitcher、TemplatePanel、
  BottomNavigation、SearchConditionPanel
- 替换硬编码中文为 $t() 调用和 computed 响应式翻译
- 新增翻译键:search(搜索历史/模板/条件)、export(导出选项)、
  common.pleaseSelect 等
- 同步更新 zh-CN、en、zh-TW、ja、ko、es、fr、de、pt 共9种语言文件
- 重构 errorHandler:从 API 错误处理改为本地应用错误处理
- 移除 search.ts 中未使用的 SearchService 接口
This commit is contained in:
张翔
2026-04-29 19:13:55 +08:00
parent 70d3e3a277
commit 330c3af227
26 changed files with 1335 additions and 490 deletions
+43 -44
View File
@@ -9,6 +9,7 @@ export default {
search: 'Search',
male: 'Male',
female: 'Female',
pleaseSelect: 'Please select',
},
nav: {
almanac: 'Almanac',
@@ -45,63 +46,61 @@ export default {
monthly: 'Monthly',
selectDate: 'Select Date',
selectMonth: 'Select Month',
overallFortune: 'Overall Fortune',
career: 'Career',
wealth: 'Wealth',
relationship: 'Relationship',
health: 'Health',
luckyColor: 'Lucky Color',
luckyNumber: 'Lucky Number',
luckyDirection: 'Lucky Direction',
noChart: 'Please generate a chart on the Zi Wei Dou Shu page first',
overallScore: 'Overall Fortune: {score}pts',
career: 'Career: ',
wealth: 'Wealth: ',
relationship: 'Relationship: ',
health: 'Health: ',
luckyColor: 'Lucky Color: ',
luckyNumber: 'Lucky Number: ',
luckyDirection: 'Lucky Direction: ',
noChartHint: 'Please generate a chart on the Zi Wei Dou Shu page first',
},
search: {
conditions: 'Search Conditions',
searchConditions: 'Search Conditions',
addCondition: 'Add Condition',
addConditionHint: 'Please add at least one search condition',
addConditionEmpty: 'Add search conditions',
days: 'Search Days',
dayUnit: 'days',
searchResult: 'Search Results',
searchDays: 'Search Days',
daysUnit: '{count} days',
searchResults: 'Search Results',
resultCount: '{count} results',
matchCount: 'Match: {count}',
matchCount: 'Match',
sort: 'Sort',
sortByDate: 'Date',
sortByMatch: 'Match',
typeSuitable: 'Suitable',
typeUnsuitable: 'Unsuitable',
suitable: 'Suitable',
unsuitable: 'Unsuitable',
operatorAnd: 'AND',
operatorOr: 'OR',
excludeCondition: 'Exclude Condition',
items: 'Items',
operator: 'Logical Operator',
},
template: {
title: 'Search Templates',
searchPlaceholder: 'Search templates',
empty: 'No Templates',
emptyDesc: 'No templates match the criteria',
all: 'All',
},
export: {
title: 'Export Search Results',
selectFormat: 'Select Export Format',
selectContent: 'Select Export Content',
date: 'Date',
lunarDate: 'Lunar Date',
weekday: 'Weekday',
matchedItems: 'Matched Items',
matchCount: 'Match Score',
},
history: {
title: 'Search History',
clear: 'Clear History',
clearConfirm: 'Confirm Clear',
clearConfirmMsg: 'Are you sure you want to clear all search history?',
empty: 'No Search History',
emptyDesc: 'Search conditions will appear here after searching',
activityItems: 'Items',
logicalOperator: 'Logical Operator',
dateFormat: '{month}/{day}/{year}',
searchHistory: 'Search History',
clearHistory: 'Clear History',
noHistoryTitle: 'No Search History',
noHistoryDesc: 'Search conditions will appear here after searching',
confirmClear: 'Confirm Clear',
confirmClearContent: 'Are you sure you want to clear all search history?',
historyConditionDays: '{count} conditions, {days} days range',
justNow: 'Just now',
hoursAgo: '{count}h ago',
daysAgo: '{count}d ago',
searchTemplates: 'Search Templates',
noTemplatesTitle: 'No Templates',
noTemplatesDesc: 'No templates match the criteria',
allCategories: 'All',
},
export: {
exportResults: 'Export Results',
exportSearchResults: 'Export Search Results',
selectFormat: 'Select Export Format',
selectContent: 'Select Export Content',
export: 'Export',
contentDate: 'Date',
contentLunarDate: 'Lunar Date',
contentWeekday: 'Weekday',
contentMatchedItems: 'Matched Items',
contentMatchCount: 'Match Score',
},
}