Add custom RealUnit mail template#3598
Draft
TaprootFreak wants to merge 9 commits intodevelopfrom
Draft
Conversation
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)
ab46a5f to
ab6245f
Compare
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
realunit.hbsHandlebars template with RealUnit-branded design (light background, RealUnit logo, blue accent#1988C6, formal language, legal footer)user-v2torealunittemplate{{securityHint}}block for transaction-related mailsTest plan
user-v2template