fix(frontend): fix i18n and runtime error in EndpointList

Fix hardcoded English labels in cache strategy display and prevent runtime
error when filePatterns is undefined.

Changes:
- Replace hardcoded "TTL:", "Max:", "Patterns:" with formatMessage calls
- Add optional chaining for filePatterns.length to prevent undefined error
- Add "filePatterns" i18n key to en/zh api-settings.json
This commit is contained in:
catlog22
2026-02-02 10:46:36 +08:00
parent abce912ee5
commit c522681c4c
3 changed files with 6 additions and 4 deletions

View File

@@ -164,6 +164,7 @@
"enableContextCaching": "启用上下文缓存",
"cacheTTL": "缓存 TTL分钟",
"cacheMaxSize": "最大大小KB",
"filePatterns": "模式数",
"autoCachePatterns": "自动缓存模式",
"filePatternsHint": "逗号分隔的 glob 模式(例如:*.md,*.ts",
"enabled": "已启用",