fix: require I18nKey for translation calls#1230
Conversation
|
@muff-c is attempting to deploy a commit to the openhands Team on Vercel. A member of the Team first needs to authorize it. |
|
@muff-c is that ready for review? |
✅ Mock-LLM E2E Tests42/42 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
VascoSch92
left a comment
There was a problem hiding this comment.
I left a question... otherwise LGTM
| }, | ||
| "CHAT_INTERFACE$ACP_RESUME_SANDBOX_DESCRIPTION": { | ||
| "en": "This conversation's sandbox was recycled. Resume to continue where you left off." | ||
| "en": "This conversation's sandbox was recycled. Resume to continue where you left off.", |
There was a problem hiding this comment.
Why are you adding these translations? Where missing?
If yes, cool it means that the I18nKey is working :-)
There was a problem hiding this comment.
Yep, exactly. SETTINGS$UPGRADE_BUTTON was already used as a raw key, and switching it to I18nKey made typecheck catch that it was missing from translation.json.
The ACP entries came from upstream with only en; after updating the branch, check-translation-completeness failed, so I filled the missing locale slots with the same English fallback pattern used elsewhere in the file.
There was a problem hiding this comment.
I see... Actually I had the same problem in another PR :-)
Thanks to solve the conflicts.
Waiting for the tests and then I think we are good to go.
✅ Mock-LLM E2E Tests44/44 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
|
Yep, ready now. Repo checks are green, including the snapshot rerun after the |
Why
Raw string keys passed to
t()do not fail typecheck when a translation key is renamed or removed.Summary
t()withI18nKey.SETTINGS$UPGRADE_BUTTONtranslation key that was exposed by the change.Issue Number
Refs #1220
How to Test
npm run lintnpm run buildnpm run check-translation-completenessnpm test -- --run __tests__/i18n/duplicate-keys.test.ts __tests__/i18n/files-diff-label.test.ts __tests__/i18n/sidebar-mcp-directory-label.test.tsVideo/Screenshots
No UI change.
Type