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

@@ -167,6 +167,7 @@
"enableContextCaching": "Enable context caching",
"cacheTTL": "Cache TTL (minutes)",
"cacheMaxSize": "Max Size (KB)",
"filePatterns": "Patterns",
"autoCachePatterns": "Auto-cache patterns",
"filePatternsHint": "Comma-separated glob patterns (e.g., *.md,*.ts)",
"enabled": "Enabled",