Round remaining balance - #3233
Conversation
c4b7067 to
1be40f0
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a74d945 to
7beb97e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/src/components/table/channels/ChannelsColumnDefs.jsx`:
- Around line 540-542: Add the new Chinese source string used in
ChannelsColumnDefs.jsx — the t('剩余额度:{{amount}},点击更新', { amount:
renderQuotaWithAmount(record.balance) }) call — to each locale file as a flat
JSON key (use the Chinese string as the key) and provide the corresponding
localized values for zh-CN.json (same Chinese text) and en.json (English
translation, e.g. "Remaining quota: {{amount}}, click to update"). Ensure both
files remain flat JSON objects and include the exact Chinese key so i18n lookup
succeeds for non-Chinese locales.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d60e4609-4105-45b8-bc42-8e014aa3fbb2
📒 Files selected for processing (2)
web/src/components/table/channels/ChannelsColumnDefs.jsxweb/src/helpers/render.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
- web/src/helpers/render.jsx
| content={t('剩余额度:{{amount}},点击更新', { | ||
| amount: renderQuotaWithAmount(record.balance), | ||
| })} |
There was a problem hiding this comment.
Add the new interpolated key to locale files before shipping.
This new t('剩余额度:{{amount}},点击更新', …) key is not present in the provided locale resources (web/src/i18n/locales/zh-CN.json:1-50 and web/src/i18n/locales/en.json:1-50), so non-Chinese users will see the raw Chinese source string in the tooltip instead of a proper translation. Please add this key to each locale file together with the corresponding localized value.
As per coding guidelines, "Translation files in web/src/i18n/locales/{lang}.json must be flat JSON with Chinese source strings as keys."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@web/src/components/table/channels/ChannelsColumnDefs.jsx` around lines 540 -
542, Add the new Chinese source string used in ChannelsColumnDefs.jsx — the
t('剩余额度:{{amount}},点击更新', { amount: renderQuotaWithAmount(record.balance) })
call — to each locale file as a flat JSON key (use the Chinese string as the
key) and provide the corresponding localized values for zh-CN.json (same Chinese
text) and en.json (English translation, e.g. "Remaining quota: {{amount}}, click
to update"). Ensure both files remain flat JSON objects and include the exact
Chinese key so i18n lookup succeeds for non-Chinese locales.
2ab208c to
453c58e
Compare
Round remaining balance
closes #3230
Summary by CodeRabbit