yyqdbngt opened a new pull request, #2844: URL: https://github.com/apache/rocketmq-dashboard/pull/2844
## Summary - add `toToken` in `utils/localeToken.ts`, a locale-stable lowercasing helper for comparing against fixed tokens - use it for the system-alert level normalization, the audit result color mapping, and the alert-rules export file name - add regression coverage for the helper ## Why Plain `toLowerCase()`/`toUpperCase()` apply the host browser's locale rules. Under the Turkish locale, fixed tokens containing `I`/`i` break: `CRITICAL` normalizes to `cRıTıCAL`, so the level filter tabs and counts silently stop matching, and `partial`.toUpperCase() yields `PARTİAL`, so the audit result badge falls through to the error color. The export file name had the same latent mismatch for non-ASCII domain values. ## Testing - `cd web && ./node_modules/.bin/vitest run src/pages/ops/ src/utils/localeToken.test.ts` — 6 files, 45 tests passed - `cd web && ./node_modules/.bin/tsc --noEmit` — clean - `cd web && ./node_modules/.bin/eslint src/utils/localeToken.ts src/utils/localeToken.test.ts src/pages/ops/systemAlerts.tsx src/pages/ops/audit.tsx src/pages/ops/alerts.tsx` — 0 errors -- 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]
