You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "unbridled-41 (via GitHub)" <gi...@apache.org> on 2026/09/22 02:49:47 UTC
[I] [Studio][Bug] Alerts pagination footer drops the total: 'alerts.totalRules' label has no {count} placeholder [rocketmq-dashboard]
unbridled-41 opened a new issue, #4841:
URL: https://github.com/apache/rocketmq-dashboard/issues/4841
### Studio Version
Branch `rocketmq-studio` (development trunk), commit `4c697f07`.
### Runtime Environment
Front-end only: `web/src/pages/ops/alerts.tsx` + `web/src/i18n/translations.ts`. Any browser.
### Describe the Bug
The alerts-page pagination footer renders the server total through the i18n label:
```ts
showTotal={(total) => t('alerts.totalRules', { count: total })}
```
but the translation carries no placeholder:
```ts
'alerts.totalRules': { zh: '规则总数', en: 'Total Rules' },
```
`t()` performs a plain `String.replace('{count}', …)` loop, which is a no-op when the template lacks the placeholder — the footer shows only "规则总数" / "Total Rules" and **the total number is silently dropped**. Verified by simulating `t('alerts.totalRules', { count: 21 })` → output is exactly `"规则总数"` (no `21` anywhere in the footer text). The header stat block directly above *does* show the number in a separate span, making the omission visible on every page load.
### Steps to Reproduce
1. Open the alerts page (either domain) with any page result.
2. Look at the pagination footer at the bottom-right of the table.
3. Observe the label "规则总数" / "Total Rules" with no number, while the header stat shows the total.
### What Did You Expect to See?
The pagination footer renders the substituted label, e.g. "规则总数 21" / "Total Rules 21", consistently with the header stat.
### What Did You See Instead?
Only the bare label; the count never appears in the footer.
### Additional Context
Proposed fix in PR #4832: add the `{count}` placeholder to `alerts.totalRules` and render the header stat through the same substituted label so the count appears wherever the label does. Note: the footer assertion in the pre-existing test `loads a server-side page and filters by status and search` (`expect(screen.getByText('21'))`) matched only the header stat's separate span, which is why the missing footer number went unnoticed.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Studio][Bug] Alerts pagination footer drops the total: 'alerts.totalRules' label has no {count} placeholder [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4841:
URL: https://github.com/apache/rocketmq-dashboard/issues/4841#issuecomment-5943199732
This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.
--
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: [I] [Studio][Bug] Alerts pagination footer drops the total: 'alerts.totalRules' label has no {count} placeholder [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #4841:
URL: https://github.com/apache/rocketmq-dashboard/issues/4841#issuecomment-5770636654
**Issue Evaluation**
Category: `bug` | Status: **Confirmed**
This is a valid i18n defect. The `alerts.totalRules` translation key is missing the `{count}` placeholder, causing the pagination footer to render the literal string `alerts.totalRules` instead of the interpolated count.
**Root Cause:** The translation entry in `translations.ts` for both `en` and `zh` locales lacks the `{count}` interpolation variable that the component passes via `t('alerts.totalRules', { count: total })`.
**Impact:** Alerts page pagination footer shows a broken/untranslated label instead of the total rule count.
**Severity:** Low — cosmetic/i18n defect, no functional impact.
The referenced PR #4834 correctly adds the missing `{count}` placeholder to both locale files.
---
*Automated evaluation by RockteMQ-AI*
--
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: [I] [Studio][Bug] Alerts pagination footer drops the total: 'alerts.totalRules' label has no {count} placeholder [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4841: [Studio][Bug] Alerts pagination footer drops the total: 'alerts.totalRules' label has no {count} placeholder
URL: https://github.com/apache/rocketmq-dashboard/issues/4841
--
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