Files
shahikitchen-prod/presentation/i18n/booking-events.ts
T

210 lines
8.0 KiB
TypeScript

import type { Language } from '@/domain/language/entities';
import type { EventTypeId } from '@/domain/booking/event-types';
import type { BookingMessageCopy } from '@/application/messaging/whatsapp-message-builder';
const EVENT_LABELS_EN: Record<EventTypeId, string> = {
birthday: 'Birthday',
wedding: 'Wedding / Walima',
engagement: 'Engagement / Nikah',
anniversary: 'Anniversary',
'baby-shower': 'Baby Shower',
graduation: 'Graduation',
'office-party': 'Office Party',
'corporate-lunch': 'Corporate Lunch',
'family-gathering': 'Family Gathering',
'religious-celebration': 'Eid, Diwali & Festivals',
farewell: 'Farewell Party',
retirement: 'Retirement',
'bridal-shower': 'Bridal Shower',
'holiday-party': 'Holiday Party',
other: 'Other Celebration',
};
const EVENT_LABELS_SV: Record<EventTypeId, string> = {
birthday: 'Födelsedag',
wedding: 'Bröllop / Walima',
engagement: 'Förlovning / Nikah',
anniversary: 'Årsdag',
'baby-shower': 'Babyshower',
graduation: 'Examensfest',
'office-party': 'Kontorsfest',
'corporate-lunch': 'Företagslunch',
'family-gathering': 'Familjesammankomst',
'religious-celebration': 'Eid, Diwali & högtider',
farewell: 'Avskedsfest',
retirement: 'Pensionering',
'bridal-shower': 'Möhippa',
'holiday-party': 'Helgfest',
other: 'Annat firande',
};
const LOCALIZED: Partial<Record<Language, Record<EventTypeId, string>>> = {
sv: EVENT_LABELS_SV,
};
export interface BookingEventsCopy {
heroBadge: string;
heroTitle: string;
heroSubtitle: string;
experienceDiningTitle: string;
experienceDiningDesc: string;
experienceCelebrateTitle: string;
experienceCelebrateDesc: string;
experienceCorporateTitle: string;
experienceCorporateDesc: string;
modeTable: string;
modeTableDesc: string;
modeEvent: string;
modeEventDesc: string;
eventPickerTitle: string;
eventPickerSubtitle: string;
eventTypeOtherLabel: string;
eventTypeOtherPlaceholder: string;
eventTypeRequired: string;
eventTypeOtherRequired: string;
formSubtitleTable: string;
formSubtitleEvent: string;
whatsappEventLine: string;
whatsappModeTable: string;
whatsappModeEvent: string;
whatsappGreeting: string;
whatsappLabelName: string;
whatsappLabelPhone: string;
whatsappLabelEmail: string;
whatsappLabelLocation: string;
whatsappLabelDate: string;
whatsappLabelTime: string;
whatsappLabelGuests: string;
whatsappLabelNotes: string;
whatsappLabelPreOrder: string;
whatsappPreOrderNone: string;
whatsappPreOrderTotal: string;
whatsappConfirmLine: string;
whatsappThanksLine: string;
}
const COPY_EN: BookingEventsCopy = {
heroBadge: 'Dine • Celebrate • Gather',
heroTitle: 'Reserve a Table or Book Your Event',
heroSubtitle:
'From an intimate dinner for two to birthdays, weddings, engagements, and office celebrations — Shahi Kitchen sets the stage for unforgettable moments in Gothenburg.',
experienceDiningTitle: 'Intimate Dining',
experienceDiningDesc: 'Quiet tables, warm hospitality, and your favourite Shahi dishes.',
experienceCelebrateTitle: 'Life Celebrations',
experienceCelebrateDesc: 'Birthdays, engagements, weddings, anniversaries & milestones.',
experienceCorporateTitle: 'Teams & Offices',
experienceCorporateDesc: 'Lunches, farewells, team outings & corporate gatherings.',
modeTable: 'Table Reservation',
modeTableDesc: 'Book a table for dining',
modeEvent: 'Private Event',
modeEventDesc: 'Birthdays, weddings & more',
eventPickerTitle: 'What are you celebrating?',
eventPickerSubtitle: 'Choose your occasion — we tailor seating, menu ideas, and setup to your event.',
eventTypeOtherLabel: 'Describe your celebration',
eventTypeOtherPlaceholder: 'e.g. Engagement dinner, company awards night…',
eventTypeRequired: 'Please select an event type.',
eventTypeOtherRequired: 'Please describe your celebration.',
formSubtitleTable: 'Tell us when you would like to dine with us.',
formSubtitleEvent: 'Share your event details — our team will craft a memorable Shahi experience.',
whatsappEventLine: 'Occasion',
whatsappModeTable: 'Table reservation',
whatsappModeEvent: 'Private event booking',
whatsappGreeting: 'Hello Shahi Kitchen 👋',
whatsappLabelName: 'Name',
whatsappLabelPhone: 'Phone',
whatsappLabelEmail: 'Email',
whatsappLabelLocation: 'Location',
whatsappLabelDate: 'Date',
whatsappLabelTime: 'Time',
whatsappLabelGuests: 'Guests',
whatsappLabelNotes: 'Special Requests',
whatsappLabelPreOrder: 'Pre-ordered items',
whatsappPreOrderNone: 'None',
whatsappPreOrderTotal: 'Pre-order total',
whatsappConfirmLine: 'Please confirm availability and pre-order.',
whatsappThanksLine: 'Thank you!',
};
const COPY_SV: BookingEventsCopy = {
...COPY_EN,
heroBadge: 'Ät • Fira • Samla',
heroTitle: 'Boka bord eller boka ditt evenemang',
heroSubtitle:
'Från en intim middag till födelsedagar, bröllop, förlovningar och kontorsfester — Shahi Kitchen skapar oförglömliga stunder i Göteborg.',
experienceDiningTitle: 'Intim middag',
experienceDiningDesc: 'Lugna bord, varm gästfrihet och dina Shahi-favoriter.',
experienceCelebrateTitle: 'Livets firanden',
experienceCelebrateDesc: 'Födelsedagar, förlovningar, bröllop, jubileum & milstolpar.',
experienceCorporateTitle: 'Team & kontor',
experienceCorporateDesc: 'Luncher, avsked, teamutflykter & företagssammankomster.',
modeTable: 'Bordsbokning',
modeTableDesc: 'Boka bord för middag',
modeEvent: 'Privat evenemang',
modeEventDesc: 'Födelsedagar, bröllop & mer',
eventPickerTitle: 'Vad firar ni?',
eventPickerSubtitle: 'Välj tillfälle — vi anpassar plats, menyidéer och upplägg till ert event.',
eventTypeOtherLabel: 'Beskriv ert firande',
eventTypeOtherPlaceholder: 't.ex. förlovningsmiddag, företagsgalan…',
eventTypeRequired: 'Välj en typ av evenemang.',
eventTypeOtherRequired: 'Beskriv ert firande.',
formSubtitleTable: 'Berätta när ni vill äta hos oss.',
formSubtitleEvent: 'Dela eventdetaljer — vårt team skapar en minnesvärd Shahi-upplevelse.',
whatsappEventLine: 'Tillfälle',
whatsappModeTable: 'Bordsbokning',
whatsappModeEvent: 'Bokning av privat evenemang',
whatsappGreeting: 'Hej Shahi Kitchen 👋',
whatsappLabelName: 'Namn',
whatsappLabelPhone: 'Telefon',
whatsappLabelEmail: 'E-post',
whatsappLabelLocation: 'Plats',
whatsappLabelDate: 'Datum',
whatsappLabelTime: 'Tid',
whatsappLabelGuests: 'Gäster',
whatsappLabelNotes: 'Särskilda önskemål',
whatsappLabelPreOrder: 'Förbeställda rätter',
whatsappPreOrderNone: 'Inga',
whatsappPreOrderTotal: 'Förbeställning totalt',
whatsappConfirmLine: 'Vänligen bekräfta tillgänglighet och förbeställning.',
whatsappThanksLine: 'Tack!',
};
const COPY_LOCALIZED: Partial<Record<Language, BookingEventsCopy>> = {
sv: COPY_SV,
};
export function getBookingEventsCopy(lang: Language): BookingEventsCopy {
if (lang === 'en') return COPY_EN;
return COPY_LOCALIZED[lang] ?? COPY_EN;
}
export function getEventTypeLabel(lang: Language, id: EventTypeId): string {
if (lang === 'en') return EVENT_LABELS_EN[id];
return LOCALIZED[lang]?.[id] ?? EVENT_LABELS_EN[id];
}
export function toBookingMessageCopy(
copy: BookingEventsCopy,
location: { askim: string; backaplan: string },
): BookingMessageCopy {
return {
askim: location.askim,
backaplan: location.backaplan,
modeTable: copy.whatsappModeTable,
modeEvent: copy.whatsappModeEvent,
eventLine: copy.whatsappEventLine,
greeting: copy.whatsappGreeting,
labelName: copy.whatsappLabelName,
labelPhone: copy.whatsappLabelPhone,
labelEmail: copy.whatsappLabelEmail,
labelLocation: copy.whatsappLabelLocation,
labelDate: copy.whatsappLabelDate,
labelTime: copy.whatsappLabelTime,
labelGuests: copy.whatsappLabelGuests,
labelNotes: copy.whatsappLabelNotes,
labelPreOrder: copy.whatsappLabelPreOrder,
preOrderNone: copy.whatsappPreOrderNone,
preOrderTotal: copy.whatsappPreOrderTotal,
confirmLine: copy.whatsappConfirmLine,
thanksLine: copy.whatsappThanksLine,
};
}