chore(i18n): polish en_US wording and terminology across all pages - #2240
Conversation
- Unify industry terms: Blackout/Shield -> Mute/Muting rules, Execution duration/interval -> For duration/Evaluation interval, alarm -> alert, machine -> host, curve -> series, Datasource -> Data source - Fix mistranslations against zh_CN (host clock offset, subscription for_duration, inhibit scenario, event_recover processor = Self-healing) - Fix typos and grammar: binded/unbinded, submited, persent, buisness, Templete, updator, "Are you sure to", full-width punctuation - Normalize UI labels to sentence case across pages and plugins
📝 WalkthroughWalkthroughThe PR updates English locale strings across shared components, application pages, alerting and workflow interfaces, dashboards, explorers, and data-source plugins. It standardizes sentence case, terminology, validation text, labels, and explanatory guidance. It also localizes two hardcoded component strings. ChangesEnglish localization updates
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🟡 Minor comments (24)
src/plugins/clickHouse/locale/en_US.ts-55-57 (1)
55-57: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winComplete the sentence-case normalization for related labels.
The PR changes visible labels to sentence case but leaves neighboring references or actions in title case. Apply these updates:
src/plugins/clickHouse/locale/en_US.ts#L55-L57: changeTime Series modetoTime series mode.src/plugins/doris/locale/en_US.ts#L79-L80: changeTime Series modetoTime series mode.src/plugins/elasticsearch/locale/en_US.ts#L42-L43: change the siblingadd_to.btnvalue fromAdd TotoAdd to.🤖 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 `@src/plugins/clickHouse/locale/en_US.ts` around lines 55 - 57, Normalize the related labels to sentence case: in src/plugins/clickHouse/locale/en_US.ts lines 55-57 and src/plugins/doris/locale/en_US.ts lines 79-80, change “Time Series mode” to “Time series mode”; in src/plugins/elasticsearch/locale/en_US.ts lines 42-43, update the sibling add_to.btn value from “Add To” to “Add to”.src/pages/alertRules/locale/en_US.ts-121-124 (1)
121-124: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winSpecify the host clock offset.
host.trigger.key.offsetis a host-specific trigger.Time offsetdoes not identify the affected clock. Change the label toHost clock offset.🤖 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 `@src/pages/alertRules/locale/en_US.ts` around lines 121 - 124, The offset property label in the host trigger keys object does not specify that the time offset is host-specific. Update the offset property value from 'Time offset' to 'Host clock offset' to clarify that this is a host-specific trigger affecting the host's clock.src/pages/alertRules/locale/en_US.ts-130-140 (1)
130-140: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the duplicated duration guidance.
Usually the for durationandDuring the for durationare ungrammatical. UseThe configured durationandDuring this durationin both strings.Proposed fix
- 'Usually the for duration is longer than the evaluation interval. During the for duration, the query is evaluated multiple times at the evaluation interval, and an alert fires only if the condition is met every time. If set to 0, an alert fires as soon as the condition is met once.' + 'The configured duration is usually longer than the evaluation interval. During this duration, the query is evaluated multiple times at the evaluation interval, and an alert fires only if the condition is met every time. If set to 0, an alert fires as soon as the condition is met once.'🤖 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 `@src/pages/alertRules/locale/en_US.ts` around lines 130 - 140, Update both prom_for_duration_tip strings under the alert rule query and metric query sections: replace “Usually the for duration” with “The configured duration” and “During the for duration” with “During this duration,” preserving the remaining guidance.src/pages/warning/subscribe/locale/en_US.ts-47-47 (1)
47-47: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winInclude the unit in the duration example.
The field is measured in seconds, but the tip says “with 300 configured.” Use “with 300 seconds configured” to remove the ambiguity.
🤖 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 `@src/pages/warning/subscribe/locale/en_US.ts` at line 47, Update the duration example in the warning subscription locale text to say “with 300 seconds configured” instead of “with 300 configured,” preserving the rest of the explanatory text.src/pages/notificationChannels/locale/en_US.ts-65-65 (1)
65-65: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse “Skip TLS verification” for the TLS setting.
Skip TLS verifyis not a standard noun phrase. State the operation clearly because this label describes a security-sensitive option.Proposed wording
- insecure_skip_verify: 'Skip TLS verify', + insecure_skip_verify: 'Skip TLS verification',Also applies to: 86-87
🤖 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 `@src/pages/notificationChannels/locale/en_US.ts` at line 65, Update the insecure_skip_verify locale label to use the clear wording “Skip TLS verification,” and apply the same wording to the additional occurrence referenced by the review.src/pages/notificationChannels/locale/en_US.ts-63-63 (1)
63-63: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse “Number of retries” for
retry_times.
Retry timesis not idiomatic and can be confused with a time interval. Use one label for HTTP, FlashDuty, and PagerDuty.Proposed wording
- retry_times: 'Retry times', + retry_times: 'Number of retries',Also applies to: 110-110, 119-119
🤖 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 `@src/pages/notificationChannels/locale/en_US.ts` at line 63, Update the retry_times labels in the HTTP, FlashDuty, and PagerDuty notification channel translations to use “Number of retries” instead of “Retry times,” keeping the same translation key and consistent wording across all three entries.src/pages/warning/subscribe/locale/en_US.ts-55-55 (1)
55-55: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the grammar in the tag and group validation message.
Fill in at least one of tags or receiving groupsis incomplete. UseFill in at least one tag or receiving group.🤖 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 `@src/pages/warning/subscribe/locale/en_US.ts` at line 55, Update the tags_groups_require validation message to read “Fill in at least one tag or receiving group,” replacing the grammatically incomplete wording while preserving the existing localization key.src/pages/warning/shield/locale/en_US.ts-26-26 (1)
26-26: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMake the broad-scope warning precise.
Line [26] is ambiguous about whether one or both filters are absent. It also says “all alert events,” while the same locale limits muting by severity and time. State that the rule can mute all matching events in the selected business group.
Proposed wording
- scope_unlimited_tip: 'No data source or event tag is configured; this rule will mute all alert events of the selected business group. Please confirm', + scope_unlimited_tip: 'Neither a data source nor an event-tag filter is configured; this rule can mute all alert events in the selected business group that match the configured severity and time conditions. Please confirm',🤖 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 `@src/pages/warning/shield/locale/en_US.ts` at line 26, Update the scope_unlimited_tip locale text to explicitly cover the case where either or both filters are unconfigured, and describe the impact as muting all matching events in the selected business group while preserving the existing severity and time constraints.src/pages/notificationRules/locale/en_US.ts-194-194 (1)
194-194: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse a natural phrase for aggregation intervals.
too large aggregation time intervalsis not idiomatic and makes the warning harder to read. Useoverly long aggregation intervals.Proposed wording
- default_duration_tip: 'Please note that too large aggregation time intervals will cause alert delivery delays', + default_duration_tip: 'Please note that overly long aggregation intervals delay alert delivery',🤖 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 `@src/pages/notificationRules/locale/en_US.ts` at line 194, Update the default_duration_tip translation to replace “too large aggregation time intervals” with the natural phrase “overly long aggregation intervals,” preserving the rest of the warning.src/pages/notificationTemplates/locale/en_US.ts-18-18 (1)
18-18: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winClarify the media-type field reference.
Fields that can be used in the media type, referenced by ...is grammatically incomplete. Preserve{{contentKey}}and state the reference format directly.Proposed wording
- tip: 'Fields that can be used in the media type, referenced by $tpl.{{contentKey}}', + tip: 'Fields available in the media type are referenced as $tpl.{{contentKey}}',🤖 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 `@src/pages/notificationTemplates/locale/en_US.ts` at line 18, Update the tip value in the notification template locale to clearly state the media-type field reference format, preserving the {{contentKey}} placeholder and correcting the incomplete grammar.src/pages/warning/shield/locale/en_US.ts-3-3 (1)
3-3: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the edit error message a complete sentence.
Missing required parameters, unable to edit, please contact the administratoris a comma splice. State the failure and the next action directly.Proposed wording
- edit_missing_params: 'Missing required parameters, unable to edit, please contact the administrator', + edit_missing_params: 'Required parameters are missing, so this rule cannot be edited. Please contact an administrator',🤖 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 `@src/pages/warning/shield/locale/en_US.ts` at line 3, Update the edit_missing_params locale string to use complete sentences rather than joining independent clauses with a comma, while clearly stating the edit failure and directing the user to contact the administrator.src/pages/siteSettings/locale/en_US.ts-5-5 (1)
5-5: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the image-size hints grammatical.
Lines 5, 7, 9, and 11 use
Enter the image URL, recommended size .... The comma joins two separate instructions. Use two sentences consistently.Proposed wording
- favicon_url_tip: 'Enter the image URL, recommended size 32x32', + favicon_url_tip: 'Enter the image URL. Recommended size: 32x32.', - login_page_logo_url_tip: 'Enter the image URL, recommended size 120x38', + login_page_logo_url_tip: 'Enter the image URL. Recommended size: 120x38.', - menu_big_logo_url_tip: 'Enter the image URL, recommended size 120x38', + menu_big_logo_url_tip: 'Enter the image URL. Recommended size: 120x38.', - menu_small_logo_url_tip: 'Enter the image URL, recommended size 38x38', + menu_small_logo_url_tip: 'Enter the image URL. Recommended size: 38x38.',Also applies to: 7-7, 9-9, 11-11
🤖 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 `@src/pages/siteSettings/locale/en_US.ts` at line 5, Update the image-size hints for favicon_url_tip and the corresponding entries on lines 7, 9, and 11 to use two grammatical sentences instead of joining the instructions with a comma, preserving the existing URLs and size recommendations.src/pages/dashboard/locale/en_US.ts-61-61 (1)
61-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winSeparate the feedback link from the import restriction.
Line 61 ends with
can be importedand immediately appends<a>feedback</a>. The rendered guidance is an incomplete phrase. Add punctuation and an explicit action for the link while preserving the<a>placeholder.Proposed wording
- import_grafana_tip: 'Only dashboards using Prometheus data sources, and the chart types and features supported by Nightingale, can be imported <a>feedback</a>', + import_grafana_tip: 'Only dashboards that use Prometheus data sources and chart types and features supported by Nightingale can be imported. <a>Send feedback</a>',🤖 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 `@src/pages/dashboard/locale/en_US.ts` at line 61, Update the import_grafana_tip translation so the import restriction ends with proper punctuation, then add a separate explicit feedback action while preserving the existing <a> placeholder for the link.src/pages/targets/locale/en_US.ts-28-32 (1)
28-32: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMake the heartbeat ranges non-overlapping.
Lines 29 and 30 both describe a heartbeat “within” a limit. The yellow range overlaps the green range, so the explanation does not identify the middle interval. State the interval explicitly.
Proposed wording
- Heartbeat within 3 minutes: yellow <1 /> - No heartbeat within 3 minutes: red + Heartbeat between 1 and 3 minutes: Yellow <1 /> + No heartbeat for more than 3 minutes: Red🤖 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 `@src/pages/targets/locale/en_US.ts` around lines 28 - 32, Update the update_at_tip translation so the yellow heartbeat range explicitly covers the interval after 1 minute through 3 minutes, while preserving the green “within 1 minute” and red “no heartbeat within 3 minutes” descriptions.src/pages/help/SSOConfigs/locale/en_US.ts-21-21 (1)
21-21: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRewrite the
corpId_tiptext as a complete sentence.
Corporation ID, you can find the CorpId ...is a comma splice. Use a colon or two sentences, for example:Corporation ID: You can find the CorpId on the homepage of the DingTalk Open Platform.🤖 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 `@src/pages/help/SSOConfigs/locale/en_US.ts` at line 21, Update the corpId_tip translation to use grammatically complete sentence structure by replacing the comma splice with a colon or separate sentences, while preserving the existing meaning and guidance.src/pages/logExplorer/locale/en_US.ts-16-16 (1)
16-16: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse the existing
Raw logsmode label.
mode.raw_logsisRaw logs, butconfirm_contentsaysRaw Logs mode. UseRaw logs modeto keep one label and sentence case.🤖 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 `@src/pages/logExplorer/locale/en_US.ts` at line 16, Update the confirm_content string to use the existing mode.raw_logs label wording, changing “Raw Logs mode” to “Raw logs mode” while preserving the rest of the message.src/pages/help/SSOConfigs/locale/en_US.ts-23-23 (1)
23-23: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse sentence case for
client_secret.Change
Client SecrettoClient secret. KeepClient IDbecauseIDis an acronym.🤖 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 `@src/pages/help/SSOConfigs/locale/en_US.ts` at line 23, Update the client_secret label in the SSOConfigs locale to use sentence case as “Client secret”; leave the Client ID label unchanged because ID is an acronym.src/pages/logExplorer/locale/en_US.ts-64-64 (1)
64-64: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse the plural form for the data-source type title.
The key and following description refer to multiple data source types, but the title says
No available data source type. Change it toNo available data source types.🤖 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 `@src/pages/logExplorer/locale/en_US.ts` at line 64, Update the no_supported_datasource_types_title translation value in the locale resource to use the plural wording “No available data source types,” leaving the key and surrounding translations unchanged.src/pages/explorer/locale/en_US.ts-63-63 (1)
63-63: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winName the download action clearly.
Query logs first, then click downloadis ambiguous. UseQuery logs first, then click the download buttonor the exact button label.🤖 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 `@src/pages/explorer/locale/en_US.ts` at line 63, Update the emptyText translation in en_US so the download action is explicit, replacing “click download” with “click the download button” or the exact visible button label while preserving the rest of the message.src/pages/explorer/locale/en_US.ts-70-70 (1)
70-70: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the field-existence action label grammatical.
Filter for field presentis not a complete noun phrase. UseFilter documents with this fieldto match the equivalent log explorer action.🤖 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 `@src/pages/explorer/locale/en_US.ts` at line 70, Update the exists action label in the locale translation to “Filter documents with this field,” matching the equivalent log explorer wording and preserving the existing translation key.src/pages/logExplorer/locale/en_US.ts-31-31 (1)
31-31: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winComplete the field-statistics message.
Field statistics not enabled, unable to perform statistical analysisomitsareand joins two clauses with a comma. UseField statistics are not enabled, so statistical analysis is not available.🤖 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 `@src/pages/logExplorer/locale/en_US.ts` at line 31, Update the unindexable locale message in the log explorer translations to exactly state that field statistics are not enabled and statistical analysis is not available, using “are” and a “so” clause instead of the current comma-separated wording.src/pages/explorer/locale/en_US.ts-20-20 (1)
20-20: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winComplete both field-presence messages.
Both strings omit
is not presentin the second clause. The explorer message also omitsthebeforemapping.
src/pages/explorer/locale/en_US.ts#L20-L20: useThe field exists in the mapping but is not present in the 500 sampled documents.src/pages/logExplorer/locale/en_US.ts#L58-L58: useThis field exists in the mapping but is not present in the 500 displayed documents.🤖 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 `@src/pages/explorer/locale/en_US.ts` at line 20, Update fieldValues_topnNoData in src/pages/explorer/locale/en_US.ts at lines 20-20 to use “The field exists in the mapping but is not present in the 500 sampled documents”. Update the corresponding field-presence message in src/pages/logExplorer/locale/en_US.ts at lines 58-58 to use “This field exists in the mapping but is not present in the 500 displayed documents”.src/pages/help/migrate/locale/en_US.ts-12-12 (1)
12-12: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse
Migratefor the button label.
migrateis rendered on both the primary “migrate” page button and the modal submit button, while the help text says “Click the migrate button”. KeepMigrationonly for section/title copy such asmodal:title.🤖 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 `@src/pages/help/migrate/locale/en_US.ts` at line 12, Update the `migrate` locale string to `Migrate` for the primary and modal submit button labels, while preserving `Migration` for section and title text such as `modal:title`.src/pages/log/IndexPatterns/locale/en_US.ts-92-92 (1)
92-92: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winFix the regular-expression example.
The current example displays
:(d+)$, which matches the letterdand cannot extract1740920581from the sample value. Escape the backslash in the TypeScript string so the UI displays:(\d+)$.Proposed fix
- 'log-reg-extract': "e.g. for address field 17:356:256291904:1740920581, extracting with ':(d+)$' generates a new field phone = 1740920581", + 'log-reg-extract': "e.g. for address field 17:356:256291904:1740920581, extracting with ':(\\d+)$' generates a new field phone = 1740920581",🤖 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 `@src/pages/log/IndexPatterns/locale/en_US.ts` at line 92, Update the `log-reg-extract` locale string to escape the backslash in the regular-expression example, so the TypeScript source renders `:(\d+)$` in the UI and correctly represents matching the trailing digits.
🤖 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.
Minor comments:
In `@src/pages/alertRules/locale/en_US.ts`:
- Around line 121-124: The offset property label in the host trigger keys object
does not specify that the time offset is host-specific. Update the offset
property value from 'Time offset' to 'Host clock offset' to clarify that this is
a host-specific trigger affecting the host's clock.
- Around line 130-140: Update both prom_for_duration_tip strings under the alert
rule query and metric query sections: replace “Usually the for duration” with
“The configured duration” and “During the for duration” with “During this
duration,” preserving the remaining guidance.
In `@src/pages/dashboard/locale/en_US.ts`:
- Line 61: Update the import_grafana_tip translation so the import restriction
ends with proper punctuation, then add a separate explicit feedback action while
preserving the existing <a> placeholder for the link.
In `@src/pages/explorer/locale/en_US.ts`:
- Line 63: Update the emptyText translation in en_US so the download action is
explicit, replacing “click download” with “click the download button” or the
exact visible button label while preserving the rest of the message.
- Line 70: Update the exists action label in the locale translation to “Filter
documents with this field,” matching the equivalent log explorer wording and
preserving the existing translation key.
- Line 20: Update fieldValues_topnNoData in src/pages/explorer/locale/en_US.ts
at lines 20-20 to use “The field exists in the mapping but is not present in the
500 sampled documents”. Update the corresponding field-presence message in
src/pages/logExplorer/locale/en_US.ts at lines 58-58 to use “This field exists
in the mapping but is not present in the 500 displayed documents”.
In `@src/pages/help/migrate/locale/en_US.ts`:
- Line 12: Update the `migrate` locale string to `Migrate` for the primary and
modal submit button labels, while preserving `Migration` for section and title
text such as `modal:title`.
In `@src/pages/help/SSOConfigs/locale/en_US.ts`:
- Line 21: Update the corpId_tip translation to use grammatically complete
sentence structure by replacing the comma splice with a colon or separate
sentences, while preserving the existing meaning and guidance.
- Line 23: Update the client_secret label in the SSOConfigs locale to use
sentence case as “Client secret”; leave the Client ID label unchanged because ID
is an acronym.
In `@src/pages/log/IndexPatterns/locale/en_US.ts`:
- Line 92: Update the `log-reg-extract` locale string to escape the backslash in
the regular-expression example, so the TypeScript source renders `:(\d+)$` in
the UI and correctly represents matching the trailing digits.
In `@src/pages/logExplorer/locale/en_US.ts`:
- Line 16: Update the confirm_content string to use the existing mode.raw_logs
label wording, changing “Raw Logs mode” to “Raw logs mode” while preserving the
rest of the message.
- Line 64: Update the no_supported_datasource_types_title translation value in
the locale resource to use the plural wording “No available data source types,”
leaving the key and surrounding translations unchanged.
- Line 31: Update the unindexable locale message in the log explorer
translations to exactly state that field statistics are not enabled and
statistical analysis is not available, using “are” and a “so” clause instead of
the current comma-separated wording.
In `@src/pages/notificationChannels/locale/en_US.ts`:
- Line 65: Update the insecure_skip_verify locale label to use the clear wording
“Skip TLS verification,” and apply the same wording to the additional occurrence
referenced by the review.
- Line 63: Update the retry_times labels in the HTTP, FlashDuty, and PagerDuty
notification channel translations to use “Number of retries” instead of “Retry
times,” keeping the same translation key and consistent wording across all three
entries.
In `@src/pages/notificationRules/locale/en_US.ts`:
- Line 194: Update the default_duration_tip translation to replace “too large
aggregation time intervals” with the natural phrase “overly long aggregation
intervals,” preserving the rest of the warning.
In `@src/pages/notificationTemplates/locale/en_US.ts`:
- Line 18: Update the tip value in the notification template locale to clearly
state the media-type field reference format, preserving the {{contentKey}}
placeholder and correcting the incomplete grammar.
In `@src/pages/siteSettings/locale/en_US.ts`:
- Line 5: Update the image-size hints for favicon_url_tip and the corresponding
entries on lines 7, 9, and 11 to use two grammatical sentences instead of
joining the instructions with a comma, preserving the existing URLs and size
recommendations.
In `@src/pages/targets/locale/en_US.ts`:
- Around line 28-32: Update the update_at_tip translation so the yellow
heartbeat range explicitly covers the interval after 1 minute through 3 minutes,
while preserving the green “within 1 minute” and red “no heartbeat within 3
minutes” descriptions.
In `@src/pages/warning/shield/locale/en_US.ts`:
- Line 26: Update the scope_unlimited_tip locale text to explicitly cover the
case where either or both filters are unconfigured, and describe the impact as
muting all matching events in the selected business group while preserving the
existing severity and time constraints.
- Line 3: Update the edit_missing_params locale string to use complete sentences
rather than joining independent clauses with a comma, while clearly stating the
edit failure and directing the user to contact the administrator.
In `@src/pages/warning/subscribe/locale/en_US.ts`:
- Line 47: Update the duration example in the warning subscription locale text
to say “with 300 seconds configured” instead of “with 300 configured,”
preserving the rest of the explanatory text.
- Line 55: Update the tags_groups_require validation message to read “Fill in at
least one tag or receiving group,” replacing the grammatically incomplete
wording while preserving the existing localization key.
In `@src/plugins/clickHouse/locale/en_US.ts`:
- Around line 55-57: Normalize the related labels to sentence case: in
src/plugins/clickHouse/locale/en_US.ts lines 55-57 and
src/plugins/doris/locale/en_US.ts lines 79-80, change “Time Series mode” to
“Time series mode”; in src/plugins/elasticsearch/locale/en_US.ts lines 42-43,
update the sibling add_to.btn value from “Add To” to “Add to”.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2fcd0080-2197-45c0-88cc-a843c399ac1c
📒 Files selected for processing (63)
src/components/AiChatNG/locale/en_US.tssrc/components/BlankBusinessPlaceholder/locale/en_US.tssrc/components/CronPattern/locale/en_US.tssrc/components/DatasourceSelect/locale/en_US.tssrc/components/InputEnlarge/locale/en_US.tssrc/components/KQLInput/locale/en_US.tssrc/components/KVTagSelect/locale/en_US.tssrc/components/LogQL/locale/en_US.tssrc/components/PromGraphCpt/locale/en_US.tssrc/components/PromQueryBuilder/locale/en_US.tssrc/components/SideMenu/locale/en_US.tssrc/components/TableColumnSelect/locale/en_US.tssrc/components/TimeRangePicker/locale/en_US.tssrc/components/ViewSelect/locale/en_US.tssrc/components/menu/locale/en_US.tssrc/components/pageLayout/locale/en_US.tssrc/locales/common/locale/en_US.tssrc/locales/datasource/locale/en_US.tssrc/pages/account/locale/en_US.tssrc/pages/aiConfig/agents/locale/en_US.tssrc/pages/aiConfig/llmConfigs/locale/en_US.tssrc/pages/aiConfig/skills/locale/en_US.tssrc/pages/alertCurEvent/locale/en_US.tssrc/pages/alertRules/locale/en_US.tssrc/pages/builtInComponents/locale/en_US.tssrc/pages/dashboard/Components/UnitPicker/locale/en_US.tssrc/pages/dashboard/locale/en_US.tssrc/pages/datasource/locale/en_US.tssrc/pages/embeddedProduct/locale/en_US.tssrc/pages/event/locale/en_US.tssrc/pages/eventPipeline/locale/en_US.tssrc/pages/explorer/locale/en_US.tssrc/pages/help/NotificationSettings/locale/en_US.tssrc/pages/help/SSOConfigs/locale/en_US.tssrc/pages/help/migrate/locale/en_US.tssrc/pages/help/servers/locale/en_US.tssrc/pages/historyEvents/locale/en_US.tssrc/pages/hosts/locale/en_US.tssrc/pages/landing/locale/en_US.tssrc/pages/log/IndexPatterns/locale/en_US.tssrc/pages/logExplorer/locale/en_US.tssrc/pages/metricsBuiltin/locale/en_US.tssrc/pages/monitor/object/locale/en_US.tssrc/pages/notFound/locale/en_US.tssrc/pages/notificationChannels/locale/en_US.tssrc/pages/notificationRules/locale/en_US.tssrc/pages/notificationTemplates/locale/en_US.tssrc/pages/permissions/locale/en_US.tssrc/pages/recordingRules/locale/en_US.tssrc/pages/siteSettings/locale/en_US.tssrc/pages/targets/locale/en_US.tssrc/pages/traceCpt/locale/en_US.tssrc/pages/warning/shield/locale/en_US.tssrc/pages/warning/subscribe/locale/en_US.tssrc/plugins/TDengine/locale/en_US.tssrc/plugins/clickHouse/locale/en_US.tssrc/plugins/doris/locale/en_US.tssrc/plugins/elasticsearch/locale/en_US.tssrc/plugins/iotdb/locale/en_US.tssrc/plugins/loki/locale/en_US.tssrc/plugins/mysql/locale/en_US.tssrc/plugins/pgsql/locale/en_US.tssrc/plugins/victorialogs/locale/en_US.ts
…nglish in UI strings
- user: 'Selected {num} items' used a single brace so i18next never
interpolated it; English users saw the literal placeholder. Other
languages already used {{num}}
- user: translate perm_flag_0/1 (were left as the raw 'ro' / 'rw'),
reword the two empty-state fragments and the business group note
- EnhancedTable: action column fell back to a hardcoded Chinese title
- RelativeTimeRangePicker: default placeholder was hardcoded Chinese
- AiChatNG: fix user-visible English prompts ('busi group', 'Host
machine', missing question marks, machine -> host)
f90a184 to
cc065c8
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@src/components/AiChatNG/recommend.ts`:
- Line 62: Update the recommendation prompt string in the AiChatNG
recommendations list to explicitly state that the alert fires when CPU usage
exceeds 80%, replacing the ambiguous “threshold above 80%” wording.
- Line 90: Update the host-installation prompt in the recommendations list to
use the complete sentence “Why does the host I just installed not appear or show
"unknown"?” while preserving the surrounding recommendation structure.
In `@src/components/EnhancedTable/EnhancedTable.tsx`:
- Line 5: Update EnhancedTable to obtain the translated function through
useTranslation, then use it for the action title inside the existing useMemo.
Add the translated function to that memo’s dependency list so the title
recomputes when the active language changes, while preserving the existing
table-prop dependencies.
In `@src/pages/user/locale/en_US.ts`:
- Line 22: Update the add_member_selected translation in en_US.ts to use English
singular and plural forms keyed by count, so one selected item reads “Selected 1
item” and multiple items retain the plural wording. Ensure the caller passes the
selected count as the interpolation count when resolving this translation.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 59671c5a-eb0b-4ea0-82cb-0b0711ccd21d
📒 Files selected for processing (5)
src/components/AiChatNG/recommend.tssrc/components/EnhancedTable/EnhancedTable.tsxsrc/components/TimeRangePicker/RelativeTimeRangePicker/index.tsxsrc/pages/dashboard/locale/en_US.tssrc/pages/user/locale/en_US.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/pages/dashboard/locale/en_US.ts
| promptList: isZhCN(lang) | ||
| ? ['创建一条 CPU 使用率超过 80% 的告警规则', '为什么某个告警规则没有发出告警', '这个告警为什么会触发'] | ||
| : [ | ||
| 'Create a CPU usage alert rule with a threshold above 80%', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
State the CPU condition directly.
“Threshold above 80%” can mean that the configured threshold must be greater than 80%, rather than that CPU usage must exceed 80%. Use Create an alert rule that fires when CPU usage exceeds 80%.
🤖 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 `@src/components/AiChatNG/recommend.ts` at line 62, Update the recommendation
prompt string in the AiChatNG recommendations list to explicitly state that the
alert fires when CPU usage exceeds 80%, replacing the ambiguous “threshold above
80%” wording.
| 'I just installed a machine but it does not appear / shows unknown, why?', | ||
| 'Why did this machine go offline?', | ||
| 'How to deploy the categraf collector', | ||
| 'I just installed a host but it does not appear / shows unknown, why?', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Rewrite the host-installation prompt as a complete sentence.
The slash construction and trailing “why?” are difficult to parse. Use Why does the host I just installed not appear or show "unknown"?.
🤖 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 `@src/components/AiChatNG/recommend.ts` at line 90, Update the
host-installation prompt in the recommendations list to use the complete
sentence “Why does the host I just installed not appear or show "unknown"?”
while preserving the surrounding recommendation structure.
| import { Table } from 'antd'; | ||
| import type { ColumnType, ColumnsType } from 'antd/lib/table'; | ||
| import classNames from 'classnames'; | ||
| import i18next from 'i18next'; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Repo files matching EnhancedTable:"
fd -a 'EnhancedTable\.tsx$' . || true
file="$(fd 'EnhancedTable\.tsx$' . | head -n 1 || true)"
if [ -n "${file:-}" ]; then
echo "--- outline ---"
ast-grep outline "$file" --view expanded || true
echo "--- relevant lines ---"
nl -ba "$file" | sed -n '1,130p'
fi
echo "--- i18next/react-i18next imports/usages in EnhancedTable if file exists ---"
if [ -n "${file:-}" ]; then
rg -n "import .*i18next|from ['\"]i18next['\"]|useTranslation|useTranslation\(|i18next|changeLanguage|t\( 'common:table\.operations'\)|t\(\"common:table\.operations\"\)" "$file" || true
fiRepository: n9e/fe
Length of output: 648
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Codebase package and translation setup files:"
git ls-files | rg '(^|/)(package\.json|pnpm-lock\.yaml|yarn\.lock|package-lock\.json|i18next|react-i18next|translation|i18n|locales|lang)' | sed -n '1,200p'
echo "--- package deps mentioning i18next/react-i18next ---"
python3 - <<'PY'
import json, pathlib
for p in pathlib.Path('.').rglob('package.json'):
try:
data = json.loads(p.read_text())
except Exception as e:
continue
for sec in ('dependencies','devDependencies','optionalDependencies','peerDependencies'):
if sec in data:
hits = {k:v for k,v in data[sec].items() if 'i18next' in k.lower() or 'translation' in k.lower()}
if hits:
print(p, sec, hits)
PY
echo "--- occurrences of useTranslation ---"
rg -n "useTranslation|i18next\.changeLanguage|changeLanguage\(" src package.json . 2>/dev/null | sed -n '1,200p' || trueRepository: n9e/fe
Length of output: 21244
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="/home/jailuser/git/src/components/EnhancedTable/EnhancedTable.tsx"
echo "--- EnhancedTable.tsx lines 1-110 ---"
awk '{ printf "%6d\t%s\n", NR, $0 }' "$file" | sed -n '1,110p'
echo "--- EnhancedTable.tsx lines 111-220 ---"
awk '{ printf "%6d\t%s\n", NR, $0 }' "$file" | sed -n '111,220p'
echo "--- EnhancedTable i18n usage ---"
python3 - <<'PY'
from pathlib import Path
p = Path('/home/jailuser/git/src/components/EnhancedTable/EnhancedTable.tsx')
s = p.read_text()
queries = ['import', 'i18next', 'useMemo', '{ i18n } = useTranslation', 'useTranslation']
for q in queries:
print(f'--- strings containing {q!r} ---')
for i, line in enumerate(s.splitlines(), 1):
if q in line:
print(f'{i}: {line}')
PYRepository: n9e/fe
Length of output: 7095
Recompute the action title when the language changes.
i18next.t('common:table.operations') is inside useMemo, but the memo depends only on table props, not on the active language. A language switch without prop changes keeps the action column title in the previous language. Use useTranslation and include the translated function in the memo dependencies.
🤖 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 `@src/components/EnhancedTable/EnhancedTable.tsx` at line 5, Update
EnhancedTable to obtain the translated function through useTranslation, then use
it for the action title inside the existing useMemo. Add the translated function
to that memo’s dependency list so the title recomputes when the active language
changes, while preserving the existing table-prop dependencies.
| empty: 'You are not in any team yet, please', | ||
| name: 'Team name', | ||
| add_member_selected: 'Selected {num} items', | ||
| add_member_selected: 'Selected {{num}} items', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
git ls-files | rg '(^|/)en_US\.ts$|addUser/index\.tsx$|i18next|i18n|useTranslation' | head -200
echo
echo "== locale location =="
fd -a 'en_US\.ts$' . | sed 's#^\./##'
echo
echo "== target file =="
if [ -f src/pages/user/locale/en_US.ts ]; then
cat -n src/pages/user/locale/en_US.ts
fi
echo
echo "== caller references =="
rg -n "add_member_selected|selectedUser|t\('team\.add_member_selected|t\(\"team\.add_member_selected" src | head -200Repository: n9e/fe
Length of output: 12443
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== i18n/i18next config =="
sed -n '1,240p' src/i18n.ts
fd -a '(\.i18nyaml|locales|en_US)'\.ya?ml$ src | sed 's#^\./##'
rg -n "i18next|react-i18next|useTranslation|addResourceBundle|resources|pluralSeparator|interpolation|missingKey|saveMissing|nsSeparator|keySeparator" src -g '!node_modules' | head -200
echo
echo "== related locale plural patterns =="
rg -n "_one:|_other:|_singular:|_plural:" src/pages/user/locale src/locales | head -200Repository: n9e/fe
Length of output: 21383
🌐 Web query:
i18next plural interpolation count count parameter plurals simple rules count one other
💡 Result:
In i18next, pluralization is handled by passing a count option to the translation function, which automatically selects the appropriate translation based on the language's specific plural rules [1][2]. Key requirements for plural interpolation: - Count parameter: You must provide a count variable named exactly 'count' in the options object, such as t('key', { count: 1 }) [1][3]. - Mandatory existence: If the count option is missing, i18next will not fall back to the base key and may fail to resolve the translation correctly [1][2]. - Plural suffixes: i18next uses CLDR-based suffixes (e.g., _one, _other, _zero, _few, _many) to determine the correct string [1][2]. - English example: For English, which uses only 'one' and 'other', you define your resources like this: { "key_one": "{{count}} item", "key_other": "{{count}} items" } [1][2] - Mandatory fallback: Every plural set must include an _other key, which serves as the required fallback for the language [2]. - Intl.PluralRules: i18next relies on the native Intl.PluralRules API [1][4]. In environments lacking this support (such as certain versions of React Native/Hermes), you must use an Intl polyfill, or i18next will degrade to a limited English-style _one/_other resolution [1][5][4]. Special cases: - Count of 0: If a _zero key is defined, it will be used specifically for a count of 0, overriding the standard language plural suffix [1][3]. - Ordinals: You can use an _ordinal suffix for ordinal numbers (e.g., "1st", "2nd"), which are determined based on the ordinal digit [1][3].
Citations:
- 1: https://www.i18next.com/translation-function/plurals
- 2: https://localepack.app/guides/i18next-json-format-namespaces-plurals
- 3: https://www.i18next.com/translation-function/plurals.md
- 4: https://www.i18next.com/how-to/faq
- 5: https://www.i18next.com/misc/json-format
Handle the singular case for the selected count.
This message prints Selected 1 items when selectedUser.length is 1. Define English plural forms and pass count:
Proposed fix
- add_member_selected: 'Selected {{num}} items',
+ add_member_selected_one: 'Selected {{count}} item',
+ add_member_selected_other: 'Selected {{count}} items',- t('team.add_member_selected', { num: selectedUser.length })
+ t('team.add_member_selected', { count: selectedUser.length })🤖 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 `@src/pages/user/locale/en_US.ts` at line 22, Update the add_member_selected
translation in en_US.ts to use English singular and plural forms keyed by count,
so one selected item reads “Selected 1 item” and multiple items retain the
plural wording. Ensure the caller passes the selected count as the interpolation
count when resolving this translation.
Summary by CodeRabbit
Style
Documentation
@everyshorthand support.Bug Fixes