User edited gift-email-fr in the Unlayer editor with richer marketing
copy (loyalty thanks, brand manifesto, 3.5 Gbit/s upsell, helpful CTA).
Mirror those edits to the EN template via a one-shot translation script
so the bilingual pair stays in sync for the next campaign send.
Translation strategy: plain-string find/replace mapping with FR
phrases in longest-first order to avoid partial matches. Applied to
BOTH the rendered .html (what the recipient sees) AND the .json
(Unlayer design tree — so re-opening the EN editor preserves the
matching structure).
Mapping coverage:
• Intro paragraphs (greeting, gift announcement, loyalty thanks,
brand manifesto, speed upsell, "we're around the corner")
• Offer info pill (amount, instant activation, commitment)
• CTA button labels (Activer → Redeem, Choisir → Pick)
• Prorata refund disclaimer
• Option 2 "do nothing" text
• Signature ("Merci de faire rouler" → "Thanks for helping...thrive")
• Footer contact info + "Tous droits réservés" → "All rights reserved"
• <html lang="fr"> → <html lang="en">
23/28 translation rules matched; the 5 unused ones were for legacy
phrasing not present in the user's latest save (e.g. the old "Tu
choisis local" line that was replaced by the current intro).
Also: drop the obsolete .mjml source files. Now that Unlayer is the
canonical editor, the MJML→HTML compile pipeline is no longer used
on save (Unlayer outputs HTML directly). The .mjml files were stale
copies from the previous MJML-based editor. Removed from disk on
prod and from git history; rollback via git revert if needed.
Verified live: GET /campaigns/templates/gift-email-en returns the
translated content (9 EN markers detected in HTML). Test-send to
louis@targo.ca queued via Mailjet for visual QA.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>