lizhimins commented on PR #4802: URL: https://github.com/apache/rocketmq-dashboard/pull/4802#issuecomment-5845587999
The five literals are still hardcoded on the trunk — `web/src/pages/ops/audit.tsx:166`, `:225`, `:299`, `:310` and `:580` — and your mapping is the right one: the toast wording matches the existing `audit.timelineLoadFailed` / `audit.timelineExportFailed`, and splitting the cleanup sentence into a prefix and a suffix is the only way to keep the `InputNumber` inside a translated sentence. Two things block it as it stands. 1. It no longer merges. `web/src/i18n/translations.ts` conflicts: #4825 landed and inserted `audit.summaryMatched` … `audit.summaryResourceTypes` at `:1591-1595`, immediately after `audit.cleanupSuccess` (`:1590`) — exactly where your six keys go. Please rebase onto the current `rocketmq-studio`. 2. There is no test, and nothing on the trunk would notice a regression. `web/src/pages/ops/__tests__/AuditPage.test.tsx` has 11 `it()` blocks and none of them switches the console language or asserts any of these strings (no `LANGUAGE_STORAGE_KEY`, no `message.error` assertion), so reverting any of your five edits leaves the suite green. Please add one English-console case following the pattern already merged in `AuditSummaryCards.test.tsx:77-87`: set the language to `en`, reject the record-list request and assert the toast text; then open the cleanup modal and assert `Clean logs older than` / `days` render and `天之前的日志` does not. While you are in there: `audit.cleanupDays` (`translations.ts:1588`) has no remaining call site and your prefix/suffix pair supersedes it — drop it in the same change. A rebased version carrying that one test will merge. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
