fix: correct invalid BCP 47 language tag in Jellyseerr components

Fix RangeError caused by invalid locale tags (e.g., zh-CN-US) in
multiple Jellyseerr components. The locale variable already contains
a complete BCP 47 language tag (e.g., zh-CN), so concatenating it
with region (e.g., US) creates an invalid tag.

Changes:
- DetailFacts.tsx: Fix 5 occurrences in date and currency formatting
- JellyseerrSeasons.tsx: Fix 1 occurrence in upcoming air date
- person/[personId].tsx: Fix 1 occurrence in birthday formatting

Total: 3 files, 7 fixes

Closes #1130

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
bot2
2025-11-17 20:53:57 +08:00
committed by Bo2
parent c05cef295e
commit b630e0784b
3 changed files with 17 additions and 26 deletions

View File

@@ -69,7 +69,7 @@ const RenderItem = ({ item }: any) => {
if (airDate) {
const airDateObj = new Date(airDate);
if (new Date() < airDateObj) {
return airDateObj.toLocaleDateString(`${locale}-${region}`, dateOpts);
return airDateObj.toLocaleDateString(locale, dateOpts);
}
}
}, [item, locale, region]);