Repository navigation
fix(i18n): disable namespace separator to fix URL display in translations - #2530
Conversation
…ions i18next uses ':' as namespace separator by default, causing URLs like 'https://api.openai.com' to be incorrectly parsed as namespace 'https' with key '//api.openai.com', resulting in truncated display. Setting nsSeparator to false fixes this issue since the project doesn't use multiple namespaces.
WalkthroughA configuration option Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s-sse-terminal 修复 OpenAI Responses SSE 终止事件识别
PR 类型
PR 是否包含破坏性更新?
PR 描述
修复 i18n 翻译中包含 URL 的字符串显示不完整的问题。


问题现象:
前端 placeholder 等文本中的 URL(如
https://api.openai.com/v1/chat/completions)只显示为//api.openai.com/v1/chat/completions,丢失了https:部分。问题原因:
i18next 默认使用
:作为命名空间分隔符(nsSeparator)。当翻译字符串包含https:时,i18next 会将https解析为命名空间名称,将后面的部分作为翻译键,导致https:被截断。修复方案:
在 i18n 配置中设置
nsSeparator: false,禁用命名空间分隔符功能。由于本项目只使用默认的translation命名空间,不使用多命名空间功能,此修改不会影响现有功能。影响范围:
修复所有翻译文件中约 80 处包含 URL 的字符串显示问题。