Repository navigation
fix(studio): translate unavailable reasons as sentences - #2036
Conversation
|
Someone is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
What
Why
The Studio fallback inserted independently translated noun phrases into
Needs {models}. Languages with case agreement could not translate that sentence correctly because each phrase was translated without its sentence context.studioCatalog()currently produces only two requirement shapes, so two complete messages cover the full fallback surface.Fixes #1968
How to test
corepack pnpm exec vitest run --environment jsdom(49 files, 301 tests passed)corepack pnpm exec eslint .corepack pnpm exec tsc -bcorepack pnpm run translations:verifynode scripts/check_translations.mjspython scripts/check_docs.pyAI disclosure
This PR was implemented and reviewed by an AI coding assistant. No independent human review is claimed.
High-level PR Summary
This PR fixes a localization issue in the Studio feature where model requirement messages were composed at runtime by joining translated fragments, preventing proper grammatical case agreement in languages like German. The fix replaces five translation keys with two complete sentences covering both requirement shapes (chat-only and chat-plus-image), updates all shipped locale files, adds test coverage for the new fallback messages, and removes the resolved known gap from the localization architecture documentation.
⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
docs/architecture/localization.mdsurfsense_local/frontend/src/features/studio/studio-panel.tsxsurfsense_local/frontend/src/features/studio/studio-panel.test.tsxsurfsense_local/frontend/translations/en.jsonsurfsense_local/frontend/translations/de.jsonsurfsense_local/frontend/translations/es.jsonsurfsense_local/frontend/translations/fr.jsonsurfsense_local/frontend/translations/hi.jsonsurfsense_local/frontend/translations/ja.jsonsurfsense_local/frontend/translations/ko.jsonsurfsense_local/frontend/translations/pt-BR.jsonsurfsense_local/frontend/translations/ru.jsonsurfsense_local/frontend/translations/zh-CN.json