WinterCMS research

This commit is contained in:
Jakub Zych
2026-02-18 01:31:41 +01:00
parent bec00a8bd5
commit 29766aee93
40 changed files with 8529 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
---
phase: 12-backend-translations
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- plugins/golem15/quotify/lang/pl/lang.php
autonomous: true
must_haves:
truths:
- "Backend admin panel shows Polish labels when locale is PL"
- "Flash messages display in Polish for PL locale"
- "Validation errors appear in Polish for PL locale"
artifacts:
- path: "plugins/golem15/quotify/lang/pl/lang.php"
provides: "Complete Polish translations for Quotify plugin"
min_lines: 500
key_links:
- from: "plugins/golem15/quotify/lang/pl/lang.php"
to: "Lang::get('golem15.quotify::lang.*')"
via: "WinterCMS translation system"
pattern: "return \\["
---
<objective>
Translate all Quotify plugin backend strings to Polish.
Purpose: Enable Polish-speaking administrators to use the Quotify backend panel in their native language.
Output: Complete lang/pl/lang.php with all 546+ translation keys in Polish.
</objective>
<execution_context>
@~/.claude/get-shit-done/workflows/execute-plan.md
@~/.claude/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
# Reference - English source file to translate
@plugins/golem15/quotify/lang/en/lang.php
# Reference - Existing Polish patterns from User plugin
@plugins/golem15/user/lang/pl/lang.php
# Reference - Existing Polish patterns from PaymentGateway plugin
@plugins/golem15/paymentgateway/lang/pl/lang.php
</context>
<tasks>
<task type="auto">
<name>Task 1: Create Polish translation file for Quotify plugin</name>
<files>plugins/golem15/quotify/lang/pl/lang.php</files>
<action>
Create the Polish translation file by:
1. Create directory: plugins/golem15/quotify/lang/pl/
2. Copy the structure from lang/en/lang.php
3. Translate ALL values to Polish while preserving:
- Array structure and keys (NEVER translate keys)
- Placeholder syntax (:variable, :count)
- Pluralization syntax (singular|plural)
Translation guidelines:
- Use formal Polish (Pan/Pani form) for user-facing text
- Match terminology from existing User and PaymentGateway Polish translations
- "Professional" → "Fachowiec" or "Profesjonalista" (context-dependent)
- "Homeowner" → "Właściciel domu" or "Zleceniodawca"
- "Quote" → "Wycena" (as in PaymentGateway)
- "Job Request" → "Zlecenie" or "Zapytanie o pracę"
- "Trade Category" → "Kategoria usług" or "Branża"
- "Review" → "Opinia" or "Recenzja"
- "Verification" → "Weryfikacja"
- "Team" → "Zespół"
- "Service Area" → "Obszar usług"
IMPORTANT: Maintain exact array structure - all keys must remain in English.
</action>
<verify>
php-legacy -l plugins/golem15/quotify/lang/pl/lang.php
# Should return "No syntax errors detected"
</verify>
<done>Polish translation file exists with all keys translated, no PHP syntax errors</done>
</task>
<task type="auto">
<name>Task 2: Verify translation completeness</name>
<files>plugins/golem15/quotify/lang/pl/lang.php</files>
<action>
Verify the translation is complete by:
1. Count keys in en/lang.php and pl/lang.php - should match
2. Check no English text remains in pl/lang.php values (except technical terms)
3. Verify placeholders are preserved (:variable syntax)
4. Verify pluralization syntax is correct (Polish uses different rules than English)
Polish pluralization note:
- Polish has 3 plural forms: one, few (2-4), many (5+)
- WinterCMS uses | separator: "singular|few|many"
- Example: "1 opinia|:count opinie|:count opinii"
</action>
<verify>
# Compare key counts
php-legacy -r "echo count(array_keys(include 'plugins/golem15/quotify/lang/en/lang.php', true)) . ' EN keys';"
php-legacy -r "echo count(array_keys(include 'plugins/golem15/quotify/lang/pl/lang.php', true)) . ' PL keys';"
</verify>
<done>Translation file has same number of top-level keys as English, all values are in Polish</done>
</task>
</tasks>
<verification>
Before declaring plan complete:
- [ ] plugins/golem15/quotify/lang/pl/lang.php exists
- [ ] PHP syntax validation passes
- [ ] All translation keys match English file
- [ ] No untranslated English text in values (except technical terms)
- [ ] Placeholders preserved (:variable, :count)
</verification>
<success_criteria>
- Polish translation file created with all 546+ keys
- PHP syntax valid
- Terminology consistent with User/PaymentGateway Polish translations
- Ready for backend locale switching
</success_criteria>
<output>
After completion, create `.planning/phases/12-backend-translations/12-01-SUMMARY.md`
</output>

View File

@@ -0,0 +1,102 @@
---
phase: 12-backend-translations
plan: 01
subsystem: i18n
tags: [polish, translations, lang, wintercms, l10n]
# Dependency graph
requires:
- phase: 11-translation-infrastructure
provides: Translation system setup, locale configuration
provides:
- Complete Polish translations for Quotify plugin backend (437 strings)
- Formal Polish terminology: Fachowiec, Wycena, Zlecenie
- Polish pluralization support (one|few|many forms)
affects: [12-02-german-translations, theme-translations, admin-panel]
# Tech tracking
tech-stack:
added: []
patterns:
- "Polish pluralization: one|few|many format"
- "Formal Polish (Pan/Pani) for user-facing text"
key-files:
created:
- plugins/golem15/quotify/lang/pl/lang.php
modified: []
key-decisions:
- "12-01: Use 'Fachowiec' for Professional (trade context)"
- "12-01: Use 'Wycena' for Quote (consistent with PaymentGateway)"
- "12-01: Use 'Zlecenie' for Job Request (formal Polish)"
- "12-01: Polish pluralization with 3 forms (one|few|many)"
patterns-established:
- "Backend translation file structure mirrors English exactly"
- "Placeholders preserved: :variable, :count syntax"
# Metrics
duration: 4min
completed: 2026-01-16
---
# Phase 12 Plan 01: Polish Backend Translations Summary
**Complete Polish translations for Quotify plugin with 437 strings, formal terminology, and 3-form pluralization**
## Performance
- **Duration:** 4 min
- **Started:** 2026-01-16T10:00:00Z
- **Completed:** 2026-01-16T10:04:00Z
- **Tasks:** 2
- **Files created:** 1
## Accomplishments
- Translated all 437 backend strings from English to Polish
- Used formal Polish terminology consistent with User and PaymentGateway plugins
- Implemented proper Polish pluralization (one|few|many forms)
- Preserved all placeholders and variable syntax
## Task Commits
Each task was committed atomically:
1. **Task 1: Create Polish translation file** - `7feca30` (feat) - in Quotify submodule
**Note:** Task 2 was verification-only, no code changes required.
## Files Created/Modified
- `plugins/golem15/quotify/lang/pl/lang.php` - Complete Polish translations (437 keys)
## Decisions Made
| Decision | Rationale |
|----------|-----------|
| "Fachowiec" for Professional | Trade/craft context, more common than "Profesjonalista" |
| "Wycena" for Quote | Consistent with PaymentGateway plugin terminology |
| "Zlecenie" for Job Request | Formal Polish for service request |
| "Kategoria uslug" for Trade Category | Clear service category naming |
| Three-form pluralization | Polish requires one/few/many forms (1, 2-4, 5+) |
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
None - straightforward translation with existing patterns from User and PaymentGateway plugins.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- Polish translations complete for backend admin panel
- Ready for Phase 12-02: German backend translations
- Same pattern can be applied for German translations
---
*Phase: 12-backend-translations*
*Completed: 2026-01-16*

View File

@@ -0,0 +1,126 @@
---
phase: 12-backend-translations
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
- plugins/golem15/quotify/lang/de/lang.php
autonomous: true
must_haves:
truths:
- "Backend admin panel shows German labels when locale is DE"
- "Flash messages display in German for DE locale"
- "Validation errors appear in German for DE locale"
artifacts:
- path: "plugins/golem15/quotify/lang/de/lang.php"
provides: "Complete German translations for Quotify plugin"
min_lines: 500
key_links:
- from: "plugins/golem15/quotify/lang/de/lang.php"
to: "Lang::get('golem15.quotify::lang.*')"
via: "WinterCMS translation system"
pattern: "return \\["
---
<objective>
Translate all Quotify plugin backend strings to German.
Purpose: Enable German-speaking administrators to use the Quotify backend panel in their native language.
Output: Complete lang/de/lang.php with all 546+ translation keys in German.
</objective>
<execution_context>
@~/.claude/get-shit-done/workflows/execute-plan.md
@~/.claude/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
# Reference - English source file to translate
@plugins/golem15/quotify/lang/en/lang.php
</context>
<tasks>
<task type="auto">
<name>Task 1: Create German translation file for Quotify plugin</name>
<files>plugins/golem15/quotify/lang/de/lang.php</files>
<action>
Create the German translation file by:
1. Create directory: plugins/golem15/quotify/lang/de/
2. Copy the structure from lang/en/lang.php
3. Translate ALL values to German while preserving:
- Array structure and keys (NEVER translate keys)
- Placeholder syntax (:variable, :count)
- Pluralization syntax (singular|plural)
Translation guidelines:
- Use formal German (Sie form) for user-facing text
- "Professional" → "Fachmann" or "Handwerker"
- "Homeowner" → "Hausbesitzer" or "Auftraggeber"
- "Quote" → "Angebot" or "Kostenvoranschlag"
- "Job Request" → "Auftrag" or "Anfrage"
- "Trade Category" → "Gewerbekategorie" or "Branche"
- "Review" → "Bewertung" or "Rezension"
- "Verification" → "Verifizierung" or "Prüfung"
- "Team" → "Team"
- "Service Area" → "Servicegebiet" or "Einsatzgebiet"
IMPORTANT: Maintain exact array structure - all keys must remain in English.
</action>
<verify>
php-legacy -l plugins/golem15/quotify/lang/de/lang.php
# Should return "No syntax errors detected"
</verify>
<done>German translation file exists with all keys translated, no PHP syntax errors</done>
</task>
<task type="auto">
<name>Task 2: Verify translation completeness</name>
<files>plugins/golem15/quotify/lang/de/lang.php</files>
<action>
Verify the translation is complete by:
1. Count keys in en/lang.php and de/lang.php - should match
2. Check no English text remains in de/lang.php values (except technical terms)
3. Verify placeholders are preserved (:variable syntax)
4. Verify pluralization syntax is correct
German pluralization note:
- German has 2 plural forms: singular (1), plural (2+)
- WinterCMS uses | separator: "singular|plural"
- Example: "1 Bewertung|:count Bewertungen"
</action>
<verify>
# Compare key counts
php-legacy -r "echo count(array_keys(include 'plugins/golem15/quotify/lang/en/lang.php', true)) . ' EN keys';"
php-legacy -r "echo count(array_keys(include 'plugins/golem15/quotify/lang/de/lang.php', true)) . ' DE keys';"
</verify>
<done>Translation file has same number of top-level keys as English, all values are in German</done>
</task>
</tasks>
<verification>
Before declaring plan complete:
- [ ] plugins/golem15/quotify/lang/de/lang.php exists
- [ ] PHP syntax validation passes
- [ ] All translation keys match English file
- [ ] No untranslated English text in values (except technical terms)
- [ ] Placeholders preserved (:variable, :count)
</verification>
<success_criteria>
- German translation file created with all 546+ keys
- PHP syntax valid
- Professional German terminology used consistently
- Ready for backend locale switching
</success_criteria>
<output>
After completion, create `.planning/phases/12-backend-translations/12-02-SUMMARY.md`
</output>

View File

@@ -0,0 +1,103 @@
---
phase: 12-backend-translations
plan: 02
subsystem: i18n
tags: [german, translations, wintercms, lang, localization]
# Dependency graph
requires:
- phase: 11-translation-infrastructure
provides: Translation system with Lang::get() support
provides:
- Complete German translation file for Quotify plugin (437 keys)
- German backend panel labels
- German validation/flash messages
affects: [13-frontend-translations, 14-static-content]
# Tech tracking
tech-stack:
added: []
patterns:
- "Formal German (Sie) for user-facing text"
- "German terminology: Fachmann/Fachleute, Angebot, Auftrag, Bewertung"
key-files:
created:
- plugins/golem15/quotify/lang/de/lang.php
modified: []
key-decisions:
- "Use formal German (Sie form) throughout"
- "Professional → Fachmann (singular) / Fachleute (plural)"
- "Quote → Angebot, Job Request → Auftrag"
- "Tax rate example changed to 19% (German standard VAT)"
patterns-established:
- "German postcode format in examples (e.g., 10115)"
- "German plural forms: singular|plural (2-form system)"
# Metrics
duration: 3min
completed: 2026-01-16
---
# Phase 12 Plan 02: German Backend Translations Summary
**Complete German translation for Quotify plugin with 437 keys using formal Sie form and consistent terminology**
## Performance
- **Duration:** 3 min
- **Started:** 2026-01-16T12:20:56Z
- **Completed:** 2026-01-16T12:23:57Z
- **Tasks:** 2
- **Files modified:** 1
## Accomplishments
- Created lang/de/lang.php with all 437 translation keys
- Used formal German (Sie form) for professional appearance
- Consistent terminology throughout: Fachmann, Angebot, Auftrag, Bewertung
- Preserved all 20 placeholder variables (:variable, :count)
- Correctly translated 3 pluralization strings with German grammar
## Task Commits
Each task was committed atomically:
1. **Task 1: Create German translation file** - `9bd20f2` (feat)
2. **Task 2: Verify translation completeness** - (verification only, no commit needed)
## Files Created/Modified
- `plugins/golem15/quotify/lang/de/lang.php` - Complete German translations for all Quotify backend strings
## Decisions Made
- **Formal German:** Used Sie form throughout for professional business context
- **Terminology mapping:**
- Professional → Fachmann (singular) / Fachleute (plural)
- Homeowner → Hausbesitzer / Auftraggeber
- Quote → Angebot
- Job Request → Auftrag
- Trade Category → Gewerbekategorie
- Review → Bewertung
- Service Area → Servicegebiet
- **Tax rate:** Changed example from 23% to 19% (German standard VAT)
- **Postcode format:** Used German format (e.g., 10115) in examples
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
None.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- German backend translations complete
- Ready for Polish translations (12-03)
- Frontend translations can proceed (Phase 13)
- Backend admin panel will show German when locale is DE
---
*Phase: 12-backend-translations*
*Completed: 2026-01-16*

View File

@@ -0,0 +1,141 @@
---
phase: 12-backend-translations
verified: 2026-01-16T12:28:39Z
status: passed
score: 6/6 must-haves verified
---
# Phase 12: Backend Translations Verification Report
**Phase Goal:** Admin panel labels, flash messages, validation errors translated to PL/DE
**Verified:** 2026-01-16T12:28:39Z
**Status:** PASSED
**Re-verification:** No - initial verification
## Goal Achievement
### Observable Truths
| # | Truth | Status | Evidence |
|---|-------|--------|----------|
| 1 | Backend admin panel shows Polish labels when locale is PL | VERIFIED | `lang/pl/lang.php` exists with 437 translated keys matching EN structure |
| 2 | Flash messages display in Polish for PL locale | VERIFIED | Flash messages translated (e.g., `bulk_approved`, `bulk_rejected`, `assigned_success`) |
| 3 | Validation errors appear in Polish for PL locale | VERIFIED | Validation keys translated (e.g., `limit_validation`, error states in all sections) |
| 4 | Backend admin panel shows German labels when locale is DE | VERIFIED | `lang/de/lang.php` exists with 437 translated keys matching EN structure |
| 5 | Flash messages display in German for DE locale | VERIFIED | Flash messages translated (e.g., `bulk_approved`, `assigned_success`) |
| 6 | Validation errors appear in German for DE locale | VERIFIED | Validation keys translated (e.g., `limit_validation`, error states) |
**Score:** 6/6 truths verified
### Required Artifacts
| Artifact | Expected | Status | Details |
|----------|----------|--------|---------|
| `plugins/golem15/quotify/lang/pl/lang.php` | Complete Polish translations (500+ lines) | VERIFIED | 546 lines, 437 keys, valid PHP, substantive Polish content |
| `plugins/golem15/quotify/lang/de/lang.php` | Complete German translations (500+ lines) | VERIFIED | 546 lines, 437 keys, valid PHP, substantive German content |
### Level 1: Existence
| File | Status |
|------|--------|
| `plugins/golem15/quotify/lang/pl/lang.php` | EXISTS (25941 bytes) |
| `plugins/golem15/quotify/lang/de/lang.php` | EXISTS (25923 bytes) |
### Level 2: Substantive
| File | Lines | Min Required | Stub Patterns | Status |
|------|-------|--------------|---------------|--------|
| `plugins/golem15/quotify/lang/pl/lang.php` | 546 | 500 | 0 (placeholder matches are legitimate form field placeholders) | SUBSTANTIVE |
| `plugins/golem15/quotify/lang/de/lang.php` | 546 | 500 | 0 (placeholder matches are legitimate form field placeholders) | SUBSTANTIVE |
**Content Quality Verification:**
- Polish file contains actual Polish translations (e.g., "Fachowcy", "Zlecenia", "Wyceny", "Zweryfikowany")
- German file contains actual German translations (e.g., "Fachleute", "Auftr\u00e4ge", "Angebote", "Verifiziert")
- All 437 keys present in both PL and DE files (matching EN exactly)
- Placeholders preserved (`:date`, `:count`, `:professional`, `:job`, etc.)
- Polish uses 3-form pluralization (one|few|many) correctly
- German uses 2-form pluralization (singular|plural) correctly
### Level 3: Wired
| From | To | Via | Status | Details |
|------|----|----|--------|---------|
| `lang/pl/lang.php` | Backend panel | WinterCMS `Lang::get()` / `__()` | WIRED | 31 files reference `golem15.quotify::lang.*` keys |
| `lang/de/lang.php` | Backend panel | WinterCMS `Lang::get()` / `__()` | WIRED | Same translation system, locale-based selection |
| YAML configs | Translation keys | `golem15.quotify::lang.*` prefix | WIRED | Fields.yaml, columns.yaml use translation keys |
**Wiring Evidence:**
- `models/jobrequest/fields.yaml` uses `golem15.quotify::lang.jobrequest.*`
- `controllers/Professionals.php` uses `Lang::get()`
- `classes/QuotePushService.php` uses `__('golem15.quotify::lang.push.*')`
- All 31 plugin files that use translation keys will automatically display in PL/DE based on active locale
### Key Link Verification
| From | To | Via | Status | Details |
|------|----|----|--------|---------|
| Translation files | WinterCMS L10n | `return [...]` array structure | WIRED | Both files return valid PHP arrays |
| Admin panel forms | Translation system | `label: golem15.quotify::lang.*` | WIRED | YAML configs reference translation keys |
| Flash messages | Translation system | `Flash::success(Lang::get(...))` | WIRED | Controllers use translation keys for flash messages |
### Requirements Coverage
| Requirement | Status | Notes |
|-------------|--------|-------|
| Polish backend translations | SATISFIED | 437 keys translated to Polish |
| German backend translations | SATISFIED | 437 keys translated to German |
| Placeholders preserved | SATISFIED | All `:variable` syntax preserved in translations |
| Pluralization correct | SATISFIED | Polish uses 3-form, German uses 2-form |
### Anti-Patterns Found
| File | Line | Pattern | Severity | Impact |
|------|------|---------|----------|--------|
| None | - | - | - | No anti-patterns detected |
**Scanned for:**
- TODO/FIXME comments: None found (except legitimate placeholder field hints)
- Empty implementations: None found
- Untranslated English text: None found (except technical terms like "Slug", "URL")
### Human Verification Required
While automated verification confirms the translations exist and are structurally correct, the following should be verified by a native speaker:
### 1. Polish Translation Quality
**Test:** Have a Polish native speaker review key translations in admin panel
**Expected:** Terminology is natural, formal (Pan/Pani), and contextually appropriate
**Why human:** Linguistic quality and cultural appropriateness cannot be verified programmatically
### 2. German Translation Quality
**Test:** Have a German native speaker review key translations in admin panel
**Expected:** Terminology is natural, formal (Sie), and follows German conventions
**Why human:** Linguistic quality and cultural appropriateness cannot be verified programmatically
### 3. Locale Switching Works
**Test:** Change WinterCMS backend locale to PL, then DE
**Expected:** All Quotify admin panel labels, menus, and messages appear in selected language
**Why human:** Full end-to-end locale switching requires running application
## Summary
Phase 12 goal "Admin panel labels, flash messages, validation errors translated to PL/DE" has been achieved:
1. **Polish translations complete:** `lang/pl/lang.php` with 437 keys, substantive Polish content
2. **German translations complete:** `lang/de/lang.php` with 437 keys, substantive German content
3. **Structure verified:** Both files match English structure exactly (546 lines, 437 keys)
4. **PHP valid:** No syntax errors in either file
5. **Wiring confirmed:** 31 files use `golem15.quotify::lang.*` keys that will resolve to PL/DE translations
6. **Placeholders preserved:** All `:variable` syntax maintained
7. **Pluralization correct:** Polish uses 3-form, German uses 2-form
The phase is **PASSED**. Human verification of translation quality is recommended but not blocking.
---
_Verified: 2026-01-16T12:28:39Z_
_Verifier: Claude (gsd-verifier)_