Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
2.4 KiB
2.4 KiB
Consumer texts catalog
Single-locale (Persian) string catalog for non-admin UI. Not multi-language i18n.
Location
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:
import { texts, format } from '@/texts'
Usage
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 byservices/apiErrorLocalization.ts). - Status chip labels →
texts.status(viatypes/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
- New consumer UI string → add to the right domain file, then reference
texts.*. - Do not hardcode Persian literals in non-admin components (tests may still assert the Persian text).
- Brand display spelling is always قبیله.
- Avoid duplicate keys with the same Persian value; reuse
common/ existing keys when possible. - Interpolation uses
{key}placeholders andformat().
Related
- Cursor rule:
.cursor/rules/consumer-texts.mdc - Brand spelling:
.cursor/rules/persian-brand-name.mdc - Consumer UI (modals + mobile):
consumer-ui-guidelines.md· rulesconsumer-modals,consumer-mobile-first