yyqdbngt opened a new pull request, #3219: URL: https://github.com/apache/rocketmq-dashboard/pull/3219
## Summary The send-message pre-send check builds its issue titles/descriptions from pure utilities that returned hard-coded zh, so English-mode users still saw Chinese diagnostic copy even after the surrounding UI was localized. Localized: - utils/messageProperties.ts: `parseMessageProperties` now accepts a `lang` parameter (default `zh`); its three validation errors return the active-language text. - utils/messagePayloadPreview.ts: `analyzeMessagePayloadPreview` accepts `lang` via options (default `zh`) and threads it through `buildMessagePropertiesFromRows` / `buildMessagePropertiesFromText`; all issue titles and descriptions (empty body, body size, plain-text / scalar JSON bodies, trimmed Tag/Key, duplicate / empty / reserved / oversized properties) return the active-language text. - pages/instance/topic.tsx: both `analyzeMessagePayloadPreview` call sites (live pre-send check and submit-time validation) pass the current language; the live-preview memo includes `lang` in its deps. - No behavior change in zh; en now renders English preflight issues. ## Why The pre-send check is the last line of defense before publishing a message; its diagnostics must read in the active language. ## Testing - `tsc --noEmit` passes - `eslint` clean on the changed files - `vitest run` messageProperties + messagePayloadPreview + TopicPage - 38/38 tests pass -- 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]
