You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/05 02:12:39 UTC

[PR] fix(i18n): localize resource CSV import validation [rocketmq-dashboard]

yyqdbngt opened a new pull request, #3221:
URL: https://github.com/apache/rocketmq-dashboard/pull/3221

   ## Summary
   
   The Topic / consumer-group CSV import flows validate rows in a shared utility that returned hard-coded zh errors, so imported rows and parse failures still showed Chinese messages in English mode.
   
   Localized in utils/resourceCsvImport.ts (all functions accept `lang`, default `zh`):
   - `validateResourceName` (empty / max length / pattern errors), `parseInteger` (integer and range errors) and `parseCsvTable` (empty file, empty/duplicate headers, malformed quotes, unclosed quotes, too many fields, no data rows, row limit) - including `readCsvRows` and the duplicate-name message builder.
   - `validateTopicCsvImport` and `validateConsumerGroupCsvImport`: unsupported Type / Permission / Subscription Mode / Consume Type / Subscription Data Type / Delivery Order Type errors; per-row messages join with the active-language separator.
   - pages/instance/topic.tsx and pages/instance/consumer.tsx pass the current language into `parseCsvTable` / the matching validator.
   - No behavior change in zh; en now renders English validation copy.
   
   ## Why
   
   Import feedback (row status explanations, parse errors) must follow the active language.
   
   ## Testing
   
   - `tsc --noEmit` passes
   - `eslint` clean on the changed files
   - `vitest run` resourceCsvImport + TopicPage + ConsumerPage - 64/64 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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(i18n): localize resource CSV import validation [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3221: fix(i18n): localize resource CSV import validation
URL: https://github.com/apache/rocketmq-dashboard/pull/3221


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org