221 lines
7.5 KiB
Markdown
221 lines
7.5 KiB
Markdown
---
|
|
phase: 16-content-localization
|
|
plan: 03
|
|
type: execute
|
|
wave: 2
|
|
depends_on: ["16-01", "16-02"]
|
|
files_modified: []
|
|
autonomous: true
|
|
|
|
must_haves:
|
|
truths:
|
|
- "Static pages display correctly in Polish locale"
|
|
- "Static pages display correctly in German locale"
|
|
- "All translation keys from static pages have PL/DE translations"
|
|
artifacts: []
|
|
key_links:
|
|
- from: "themes/quotify/pages/*.htm"
|
|
to: "winter_translate_messages table"
|
|
via: "|_ filter"
|
|
pattern: "\\|_"
|
|
---
|
|
|
|
<objective>
|
|
Verify static page translations are complete and working for Polish and German.
|
|
|
|
Purpose: Static pages (terms, privacy, FAQ, etc.) already use the |_ filter. This plan verifies all translation keys have PL/DE entries and the pages render correctly.
|
|
Output: Confirmed working static pages in all three locales
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@/home/jin/.claude/get-shit-done/workflows/execute-plan.md
|
|
@/home/jin/.claude/get-shit-done/templates/summary.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
@.planning/PROJECT.md
|
|
@.planning/ROADMAP.md
|
|
@.planning/STATE.md
|
|
@.planning/phases/16-content-localization/16-CONTEXT.md
|
|
@themes/quotify/pages/terms.htm
|
|
@themes/quotify/pages/privacy.htm
|
|
@themes/quotify/pages/faq.htm
|
|
@themes/quotify/pages/about.htm
|
|
@themes/quotify/pages/how-it-works.htm
|
|
@themes/quotify/pages/contact.htm
|
|
</context>
|
|
|
|
<tasks>
|
|
|
|
<task type="auto">
|
|
<name>Task 1: Audit static pages for missing translation keys</name>
|
|
<files>None (read-only audit)</files>
|
|
<action>
|
|
Scan all static pages and verify translation coverage:
|
|
|
|
1. Run translate:scan to ensure all theme strings are captured:
|
|
```bash
|
|
php-legacy artisan translate:scan
|
|
```
|
|
|
|
2. Query for untranslated strings in static pages:
|
|
```bash
|
|
php-legacy artisan tinker --execute="
|
|
\$enKeys = DB::table('winter_translate_messages')
|
|
->where('code', 'like', '%terms%')
|
|
->orWhere('code', 'like', '%privacy%')
|
|
->orWhere('code', 'like', '%About%')
|
|
->orWhere('code', 'like', '%FAQ%')
|
|
->orWhere('code', 'like', '%Contact%')
|
|
->pluck('code');
|
|
|
|
\$plCount = DB::table('winter_translate_messages')
|
|
->where('locale', 'pl')
|
|
->whereIn('code', \$enKeys)
|
|
->count();
|
|
|
|
\$deCount = DB::table('winter_translate_messages')
|
|
->where('locale', 'de')
|
|
->whereIn('code', \$enKeys)
|
|
->count();
|
|
|
|
echo \"EN keys: \" . \$enKeys->count() . \", PL: \$plCount, DE: \$deCount\";
|
|
"
|
|
```
|
|
|
|
3. If any keys are missing translations, identify them:
|
|
```bash
|
|
php-legacy artisan translate:export missing-translations.json --locale=pl --untranslated-only
|
|
php-legacy artisan translate:export missing-translations-de.json --locale=de --untranslated-only
|
|
```
|
|
|
|
4. Review the static pages that need translation:
|
|
- terms.htm - Terms of Service (legal)
|
|
- privacy.htm - Privacy Policy (legal)
|
|
- faq.htm - Frequently Asked Questions
|
|
- about.htm - About Quotify
|
|
- how-it-works.htm - How the platform works
|
|
- contact.htm - Contact information
|
|
|
|
These pages were translated in Phases 13 and 14, so they should already have translations. This task confirms coverage.
|
|
</action>
|
|
<verify>Export shows 0 untranslated keys for static page content in both PL and DE locales.</verify>
|
|
<done>Static page translation coverage is 100% for PL and DE.</done>
|
|
</task>
|
|
|
|
<task type="auto">
|
|
<name>Task 2: Fill any missing static page translations</name>
|
|
<files>None (database only)</files>
|
|
<action>
|
|
If Task 1 found missing translations, add them:
|
|
|
|
1. For any missing Polish translations, add using DB::table():
|
|
```php
|
|
DB::table('winter_translate_messages')->insert([
|
|
'code' => 'the.translation.key',
|
|
'locale' => 'pl',
|
|
'message_data' => 'Polish translation here',
|
|
]);
|
|
```
|
|
|
|
2. For any missing German translations, add similarly.
|
|
|
|
3. If no missing translations found, skip this task and note in summary.
|
|
|
|
**Common static page strings that might be missing:**
|
|
|
|
Legal pages (if not covered in Phases 13-14):
|
|
- "Terms of Service" = "Regulamin" / "Nutzungsbedingungen"
|
|
- "Privacy Policy" = "Polityka prywatnosci" / "Datenschutzerklaerung"
|
|
- "Last updated" = "Ostatnia aktualizacja" / "Letzte Aktualisierung"
|
|
- "Acceptance of Terms" = "Akceptacja regulaminu" / "Annahme der Nutzungsbedingungen"
|
|
- "Description of Service" = "Opis uslug" / "Beschreibung des Dienstes"
|
|
- "User Accounts" = "Konta uzytkownikow" / "Benutzerkonten"
|
|
- "Professional Accounts" = "Konta profesjonalistow" / "Fachkraft-Konten"
|
|
- "Fees and Payments" = "Oplaty i platnosci" / "Gebuehren und Zahlungen"
|
|
- "Limitation of Liability" = "Ograniczenie odpowiedzialnosci" / "Haftungsbeschraenkung"
|
|
- "Changes to Terms" = "Zmiany regulaminu" / "Aenderungen der Nutzungsbedingungen"
|
|
|
|
FAQ strings:
|
|
- "Frequently Asked Questions" = "Czesto zadawane pytania" / "Haeufig gestellte Fragen"
|
|
- "For Homeowners" = "Dla wlascicieli domow" / "Fuer Hauseigentuemer"
|
|
- "For Professionals" = "Dla profesjonalistow" / "Fuer Fachkraefte"
|
|
|
|
About/Contact:
|
|
- "About Quotify" = "O Quotify" / "Ueber Quotify"
|
|
- "Contact Us" = "Kontakt" / "Kontakt"
|
|
- "Our Mission" = "Nasza misja" / "Unsere Mission"
|
|
</action>
|
|
<verify>Re-run the untranslated export - should show 0 missing keys.</verify>
|
|
<done>All static page translation keys have PL and DE entries.</done>
|
|
</task>
|
|
|
|
<task type="auto">
|
|
<name>Task 3: Verify static pages render correctly in each locale</name>
|
|
<files>None (manual/automated testing)</files>
|
|
<action>
|
|
Test static page rendering in each locale:
|
|
|
|
1. Test Terms page:
|
|
```bash
|
|
curl -s "http://localhost/terms" | grep -o "Terms of Service" | head -1
|
|
curl -s "http://localhost/pl/regulamin" | grep -o "Regulamin" | head -1
|
|
curl -s "http://localhost/de/agb" | grep -o "Nutzungsbedingungen" | head -1
|
|
```
|
|
|
|
2. Test Privacy page:
|
|
```bash
|
|
curl -s "http://localhost/privacy" | head -100
|
|
curl -s "http://localhost/pl/prywatnosc" | head -100
|
|
curl -s "http://localhost/de/datenschutz" | head -100
|
|
```
|
|
|
|
3. Test FAQ page:
|
|
```bash
|
|
curl -s "http://localhost/faq" | grep -c "|_" # Should be 0 (all translated)
|
|
curl -s "http://localhost/pl/faq" | head -100
|
|
curl -s "http://localhost/de/faq" | head -100
|
|
```
|
|
|
|
4. Test About page:
|
|
```bash
|
|
curl -s "http://localhost/about" | head -100
|
|
curl -s "http://localhost/pl/o-nas" | head -100
|
|
curl -s "http://localhost/de/ueber-uns" | head -100
|
|
```
|
|
|
|
5. For each page, verify:
|
|
- No raw |_ filter visible in output (would indicate untranslated strings)
|
|
- Correct language content displays
|
|
- Page renders without errors
|
|
|
|
If running locally, use the actual dev URL. Adjust URLs based on localeUrl configuration in each page's viewBag.
|
|
</action>
|
|
<verify>All static pages render with correct translated content in PL and DE locales without showing raw translation keys.</verify>
|
|
<done>Static pages verified working in English, Polish, and German.</done>
|
|
</task>
|
|
|
|
</tasks>
|
|
|
|
<verification>
|
|
1. translate:scan shows no new strings needing translation
|
|
2. No untranslated keys for static page content
|
|
3. terms.htm renders correctly in EN/PL/DE
|
|
4. privacy.htm renders correctly in EN/PL/DE
|
|
5. faq.htm renders correctly in EN/PL/DE
|
|
6. about.htm renders correctly in EN/PL/DE
|
|
7. how-it-works.htm renders correctly in EN/PL/DE
|
|
8. contact.htm renders correctly in EN/PL/DE
|
|
</verification>
|
|
|
|
<success_criteria>
|
|
- 100% translation coverage for static page strings in PL and DE
|
|
- All static pages render without raw translation keys visible
|
|
- URL routing works correctly (/pl/regulamin, /de/agb, etc.)
|
|
- No console/server errors when rendering translated pages
|
|
</success_criteria>
|
|
|
|
<output>
|
|
After completion, create `.planning/phases/16-content-localization/16-03-SUMMARY.md`
|
|
</output>
|