Back to all reviewers

Document i18n string usage

RooCodeInc/Roo-Code
Based on 7 comments
Typescript

All user-facing strings must be documented with translation function usage to ensure proper internationalization support. This includes error messages, notifications, labels, and any text displayed to users.

Documentation Typescript

Reviewer Prompt

All user-facing strings must be documented with translation function usage to ensure proper internationalization support. This includes error messages, notifications, labels, and any text displayed to users.

Example:

// ❌ Don't use hardcoded user-facing strings
const notice = `Image file is too large (${imageSizeInMB} MB). The maximum allowed size is 5 MB.`

// ✅ Document translation key usage for user-facing strings
const notice = t('tools:readFile.imageTooLarge', { 
  size: imageSizeInMB,
  max: 5 
})

Key requirements:

  • Use translation keys in a hierarchical format (e.g., ‘category:subcategory.messageId’)
  • Document parameter interpolation when variables are used
  • Include translation key usage in code comments and documentation
  • Mark strings as user-facing in documentation when applicable

This ensures maintainable internationalization support and clear documentation of translatable content throughout the codebase.

7
Comments Analyzed
Typescript
Primary Language
Documentation
Category

Source Discussions