Repository navigation
fix(i18n): fix missing i18n coverage and refine Korean translations - #16203
Conversation
📝 WalkthroughWalkthroughNew translation keys ( Changesi18n Coverage Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 10
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/src/pages/next-search/search-setting.tsx (1)
397-410:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocalize the placeholder too.
This block still hardcodes
"Please select", so the selector stays English for every non-English locale. Use the existing translation key here.♻️ Proposed fix
- placeholder="Please select" + placeholder={t('common.pleaseSelect')}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/src/pages/next-search/search-setting.tsx` around lines 397 - 410, In the MultiSelect component in the search-setting.tsx file, replace the hardcoded placeholder string "Please select" with the appropriate existing translation key used elsewhere in the codebase. This will ensure the placeholder text respects the user's locale setting instead of always displaying in English.
🧹 Nitpick comments (1)
web/src/pages/next-search/embed-app-modal.tsx (1)
94-94: Migrate touseTranslationin this React component instead of the project wrapper hook.The placeholder i18n change is good, but the component currently depends on
useTranslate. Per coding guidelines, "PreferuseTranslationfromreact-i18nextover project-wrapped utilities likeuseTranslatefor i18n in React components." Migrate line 10's import and line 24's hook call:- import { useTranslate } from '`@/hooks/common-hooks`'; + import { useTranslation } from 'react-i18next'; - const { t } = useTranslate('search'); + const { t } = useTranslation('translation', { keyPrefix: 'search' });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/src/pages/next-search/embed-app-modal.tsx` at line 94, Replace the project-wrapped useTranslate hook with the standard useTranslation from react-i18next. Change the import statement that currently imports useTranslate to instead import useTranslation from react-i18next, and update the hook invocation where useTranslate() is called to useTranslation() instead. The t function returned from useTranslation will work identically with the existing placeholder usage at line 94 (t('selectLocalePlaceholder')).Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/src/locales/en.ts`:
- Around line 933-934: The locale labels createChunk and editChunk in the en.ts
file are using title case (each word capitalized) but should follow sentence
case per file guidelines. Change the values 'Create Chunk' to 'Create chunk' and
'Edit Chunk' to 'Edit chunk' by converting the second word to lowercase while
keeping the first word capitalized.
In `@web/src/locales/es.ts`:
- Around line 35-36: The Spanish locale file (es.ts) is missing the translation
key `common.running` which is now being used by the `message-item` and
`next-message-item` components. Add the `running` key to the `common` object in
the Spanish locale file with an appropriate Spanish translation for the
running/loading state. This will prevent untranslated fallback text from
appearing in Spanish UI loading states.
In `@web/src/locales/fr.ts`:
- Around line 83-84: The French locale file fr.ts is missing the
`common.running` key in the translation.common object, while the UI references
`t('common.running')` causing fallback to a default language. Add the
`common.running` key with its French translation value in the `common` object
within translation.common, placing it alongside the newly added `owner` key to
ensure full French localization for message item components.
In `@web/src/locales/id.ts`:
- Around line 39-40: The Indonesian locale file (id.ts) is missing two required
i18n keys that are now consumed by updated UI paths. Add the key `running` with
an Indonesian translation to the `common` object, and add the key
`selectLocalePlaceholder` with an Indonesian translation to the `search` object
to prevent fallback text from appearing in the user interface.
In `@web/src/locales/ko.ts`:
- Line 412: The knowledgeDetails.metadata.type field in the Korean locale file
uses '타입' but should be updated to use the refined Korean term '유형' for
consistency with the stated terminology guidelines. Locate the type property
definition in the ko.ts file and change its value from '타입' to '유형'.
In `@web/src/locales/zh-traditional.ts`:
- Around line 44-45: Add the missing `common.running` key to the Traditional
Chinese locale file in the `common` object where `owner` is currently defined.
Include an appropriate Traditional Chinese translation for the "running" state
to prevent the UI from displaying the key name as fallback text when
t('common.running') is called.
In `@web/src/locales/zh.ts`:
- Around line 69-70: The common.running locale key is missing from the Chinese
translations object. Add the running key with an appropriate Chinese translation
(such as '运行中' or '运行') to the common object in the zh.ts locale file, placing
it alongside other common keys like owner to ensure the UI components that
reference common.running display properly translated text instead of falling
back to untranslated content.
In `@web/src/pages/agent/version-dialog/index.tsx`:
- Line 119: The translation key used in the version dialog component is
incorrect. In the line displaying the creation date with
formatDate(agent?.create_date), change the translation key from
t('flow.created') to t('flow.version.created') to match the actual nested
translation key structure defined in the locale files, which will ensure proper
localization functionality.
In `@web/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsx`:
- Around line 149-150: The translation key 'chat.metadataKeys' used in the
FormLabel component is not present in the current locale contract and will
render as an untranslated key. Update the translation key passed to the t()
function from 'chat.metadataKeys' to 'chat.metadataFields' to match the defined
i18n keys in the locale contract.
In `@web/src/pages/next-search/retrieval-documents/index.tsx`:
- Around line 41-43: The useTranslation hook is already initialized with const {
t } = useTranslation() on line 41, but hardcoded English text strings remain at
lines 131, 158, and 162 (within ranges 128-132 and 157-163) that need to be
localized. Identify all hardcoded English string literals in those line ranges
and wrap them with the t() function to enable proper translation support,
ensuring each string has an appropriate translation key for localization.
---
Outside diff comments:
In `@web/src/pages/next-search/search-setting.tsx`:
- Around line 397-410: In the MultiSelect component in the search-setting.tsx
file, replace the hardcoded placeholder string "Please select" with the
appropriate existing translation key used elsewhere in the codebase. This will
ensure the placeholder text respects the user's locale setting instead of always
displaying in English.
---
Nitpick comments:
In `@web/src/pages/next-search/embed-app-modal.tsx`:
- Line 94: Replace the project-wrapped useTranslate hook with the standard
useTranslation from react-i18next. Change the import statement that currently
imports useTranslate to instead import useTranslation from react-i18next, and
update the hook invocation where useTranslate() is called to useTranslation()
instead. The t function returned from useTranslation will work identically with
the existing placeholder usage at line 94 (t('selectLocalePlaceholder')).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c9eda8df-5899-4574-90f2-fce1dfdde1ba
📒 Files selected for processing (34)
web/src/components/message-item/index.tsxweb/src/components/next-message-item/index.tsxweb/src/components/ui/multi-select.tsxweb/src/locales/ar.tsweb/src/locales/bg.tsweb/src/locales/de.tsweb/src/locales/en.tsweb/src/locales/es.tsweb/src/locales/fr.tsweb/src/locales/id.tsweb/src/locales/it.tsweb/src/locales/ja.tsweb/src/locales/ko.tsweb/src/locales/pt-br.tsweb/src/locales/ru.tsweb/src/locales/tr.tsweb/src/locales/vi.tsweb/src/locales/zh-traditional.tsweb/src/locales/zh.tsweb/src/pages/agent/version-dialog/index.tsxweb/src/pages/agents/hooks/use-select-filters.tsweb/src/pages/agents/index.tsxweb/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-creating-modal/index.tsxweb/src/pages/dataflow-result/components/chunk-creating-modal/index.tsxweb/src/pages/dataset/components/metedata/manage-modal.tsxweb/src/pages/dataset/components/metedata/manage-values-modal.tsxweb/src/pages/dataset/dataset/use-select-filters.tsweb/src/pages/datasets/use-select-owners.tsweb/src/pages/memories/hooks.tsweb/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsxweb/src/pages/next-search/embed-app-modal.tsxweb/src/pages/next-search/retrieval-documents/index.tsxweb/src/pages/next-search/search-setting.tsxweb/src/utils/list-filter-util.ts
What problem does this PR solve?
This PR follows up on #15863 (Korean i18n) with translation refinements and i18n coverage for hardcoded strings found in the UI.
message-item,next-message-item,multi-select,chat-prompt-engine, and various filter hooksuse-selelct-filters.ts→use-select-filters.ts(typo fix)Type of change