Skip to content

Add custom RealUnit mail template#3598

Draft
TaprootFreak wants to merge 9 commits intodevelopfrom
feat/realunit-mail-template
Draft

Add custom RealUnit mail template#3598
TaprootFreak wants to merge 9 commits intodevelopfrom
feat/realunit-mail-template

Conversation

@TaprootFreak
Copy link
Copy Markdown
Collaborator

Summary

  • Add dedicated realunit.hbs Handlebars template with RealUnit-branded design (light background, RealUnit logo, blue accent #1988C6, formal language, legal footer)
  • Switch RealUnit wallet config from user-v2 to realunit template
  • Static footer includes RealUnit address, Datenschutz/Impressum links, YouTube + LinkedIn social icons
  • Optional {{securityHint}} block for transaction-related mails

Test plan

  • Verify mail rendering for RealUnit wallet users (buy completed, KYC, login, verification code)
  • Confirm non-RealUnit wallets still use user-v2 template
  • Check Outlook/MSO compatibility with VML fallbacks

Replace the generic user-v2 template with a dedicated RealUnit-branded
template featuring light background, RealUnit logo, blue accent color,
formal language, RealUnit social links, and legal footer.
Introduce wallet-aware translations in MailFactory with automatic
fallback: tries mail-{wallet}.json namespace first, falls back to
default mail.json. Includes complete German translations for RealUnit
with formal language, custom subjects, and RealUnit-specific content.
Suppresses DFX_TEAM_CLOSING for wallets with custom templates.
- Add wallet body text injection: factory auto-derives .body key from
  title key and prepends it to texts array if wallet translation exists
- Filter empty text blocks from rendered mail affix array
- Add body texts for crypto_output, fiat_output, processing, chargeback
- Set general.support/thanks/link/transaction_button to empty (template
  handles closing) to avoid duplicate content
- Fix template closing: "Freundliche Grüsse / RealUnit Schweiz AG"
- Fix template support: info@realunit.ch + DFX tech support link
- Update merge_incomplete text per Textvorlagen (#9)
@TaprootFreak TaprootFreak force-pushed the feat/realunit-mail-template branch from ab46a5f to ab6245f Compare April 22, 2026 11:27
RealUnit customers must never receive links to DFX pages. All links
must be deeplinks to the RealUnit App. Until app deeplinks for support
are implemented, route all inquiries through info@realunit.ch.
- #3: Add "von CHF 1'000.-" to monthly limit text
- #4: Add "von CHF 100'000.-" to annual limit text
- #7: Add "bei DFX AG" to video ident line2
- #12: Add body key for chargeback.crypto with doc text
- #17: Add missing first sentence to fiat_output.body
Add all missing translation keys that would fall back to informal DFX
texts. Follows the Textvorlagen author's principles throughout:
- RealUnit is the brand, DFX only mentioned where regulatory required
- Product-specific language (RealUnit-Token, RealUnit-Aktientoken)
- RealUnit App as the central touchpoint
- Formal Sie throughout, no informal du anywhere

New keys added:
- All chargeback reasons (30+ keys) in formal language
- All pending phone/olky/bank_tx variants with RealUnit context
- Referral/Recommendation adapted to RealUnit App
- KYC success: mentions RealUnit-Token trading capability
- KYC reminder/missing_data: references RealUnit App
- Account deactivation: explains token remain in wallet
- Support message: references RealUnit App instead of URL
- Fiat input titles: "Kauf RealUnit-Token" prefix
- currency_exchange, kyc_start, payment_link in formal language

Only intentionally missing: dfx_team_closing (suppressed by factory),
black_squad (DFX-exclusive, not applicable to RealUnit).
Remove payment_data (Zession) and phone check pending variants - these
features are not used in the RealUnit App context.
Add scripts/generate-realunit-previews.js alongside the existing DFX
preview generator. Uses wallet-aware translations with fallback, same
as production. Output goes to scripts/email-previews/realunit/ (gitignored).

Usage: node scripts/generate-realunit-previews.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant