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.
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:
This ensures maintainable internationalization support and clear documentation of translatable content throughout the codebase.
Enter the URL of a public GitHub repository