WinterCMS research
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
---
|
||||
phase: 16-content-localization
|
||||
plan: 02
|
||||
subsystem: i18n
|
||||
tags: [translation, twig, email, wintercms, locale]
|
||||
|
||||
# Dependency graph
|
||||
requires:
|
||||
- phase: 11-translation-infrastructure
|
||||
provides: Translate plugin with |_ filter and message DB
|
||||
provides:
|
||||
- Translatable professional verification emails (approved, rejected, submitted)
|
||||
- Polish translations for 28 email strings
|
||||
- German translations for 28 email strings
|
||||
affects: [17-testing-qa, future-email-templates]
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns: [email-translation-filter-pattern, migration-seeder-for-translations]
|
||||
|
||||
key-files:
|
||||
created:
|
||||
- plugins/golem15/quotify/updates/v1.4.1/add_email_translations.php
|
||||
modified:
|
||||
- plugins/golem15/quotify/views/mail/professional_approved.htm
|
||||
- plugins/golem15/quotify/views/mail/professional_rejected.htm
|
||||
- plugins/golem15/quotify/views/mail/professional_submitted.htm
|
||||
- plugins/golem15/quotify/updates/version.yaml
|
||||
|
||||
key-decisions:
|
||||
- "Use MD5 hash code pattern for message storage (consistent with Translate plugin)"
|
||||
- "Create migration seeder for translations (v1.4.1) for reproducibility across environments"
|
||||
- "Polish uses informal Ty form for friendliness (matching existing theme patterns)"
|
||||
- "German uses formal Sie form for professional business context"
|
||||
|
||||
patterns-established:
|
||||
- "Email translation: Use |_ filter on all static text, keep dynamic vars outside filter"
|
||||
- "Translation seeder: Use DB::table() with MD5 hash codes and JSON message_data"
|
||||
|
||||
# Metrics
|
||||
duration: 3min
|
||||
completed: 2026-02-02
|
||||
---
|
||||
|
||||
# Phase 16 Plan 02: Email Template Translations Summary
|
||||
|
||||
**Professional verification emails (approved, rejected, submitted) now fully translatable with Polish and German via migration seeder**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** 3 min
|
||||
- **Started:** 2026-02-02T11:07:46Z
|
||||
- **Completed:** 2026-02-02T11:11:02Z
|
||||
- **Tasks:** 3
|
||||
- **Files modified:** 5
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- All three professional verification emails now use |_ filter for translations
|
||||
- Subject lines translatable (wrapped in Twig translation filter)
|
||||
- 28 email string translations added for Polish and German
|
||||
- Migration seeder created for reproducible translation deployment
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: Add translation filter to professional_approved.htm** - `2ce3c65` (feat)
|
||||
2. **Task 2: Add translation filter to professional_rejected.htm and professional_submitted.htm** - `5090d2f` (feat)
|
||||
3. **Task 3: Add Polish and German translations for email strings** - `bba72ae` (feat)
|
||||
|
||||
**Submodule update:** `db354b3` (chore: update quotify submodule)
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `plugins/golem15/quotify/views/mail/professional_approved.htm` - Translatable approval email
|
||||
- `plugins/golem15/quotify/views/mail/professional_rejected.htm` - Translatable rejection email
|
||||
- `plugins/golem15/quotify/views/mail/professional_submitted.htm` - Translatable submission email
|
||||
- `plugins/golem15/quotify/updates/v1.4.1/add_email_translations.php` - Translation seeder migration
|
||||
- `plugins/golem15/quotify/updates/version.yaml` - Added v1.4.1 migration entry
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- **MD5 hash for message codes:** Consistent with existing Translate plugin pattern (code = md5(trim(message)))
|
||||
- **Migration seeder approach:** Using DB::table() for translations ensures reproducibility when deploying to new environments
|
||||
- **German formal Sie form:** Professional business context warrants formal address (matches Phase 14 decision)
|
||||
- **Polish informal Ty form:** Warmer, more approachable tone for user-facing emails
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None - plan executed exactly as written.
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
- **translate:scan --include-themes flag:** Plan referenced non-existent flag. Used `translate:scan` without flag successfully.
|
||||
- **Submodule structure:** Quotify plugin is a git submodule, requiring commits in submodule first then updating reference in main repo.
|
||||
|
||||
## User Setup Required
|
||||
|
||||
None - translations are seeded via migration, will apply automatically on `winter:up`.
|
||||
|
||||
## Next Phase Readiness
|
||||
|
||||
- All 8 email templates now use |_ filter consistently
|
||||
- Professional verification emails ready for localized sending
|
||||
- Other emails (job_closed, new_job_match, new_quote_received, quote_accepted, quote_rejected) already had |_ filters
|
||||
- Ready for Phase 16 Plan 03 (if exists) or Phase 17
|
||||
|
||||
---
|
||||
*Phase: 16-content-localization*
|
||||
*Completed: 2026-02-02*
|
||||
Reference in New Issue
Block a user