fix(dashboard): add sub-command count label#8388
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since this key now needs to stay in sync across multiple locale files, consider introducing a shared base locale or a generation script to reduce the risk of future divergence between en-US, zh-CN, and ru-RU.
- For
detail.subCommandsCount, verify whether any of the supported languages require locale-specific pluralization rules, and if so, consider using your i18n library's pluralization features instead of a single static label.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since this key now needs to stay in sync across multiple locale files, consider introducing a shared base locale or a generation script to reduce the risk of future divergence between en-US, zh-CN, and ru-RU.
- For `detail.subCommandsCount`, verify whether any of the supported languages require locale-specific pluralization rules, and if so, consider using your i18n library's pluralization features instead of a single static label.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request adds a new localization key subCommandsCount to the English, Russian, and Chinese translation files. The reviewer pointed out that the translation strings for English and Russian do not handle pluralization correctly, which will lead to grammatically incorrect outputs for certain counts, and provided suggestions to use the proper i18n pluralization syntax.
| "docsEmpty": "No documentation", | ||
| "changelogTitle": "Changelog", | ||
| "changelogEmpty": "No changelog", | ||
| "subCommandsCount": "{count} sub-commands", |
There was a problem hiding this comment.
The translation string "{count} sub-commands" does not handle pluralization. If there is only 1 sub-command, it will display as "1 sub-commands", which is grammatically incorrect. Consider using the pluralization syntax supported by the i18n library (such as vue-i18n's pipe | syntax).
| "subCommandsCount": "{count} sub-commands", | |
| "subCommandsCount": "{count} sub-command | {count} sub-commands", |
| "docsEmpty": "Документация отсутствует", | ||
| "changelogTitle": "Журнал изменений", | ||
| "changelogEmpty": "Журнал изменений отсутствует", | ||
| "subCommandsCount": "{count} подкоманд", |
There was a problem hiding this comment.
The translation string "{count} подкоманд" does not handle Russian pluralization rules. In Russian, nouns have different plural forms depending on the number (e.g., "1 подкоманда", "2 подкоманды", "5 подкоманд"). Using a single static string will result in grammatically incorrect phrases like "1 подкоманд" or "2 подкоманд". Consider using the pluralization syntax supported by the i18n library.
| "subCommandsCount": "{count} подкоманд", | |
| "subCommandsCount": "{count} подкоманда | {count} подкоманды | {count} подкоманд", |
Summary
Fixes #8378
To verify
Summary by Sourcery
Add the missing sub-commands count translation to the dashboard extension detail view and synchronize the affected locale files.
Bug Fixes:
Enhancements: