diff --git a/CHANGELOG.md b/CHANGELOG.md index fdae6ae..bf693d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). translated footer; ~70 new translation keys (EN + DE); all task payloads now carry `lang` from request context at enqueue time; payloads without `lang` gracefully default to English +- **Email design & copy upgrade** — redesigned `_email_wrap()`: replaced monogram + header with lowercase wordmark matching website, added 3px blue accent border, + preheader text support (hidden preview in email clients), HR separators between + heading and body; `_email_button()` now full-width block for mobile tap targets; + rewrote copy for all 9 emails with improved subject lines, urgency cues, + quick-start links in welcome email, styled project recap cards in quote + verification, heat badges on lead forward emails, "what happens next" section + in lead matched notifications, and secondary CTAs; ~30 new/updated translation + keys in both EN and DE ### Changed - **Resend audiences restructured** — replaced dynamic `waitlist-{blueprint}` diff --git a/web/src/padelnomics/locales/de.json b/web/src/padelnomics/locales/de.json index 7ca09be..2284897 100644 --- a/web/src/padelnomics/locales/de.json +++ b/web/src/padelnomics/locales/de.json @@ -1539,44 +1539,60 @@ "bp_lbl_disclaimer": "Haftungsausschluss: Dieser Businessplan wurde auf Basis benutzerdefinierter Annahmen mit dem Padelnomics-Finanzmodell erstellt. Alle Prognosen sind Sch\u00e4tzungen und stellen keine Finanzberatung dar. Die tats\u00e4chlichen Ergebnisse k\u00f6nnen je nach Marktbedingungen, Umsetzung und anderen Faktoren erheblich abweichen. Konsultiere Finanzberater, bevor du Investitionsentscheidungen triffst. \u00a9 Padelnomics \u2014 padelnomics.io", "email_magic_link_heading": "Bei {app_name} anmelden", - "email_magic_link_body": "Klicke auf den Button unten, um dich anzumelden. Dieser Link l\u00e4uft in {expiry_minutes} Minuten ab.", - "email_magic_link_btn": "Anmelden", + "email_magic_link_body": "Hier ist dein Anmeldelink. Er l\u00e4uft in {expiry_minutes} Minuten ab.", + "email_magic_link_btn": "Anmelden \u2192", "email_magic_link_fallback": "Wenn der Button nicht funktioniert, kopiere diese URL in deinen Browser:", "email_magic_link_ignore": "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren.", - "email_magic_link_subject": "Bei {app_name} anmelden", + "email_magic_link_subject": "Dein Anmeldelink f\u00fcr {app_name}", + "email_magic_link_preheader": "Dieser Link l\u00e4uft in {expiry_minutes} Minuten ab", - "email_quote_verify_heading": "Best\u00e4tige deine E-Mail f\u00fcr Anbieter-Angebote", + "email_quote_verify_heading": "Best\u00e4tige deine E-Mail f\u00fcr Angebote", "email_quote_verify_greeting": "Hallo {first_name},", - "email_quote_verify_body": "Danke f\u00fcr deine Angebotsanfrage{project_desc}. Klicke auf den Button unten, um deine E-Mail zu best\u00e4tigen und deine Anfrage zu aktivieren. Dabei wird auch dein {app_name}-Konto erstellt, damit du dein Projekt verfolgen kannst.", - "email_quote_verify_btn": "Best\u00e4tigen & Angebot aktivieren", + "email_quote_verify_body": "Danke f\u00fcr deine Angebotsanfrage. Best\u00e4tige deine E-Mail, um deine Anfrage zu aktivieren und dein {app_name}-Konto zu erstellen.", + "email_quote_verify_project_label": "Dein Projekt:", + "email_quote_verify_urgency": "Verifizierte Anfragen werden von unserem Anbieternetzwerk bevorzugt behandelt.", + "email_quote_verify_btn": "Best\u00e4tigen & Aktivieren \u2192", "email_quote_verify_expires": "Dieser Link l\u00e4uft in 60 Minuten ab.", "email_quote_verify_fallback": "Wenn der Button nicht funktioniert, kopiere diese URL in deinen Browser:", "email_quote_verify_ignore": "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren.", - "email_quote_verify_subject": "Best\u00e4tige deine E-Mail f\u00fcr Anbieter-Angebote", + "email_quote_verify_subject": "Best\u00e4tige deine E-Mail \u2014 Anbieter sind bereit f\u00fcr Angebote", + "email_quote_verify_preheader": "Ein Klick, um deine Angebotsanfrage zu aktivieren", + "email_quote_verify_preheader_courts": "Ein Klick, um dein {court_count}-Court-Projekt zu aktivieren", - "email_welcome_heading": "Willkommen bei {app_name}!", - "email_welcome_body": "Danke f\u00fcr deine Anmeldung. Du kannst jetzt mit der Planung deines Padel-Gesch\u00e4fts loslegen.", - "email_welcome_btn": "Zum Dashboard", - "email_welcome_subject": "Willkommen bei {app_name}", + "email_welcome_heading": "Willkommen bei {app_name}", + "email_welcome_greeting": "Hallo {first_name},", + "email_welcome_body": "Du hast jetzt Zugang zum Finanzplaner, Marktdaten und dem Anbieterverzeichnis \u2014 alles, was du f\u00fcr die Planung deines Padel-Gesch\u00e4fts brauchst.", + "email_welcome_quickstart_heading": "Schnellstart:", + "email_welcome_link_planner": "Finanzplaner \u2014 modelliere deine Investition", + "email_welcome_link_markets": "Marktdaten \u2014 erkunde die Padel-Nachfrage nach Stadt", + "email_welcome_link_quotes": "Angebote einholen \u2014 verbinde dich mit verifizierten Anbietern", + "email_welcome_btn": "Jetzt planen \u2192", + "email_welcome_subject": "Du bist dabei \u2014 so f\u00e4ngst du an", + "email_welcome_preheader": "Dein Padel-Planungstoolkit ist bereit", "email_waitlist_supplier_heading": "Du stehst auf der Anbieter-Warteliste", - "email_waitlist_supplier_body": "Danke f\u00fcr dein Interesse am {plan_name}-Plan. Wir bauen die ultimative Anbieter-Plattform f\u00fcr Padel-Unternehmer.", - "email_waitlist_supplier_perks": "Du erf\u00e4hrst als Erster, wenn wir starten. Wir senden dir fr\u00fchen Zugang, exklusive Launch-Preise und Onboarding-Unterst\u00fctzung.", + "email_waitlist_supplier_body": "Danke f\u00fcr dein Interesse am {plan_name}-Plan. Wir bauen eine Plattform, die dich mit qualifizierten Leads von Padel-Unternehmern verbindet, die aktiv Projekte planen.", + "email_waitlist_supplier_perks_intro": "Als fr\u00fches Wartelisten-Mitglied erh\u00e4ltst du:", + "email_waitlist_supplier_perk_1": "Fr\u00fchen Zugang vor dem \u00f6ffentlichen Launch", + "email_waitlist_supplier_perk_2": "Exklusive Launch-Preise (gesichert)", + "email_waitlist_supplier_perk_3": "Pers\u00f6nliches Onboarding-Gespr\u00e4ch", "email_waitlist_supplier_meanwhile": "In der Zwischenzeit erkunde unsere kostenlosen Ressourcen:", "email_waitlist_supplier_link_planner": "Finanzplanungstool \u2014 plane deine Padel-Anlage", "email_waitlist_supplier_link_directory": "Anbieterverzeichnis \u2014 verifizierte Anbieter durchsuchen", - "email_waitlist_supplier_subject": "Du stehst auf der Liste \u2014 {app_name} {plan_name} startet bald", + "email_waitlist_supplier_subject": "Du bist dabei \u2014 {plan_name} fr\u00fcher Zugang kommt", + "email_waitlist_supplier_preheader": "Exklusive Launch-Preise + bevorzugtes Onboarding", "email_waitlist_general_heading": "Du stehst auf der Warteliste", - "email_waitlist_general_body": "Danke, dass du dich auf die Warteliste eingetragen hast. Wir bereiten den Start der ultimativen Planungsplattform f\u00fcr Padel-Unternehmer vor.", - "email_waitlist_general_perks_intro": "Du bist unter den Ersten, die Zugang erhalten. Wir senden dir:", - "email_waitlist_general_perk_1": "Fr\u00fchen Zugang zur gesamten Plattform", - "email_waitlist_general_perk_2": "Exklusive Launch-Boni", + "email_waitlist_general_body": "Danke f\u00fcr deine Anmeldung. Wir bauen die Planungsplattform f\u00fcr Padel-Unternehmer \u2014 Finanzmodellierung, Marktdaten und Anbietervernetzung an einem Ort.", + "email_waitlist_general_perks_intro": "Als fr\u00fches Wartelisten-Mitglied erh\u00e4ltst du:", + "email_waitlist_general_perk_1": "Fr\u00fchen Zugang vor dem \u00f6ffentlichen Launch", + "email_waitlist_general_perk_2": "Exklusive Launch-Preise", "email_waitlist_general_perk_3": "Priorit\u00e4ts-Onboarding und Support", "email_waitlist_general_outro": "Wir melden uns bald.", - "email_waitlist_general_subject": "Du stehst auf der Liste \u2014 {app_name} startet bald", + "email_waitlist_general_subject": "Du stehst auf der Liste \u2014 wir benachrichtigen dich zum Launch", + "email_waitlist_general_preheader": "Fr\u00fcher Zugang + exklusive Launch-Preise", "email_lead_forward_heading": "Neues Projekt-Lead", - "email_lead_forward_subheading": "Ein neues Padel-Projekt passt zu deinen Leistungen.", + "email_lead_forward_urgency": "Dieses Lead wurde gerade freigeschaltet. Anbieter, die innerhalb von 24 Stunden antworten, gewinnen 3x h\u00e4ufiger das Projekt.", "email_lead_forward_section_brief": "Projektbeschreibung", "email_lead_forward_section_contact": "Kontakt", "email_lead_forward_lbl_facility": "Anlage", @@ -1591,27 +1607,38 @@ "email_lead_forward_lbl_phone": "Telefon", "email_lead_forward_lbl_company": "Unternehmen", "email_lead_forward_lbl_role": "Rolle", - "email_lead_forward_btn": "Im Lead-Feed ansehen", + "email_lead_forward_btn": "Im Lead-Feed ansehen \u2192", + "email_lead_forward_reply_direct": "oder direkt an {contact_email} antworten", + "email_lead_forward_preheader_suffix": "Kontaktdaten enthalten", - "email_lead_matched_heading": "Ein Anbieter pr\u00fcft dein Projekt", + "email_lead_matched_heading": "Ein Anbieter m\u00f6chte dein Projekt besprechen", "email_lead_matched_greeting": "Hallo {first_name},", - "email_lead_matched_body": "Gute Nachrichten \u2014 ein verifizierter Anbieter wurde mit deinem Padel-Projekt abgeglichen. Er hat deine Projektbeschreibung und wird sich direkt bei dir melden.", + "email_lead_matched_body": "Gute Nachrichten \u2014 ein verifizierter Anbieter wurde mit deinem Padel-Projekt abgeglichen. Er hat deine Projektbeschreibung und Kontaktdaten.", "email_lead_matched_context": "Du hast eine Angebotsanfrage f\u00fcr eine {facility_type}-Anlage mit {court_count} Pl\u00e4tzen in {country} eingereicht.", - "email_lead_matched_btn": "Zum Dashboard", + "email_lead_matched_next_heading": "Was passiert als N\u00e4chstes", + "email_lead_matched_next_body": "Der Anbieter hat deine Projektbeschreibung und Kontaktdaten erhalten. Die meisten Anbieter melden sich innerhalb von 24\u201348 Stunden per E-Mail oder Telefon.", + "email_lead_matched_tip": "Tipp: Schnelles Reagieren auf Anbieter-Kontaktaufnahmen erh\u00f6ht deine Chance auf wettbewerbsf\u00e4hige Angebote.", + "email_lead_matched_btn": "Zum Dashboard \u2192", "email_lead_matched_note": "Du erh\u00e4ltst diese Benachrichtigung jedes Mal, wenn ein neuer Anbieter deine Projektdetails freischaltet.", - "email_lead_matched_subject": "Ein Anbieter pr\u00fcft dein Padel-Projekt", + "email_lead_matched_subject": "{first_name}, ein Anbieter m\u00f6chte dein Projekt besprechen", + "email_lead_matched_preheader": "Der Anbieter wird sich direkt bei dir melden \u2014 das erwartet dich", - "email_enquiry_heading": "Neue Anfrage \u00fcber {app_name}", - "email_enquiry_body": "Du hast eine neue Verzeichnisanfrage f\u00fcr {supplier_name}.", + "email_enquiry_heading": "Neue Anfrage von {contact_name}", + "email_enquiry_body": "Du hast eine neue Anfrage \u00fcber deinen {supplier_name}-Verzeichniseintrag.", "email_enquiry_lbl_from": "Von", "email_enquiry_lbl_message": "Nachricht", - "email_enquiry_reply": "Antworte direkt an {contact_email}.", - "email_enquiry_subject": "Neue Anfrage \u00fcber {app_name}: {contact_name}", + "email_enquiry_respond_fast": "Antworte innerhalb von 24 Stunden f\u00fcr den besten Eindruck.", + "email_enquiry_reply": "Antworte direkt an {contact_email}.", + "email_enquiry_subject": "Neue Anfrage von {contact_name} \u00fcber deinen Verzeichniseintrag", + "email_enquiry_preheader": "Antworte, um mit diesem potenziellen Kunden in Kontakt zu treten", "email_business_plan_heading": "Dein Businessplan ist fertig", "email_business_plan_body": "Dein Padel-Businessplan wurde als PDF erstellt und steht zum Download bereit.", - "email_business_plan_btn": "PDF herunterladen", - "email_business_plan_subject": "Dein Padel-Businessplan ist fertig", + "email_business_plan_includes": "Dein Plan enth\u00e4lt Investitions\u00fcbersicht, Umsatzprognosen und Break-Even-Analyse.", + "email_business_plan_btn": "PDF herunterladen \u2192", + "email_business_plan_quote_cta": "Bereit f\u00fcr den n\u00e4chsten Schritt? Angebote von Anbietern einholen \u2192", + "email_business_plan_subject": "Dein Businessplan-PDF steht zum Download bereit", + "email_business_plan_preheader": "Professioneller Padel-Finanzplan \u2014 jetzt herunterladen", "email_footer_tagline": "Die Planungsplattform f\u00fcr Padel-Unternehmer", "email_footer_copyright": "\u00a9 {year} {app_name}. Du erh\u00e4ltst diese E-Mail, weil du ein Konto hast oder eine Anfrage gestellt hast." diff --git a/web/src/padelnomics/locales/en.json b/web/src/padelnomics/locales/en.json index 31cf522..e11c0dd 100644 --- a/web/src/padelnomics/locales/en.json +++ b/web/src/padelnomics/locales/en.json @@ -1539,44 +1539,60 @@ "bp_lbl_disclaimer": "Disclaimer: This business plan is generated from user-provided assumptions using the Padelnomics financial model. All projections are estimates and do not constitute financial advice. Actual results may vary significantly based on market conditions, execution, and other factors. Consult with financial advisors before making investment decisions. \u00a9 Padelnomics \u2014 padelnomics.io", "email_magic_link_heading": "Sign in to {app_name}", - "email_magic_link_body": "Click the button below to sign in. This link expires in {expiry_minutes} minutes.", - "email_magic_link_btn": "Sign In", + "email_magic_link_body": "Here's your sign-in link. It expires in {expiry_minutes} minutes.", + "email_magic_link_btn": "Sign In \u2192", "email_magic_link_fallback": "If the button doesn't work, copy and paste this URL into your browser:", "email_magic_link_ignore": "If you didn't request this, you can safely ignore this email.", - "email_magic_link_subject": "Sign in to {app_name}", + "email_magic_link_subject": "Your sign-in link for {app_name}", + "email_magic_link_preheader": "This link expires in {expiry_minutes} minutes", - "email_quote_verify_heading": "Verify your email to get supplier quotes", + "email_quote_verify_heading": "Verify your email to get quotes", "email_quote_verify_greeting": "Hi {first_name},", - "email_quote_verify_body": "Thanks for requesting quotes{project_desc}. Click the button below to verify your email and activate your quote request. This will also create your {app_name} account so you can track your project.", - "email_quote_verify_btn": "Verify & Activate Quote", + "email_quote_verify_body": "Thanks for requesting quotes. Verify your email to activate your quote request and create your {app_name} account.", + "email_quote_verify_project_label": "Your project:", + "email_quote_verify_urgency": "Verified requests get prioritized by our supplier network.", + "email_quote_verify_btn": "Verify & Activate \u2192", "email_quote_verify_expires": "This link expires in 60 minutes.", "email_quote_verify_fallback": "If the button doesn't work, copy and paste this URL into your browser:", "email_quote_verify_ignore": "If you didn't request this, you can safely ignore this email.", - "email_quote_verify_subject": "Verify your email to get supplier quotes", + "email_quote_verify_subject": "Verify your email \u2014 suppliers are ready to quote", + "email_quote_verify_preheader": "One click to activate your quote request", + "email_quote_verify_preheader_courts": "One click to activate your {court_count}-court project", - "email_welcome_heading": "Welcome to {app_name}!", - "email_welcome_body": "Thanks for signing up. You're all set to start planning your padel business.", - "email_welcome_btn": "Go to Dashboard", - "email_welcome_subject": "Welcome to {app_name}", + "email_welcome_heading": "Welcome to {app_name}", + "email_welcome_greeting": "Hi {first_name},", + "email_welcome_body": "You now have access to the financial planner, market data, and supplier directory \u2014 everything you need to plan your padel business.", + "email_welcome_quickstart_heading": "Quick start:", + "email_welcome_link_planner": "Financial Planner \u2014 model your investment", + "email_welcome_link_markets": "Market Data \u2014 explore padel demand by city", + "email_welcome_link_quotes": "Get Quotes \u2014 connect with verified suppliers", + "email_welcome_btn": "Start Planning \u2192", + "email_welcome_subject": "You're in \u2014 here's how to start planning", + "email_welcome_preheader": "Your padel business planning toolkit is ready", "email_waitlist_supplier_heading": "You're on the Supplier Waitlist", - "email_waitlist_supplier_body": "Thanks for your interest in the {plan_name} plan. We're building the ultimate supplier platform for padel entrepreneurs.", - "email_waitlist_supplier_perks": "You'll be among the first to know when we launch. We'll send you early access, exclusive launch pricing, and onboarding support.", + "email_waitlist_supplier_body": "Thanks for your interest in the {plan_name} plan. We're building a platform to connect you with qualified leads from padel entrepreneurs actively planning projects.", + "email_waitlist_supplier_perks_intro": "As an early waitlist member, you'll get:", + "email_waitlist_supplier_perk_1": "Early access before public launch", + "email_waitlist_supplier_perk_2": "Exclusive launch pricing (locked in)", + "email_waitlist_supplier_perk_3": "Dedicated onboarding call", "email_waitlist_supplier_meanwhile": "In the meantime, explore our free resources:", "email_waitlist_supplier_link_planner": "Financial Planning Tool \u2014 model your padel facility", "email_waitlist_supplier_link_directory": "Supplier Directory \u2014 browse verified suppliers", - "email_waitlist_supplier_subject": "You're on the list \u2014 {app_name} {plan_name} is launching soon", + "email_waitlist_supplier_subject": "You're in \u2014 {plan_name} early access is coming", + "email_waitlist_supplier_preheader": "Exclusive launch pricing + priority onboarding", "email_waitlist_general_heading": "You're on the Waitlist", - "email_waitlist_general_body": "Thanks for joining the waitlist. We're preparing to launch the ultimate planning platform for padel entrepreneurs.", - "email_waitlist_general_perks_intro": "You'll be among the first to get access when we open. We'll send you:", - "email_waitlist_general_perk_1": "Early access to the full platform", - "email_waitlist_general_perk_2": "Exclusive launch bonuses", + "email_waitlist_general_body": "Thanks for joining. We're building the planning platform for padel entrepreneurs \u2014 financial modelling, market data, and supplier connections in one place.", + "email_waitlist_general_perks_intro": "As an early waitlist member, you'll get:", + "email_waitlist_general_perk_1": "Early access before public launch", + "email_waitlist_general_perk_2": "Exclusive launch pricing", "email_waitlist_general_perk_3": "Priority onboarding and support", "email_waitlist_general_outro": "We'll be in touch soon.", - "email_waitlist_general_subject": "You're on the list \u2014 {app_name} is launching soon", + "email_waitlist_general_subject": "You're on the list \u2014 we'll notify you at launch", + "email_waitlist_general_preheader": "Early access + exclusive launch pricing", "email_lead_forward_heading": "New Project Lead", - "email_lead_forward_subheading": "A new padel project matches your services.", + "email_lead_forward_urgency": "This lead was just unlocked. Suppliers who respond within 24 hours are 3x more likely to win the project.", "email_lead_forward_section_brief": "Project Brief", "email_lead_forward_section_contact": "Contact", "email_lead_forward_lbl_facility": "Facility", @@ -1591,27 +1607,38 @@ "email_lead_forward_lbl_phone": "Phone", "email_lead_forward_lbl_company": "Company", "email_lead_forward_lbl_role": "Role", - "email_lead_forward_btn": "View in Lead Feed", + "email_lead_forward_btn": "View in Lead Feed \u2192", + "email_lead_forward_reply_direct": "or reply directly to {contact_email}", + "email_lead_forward_preheader_suffix": "contact details inside", - "email_lead_matched_heading": "A supplier is reviewing your project", + "email_lead_matched_heading": "A supplier wants to discuss your project", "email_lead_matched_greeting": "Hi {first_name},", - "email_lead_matched_body": "Great news \u2014 a verified supplier has been matched with your padel project. They have your project brief and will reach out to you directly.", + "email_lead_matched_body": "Great news \u2014 a verified supplier has been matched with your padel project. They have your project brief and contact details.", "email_lead_matched_context": "You submitted a quote request for a {facility_type} facility with {court_count} courts in {country}.", - "email_lead_matched_btn": "View Your Dashboard", + "email_lead_matched_next_heading": "What happens next", + "email_lead_matched_next_body": "The supplier has received your project brief and contact details. Most suppliers respond within 24\u201348 hours via email or phone.", + "email_lead_matched_tip": "Tip: Responding quickly to supplier outreach increases your chance of getting competitive quotes.", + "email_lead_matched_btn": "View Your Dashboard \u2192", "email_lead_matched_note": "You'll receive this notification each time a new supplier unlocks your project details.", - "email_lead_matched_subject": "A supplier is reviewing your padel project", + "email_lead_matched_subject": "{first_name}, a supplier wants to discuss your project", + "email_lead_matched_preheader": "They'll reach out to you directly \u2014 here's what to expect", - "email_enquiry_heading": "New enquiry via {app_name}", - "email_enquiry_body": "You have a new directory enquiry for {supplier_name}.", + "email_enquiry_heading": "New enquiry from {contact_name}", + "email_enquiry_body": "You have a new enquiry via your {supplier_name} directory listing.", "email_enquiry_lbl_from": "From", "email_enquiry_lbl_message": "Message", - "email_enquiry_reply": "Reply directly to {contact_email} to respond.", - "email_enquiry_subject": "New enquiry via {app_name}: {contact_name}", + "email_enquiry_respond_fast": "Respond within 24 hours for the best impression.", + "email_enquiry_reply": "Reply directly to {contact_email} to connect.", + "email_enquiry_subject": "New enquiry from {contact_name} via your directory listing", + "email_enquiry_preheader": "Reply to connect with this potential client", - "email_business_plan_heading": "Your Business Plan is Ready", + "email_business_plan_heading": "Your business plan is ready", "email_business_plan_body": "Your padel business plan PDF has been generated and is ready for download.", - "email_business_plan_btn": "Download PDF", - "email_business_plan_subject": "Your Padel Business Plan PDF is Ready", + "email_business_plan_includes": "Your plan includes investment breakdown, revenue projections, and break-even analysis.", + "email_business_plan_btn": "Download PDF \u2192", + "email_business_plan_quote_cta": "Ready for the next step? Get quotes from suppliers \u2192", + "email_business_plan_subject": "Your business plan PDF is ready to download", + "email_business_plan_preheader": "Professional padel facility financial plan \u2014 download now", "email_footer_tagline": "The padel business planning platform", "email_footer_copyright": "\u00a9 {year} {app_name}. You received this email because you have an account or submitted a request." diff --git a/web/src/padelnomics/worker.py b/web/src/padelnomics/worker.py index def5f09..f93bb28 100644 --- a/web/src/padelnomics/worker.py +++ b/web/src/padelnomics/worker.py @@ -24,11 +24,23 @@ def _t(key: str, lang: str = "en", **kwargs) -> str: return raw.format(**kwargs) if kwargs else raw -def _email_wrap(body: str, lang: str = "en") -> str: - """Wrap email body in a branded layout with inline CSS.""" +def _email_wrap(body: str, lang: str = "en", preheader: str = "") -> str: + """Wrap email body in a branded layout with inline CSS. + + preheader: hidden preview text shown in email client list views. + """ year = datetime.utcnow().year tagline = _t("email_footer_tagline", lang) copyright_text = _t("email_footer_copyright", lang, year=year, app_name=config.APP_NAME) + # Hidden preheader trick: visible text + invisible padding to prevent + # email clients from pulling body text into the preview. + preheader_html = "" + if preheader: + preheader_html = ( + f'' + ) return f"""\ @@ -38,23 +50,19 @@ def _email_wrap(body: str, lang: str = "en") -> str: