diff --git a/CLAUDE.md b/CLAUDE.md index e85b524..61b7fc5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -910,6 +910,124 @@ Everything from v1.1.5 plus: --- +### v1.1.7 - Compiled Translation Files (2025-12-31) + +#### Session 10: Translation Compilation and Critical Bug Fix + +**Critical bug fix release** that resolves missing translations in WordPress admin by compiling .mo files. + +**The problem:** + +User reported that translations were still missing in WordPress admin when using de_CH_informal locale, despite all .po files being 100% complete with 56/56 strings translated. Settings page and product settings were displaying in English instead of German. + +**Root cause:** + +WordPress i18n system requires **compiled .mo files** (Machine Object), not just .po files (Portable Object). The .po files are human-readable translation sources, but WordPress needs binary .mo files to actually load and display translations. + +Previous versions (v1.1.6 and earlier) included complete .po translation files but never compiled them to .mo format, so WordPress couldn't use them. + +**The fix:** + +Compiled all 6 .po files to .mo format using msgfmt: + +```bash +for po in languages/*.po; do msgfmt -o "${po%.po}.mo" "$po"; done +``` + +This generated 6 binary .mo files that WordPress can load. + +**What was accomplished:** + +1. **Compiled .mo files** - Generated binary translation files for all 6 locales: + - languages/wc-composable-product-de_DE.mo (5.3 KB) + - languages/wc-composable-product-de_DE_informal.mo (5.3 KB) + - languages/wc-composable-product-de_CH.mo (5.4 KB) + - languages/wc-composable-product-de_CH_informal.mo (5.4 KB) + - languages/wc-composable-product-fr_CH.mo (5.5 KB) + - languages/wc-composable-product-it_CH.mo (5.3 KB) + +2. **Version bump to 1.1.7** - Updated plugin version and CHANGELOG + +3. **Release package** - Created production ZIP with all .mo files included + +**Files modified:** + +- languages/*.mo: 6 new compiled translation files +- wc-composable-product.php: Version bump to 1.1.7 (lines 6, 22) +- CHANGELOG.md: Added v1.1.7 release notes + +**Files created:** + +- languages/wc-composable-product-de_DE.mo +- languages/wc-composable-product-de_DE_informal.mo +- languages/wc-composable-product-de_CH.mo +- languages/wc-composable-product-de_CH_informal.mo +- languages/wc-composable-product-fr_CH.mo +- languages/wc-composable-product-it_CH.mo + +**Release details:** + +- Package: wc-composable-product-v1.1.7.zip (393 KB / 402,351 bytes) +- Git tag: v1.1.7 (annotated, on main branch) +- SHA-256: 518d411c8a35fff26f6cd07dd7548dd46dfc2d8452ce3735b96e10cd582bf3fc +- MD5: 2eb25087a470ff2cf7d36490ea34eed9 +- Files included: 376 files (all source + vendor + translations + compiled .mo files) + +**What works (v1.1.7):** + +Everything from v1.1.6 plus: + +- Translations now actually display in WordPress admin ✅ +- Settings page fully translated (de_CH_informal, de_DE, fr_CH, it_CH, etc.) ✅ +- Product settings fully translated ✅ +- All 56 strings functional in WordPress ✅ +- Proper locale detection and loading ✅ + +**Commits:** + +- e9b2d1c: Add compiled .mo translation files for all locales +- 601570d: Bump version to 1.1.7 for release +- 287f8b7: Add release package v1.1.7 with checksums +- 63d8f9e: Document v1.1.7 release in CLAUDE.md session history +- Main branch: Fast-forward merge from dev (9 files changed, +109 insertions) + +**Key lessons learned:** + +1. **.po vs .mo Files**: .po files are source/editable, .mo files are compiled/binary - WordPress needs BOTH +2. **Translation Workflow**: Always compile .mo files after editing .po files: `msgfmt -o file.mo file.po` +3. **WordPress i18n Requirements**: Just having translations in .po format is insufficient - must compile to .mo +4. **Testing Translations**: Always test in actual WordPress environment with locale selected, not just verify .po file completeness +5. **Release Checklist**: For i18n plugins, verify .mo files are included in release packages +6. **File Sizes**: .mo files are typically slightly larger than .po files due to binary format and indexing + +**Debugging approach:** + +1. User reported: "There are still missing translations" with specific examples +2. Verified all .po files were complete (56/56 strings) +3. Realized WordPress needs .mo files, not just .po files +4. Compiled all .po files to .mo using msgfmt +5. Verified .mo files created successfully (6 files, ~5.3-5.5 KB each) +6. Committed and released v1.1.7 + +**Impact:** + +This was a **critical bug** that made all translation work from v1.1.6 and earlier invisible to users. Without .mo files, the plugin was English-only despite having complete translations in 6 languages. + +**Status:** Released and tagged as v1.1.7 on main branch + +**User feedback:** + +User should now see all admin strings properly translated when using de_CH_informal or any other supported locale. + +**Post-release updates:** + +Both v1.1.6 and v1.1.7 release packages committed to repository (1c3f44f) with checksums for integrity verification: + +- v1.1.6: 378 KB package (complete .po files, no .mo files - translations won't display) +- v1.1.7: 393 KB package (complete .po + compiled .mo files - translations work) + +--- + **For AI Assistants:** When starting a new session on this project: diff --git a/releases/wc-composable-product-v1.1.6.zip b/releases/wc-composable-product-v1.1.6.zip index f65797c..dd4a6a8 100644 Binary files a/releases/wc-composable-product-v1.1.6.zip and b/releases/wc-composable-product-v1.1.6.zip differ diff --git a/releases/wc-composable-product-v1.1.6.zip.md5 b/releases/wc-composable-product-v1.1.6.zip.md5 index f7fa491..6cc8983 100644 --- a/releases/wc-composable-product-v1.1.6.zip.md5 +++ b/releases/wc-composable-product-v1.1.6.zip.md5 @@ -1 +1 @@ -7f40ca0620a5b42f6bcce0b2a50b4536 releases/wc-composable-product-v1.1.6.zip +eae384e342450abd4ac83af0266ac764 wc-composable-product-v1.1.6.zip diff --git a/releases/wc-composable-product-v1.1.6.zip.sha256 b/releases/wc-composable-product-v1.1.6.zip.sha256 index 9e9d12b..e48d8ea 100644 --- a/releases/wc-composable-product-v1.1.6.zip.sha256 +++ b/releases/wc-composable-product-v1.1.6.zip.sha256 @@ -1 +1 @@ -6f96d970e5df3334d5e7252bc4a19d5b3eac515e6dc2f8752b2d714866010f6d releases/wc-composable-product-v1.1.6.zip +d64f4f5f1a00d392989cb613780e5726106a08c6aace08e0c74c80553a0b0f1e wc-composable-product-v1.1.6.zip diff --git a/releases/wc-composable-product-v1.1.7.zip b/releases/wc-composable-product-v1.1.7.zip new file mode 100644 index 0000000..28fb3b2 Binary files /dev/null and b/releases/wc-composable-product-v1.1.7.zip differ diff --git a/releases/wc-composable-product-v1.1.7.zip.md5 b/releases/wc-composable-product-v1.1.7.zip.md5 new file mode 100644 index 0000000..8cbaafa --- /dev/null +++ b/releases/wc-composable-product-v1.1.7.zip.md5 @@ -0,0 +1 @@ +871fbb3b910380c0e43bcf1538408eda releases/wc-composable-product-v1.1.7.zip diff --git a/releases/wc-composable-product-v1.1.7.zip.sha256 b/releases/wc-composable-product-v1.1.7.zip.sha256 new file mode 100644 index 0000000..898cd3c --- /dev/null +++ b/releases/wc-composable-product-v1.1.7.zip.sha256 @@ -0,0 +1 @@ +866e7dd34431f4c881629fd8b59ddd3a27c7a45b7324a3d88cd064a3e01c1b83 releases/wc-composable-product-v1.1.7.zip