# Consumer texts catalog Single-locale (Persian) string catalog for **non-admin** UI. Not multi-language i18n. ## Location ```text frontend/texts/ index.ts # export const texts = { … }; export { format } format.ts # {name} placeholder helper common.ts errors.ts auth.ts discovery.ts bookings.ts chats.ts events.ts profile.ts wallet.ts identity.ts support.ts notifications.ts reviews.ts publicSite.ts blog.ts seo.ts status.ts validation.ts ``` Import: ```ts import { texts, format } from '@/texts' ``` ## Usage ```ts texts.common.retry texts.bookings.cancelConfirm format(texts.events.shareLinkCopied, { channel: 'تلگرام' }) ``` - Prefer **dot access** (`texts.domain.key`) so Go to Definition jumps to the string. - Keys follow **product domain**, not route/page names. - Shared actions/labels → `texts.common`. - Product API codes / HTTP fallbacks → `texts.errors` (consumed by `services/apiErrorLocalization.ts`). - Status chip labels → `texts.status` (via `types/status.ts`). - Zod messages for consumer forms → `texts.validation.*`. ## Scope | In | Out | | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------- | | `(consumer)`, `(public)`, auth, event create/manage/detail for hosts/guests, SEO landings, blog | `app/(dashboard)/**` admin panel (unless already shared) | | Shared consumer chrome (nav, toasts, upload, feedback) | Second-locale / `next-intl` | ## Conventions 1. New consumer UI string → add to the right domain file, then reference `texts.*`. 2. Do not hardcode Persian literals in non-admin components (tests may still assert the Persian text). 3. Brand display spelling is always **قبیله**. 4. Avoid duplicate keys with the same Persian value; reuse `common` / existing keys when possible. 5. Interpolation uses `{key}` placeholders and `format()`. ## Related - Cursor rule: `.cursor/rules/consumer-texts.mdc` - Brand spelling: `.cursor/rules/persian-brand-name.mdc` - Consumer UI (modals + mobile): [`consumer-ui-guidelines.md`](./consumer-ui-guidelines.md) · rules `consumer-modals`, `consumer-mobile-first`