Add critical rules: always Tailwind, always translate user text

- Strengthen CLAUDE.md rule 8: Tailwind with no exceptions
- Add CLAUDE.md rule 13: all user-visible text must use translation
  functions (Twig: | translate, PHP: t_var(), JS: CmsApi.t_var())
- Add t_var() reference to hooks-and-api.md and css-js-conventions.md
- Update translate entry in quick-reference.md with all 3 contexts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 10:19:22 +00:00
parent d1b78fb420
commit 05008c0045
4 changed files with 14 additions and 2 deletions

View File

@@ -55,7 +55,7 @@
| `module` | `'module_id' \| module({params})` |
| `queryDB` | `'SELECT ...' \| queryDB()` |
| `imagec` | `path \| imagec(width)` |
| `translate` | `'text' \| translate` |
| `translate` | `'text' \| translate` (Twig) / `t_var('text')` (PHP) / `CmsApi.t_var('text')` (JS) |
| `json_decode` | `'json_string' \| json_decode` |
| `raw` | `variable \| raw` |
| `truncate` | `text \| truncate(100)` |