Skip to content

Commit 804d582

Browse files
committed
docs: add internationalization rule for user-facing strings
1 parent c28478e commit 804d582

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.roo/rules/rules.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@
2222
- Use Tailwind CSS classes instead of inline style objects for new markup
2323
- VSCode CSS variables must be added to webview-ui/src/index.css before using them in Tailwind classes
2424
- Example: `<div className="text-md text-vscode-descriptionForeground mb-2" />` instead of style objects
25+
26+
4. Internationalization:
27+
28+
- All user-facing strings must be internationalized using the `t()` function from `src/i18n`
29+
- Import the translation function: `import { t } from "../i18n"`
30+
- Add translation keys to all language files in `src/i18n/locales/[lang]/[namespace].json`
31+
- Supported languages: ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
32+
- Common namespaces: common, embeddings, marketplace, mcp, tools, worktrees
33+
- Example: `t("common:welcome")` instead of `"Welcome"`
34+
- Never hardcode user-facing text in English or any other language

0 commit comments

Comments
 (0)