i18n-and-copy.mdc 589 B

123456789101112131415161718192021
  1. ---
  2. description: i18n and microcopy rules for all user-facing text.
  3. globs: ["**/*.tsx", "**/*.ts", "**/*.vue", "**/*.ko", "**/templates/**"]
  4. alwaysApply: false
  5. ---
  6. # i18n & Copy
  7. - All user-facing strings go through i18n (`useTranslation()` in `i18nReact`).
  8. - Copy should be concise, action-oriented, and consistent.
  9. - Error messages = clear cause + actionable next step.
  10. - Default namespace `translation` unless justified otherwise.
  11. ## Example
  12. ```ts
  13. import { i18nReact } from '../../../utils/i18nReact';
  14. const { t } = i18nReact.useTranslation();
  15. const buttonLabel = t('click me')
  16. ```t