fix: standardize translation file names and add 11 new locales (v1.0.5)
All checks were successful
Create Release Package / PHP Lint (push) Successful in 58s
Create Release Package / Build Release (push) Successful in 1m26s

- Rename all .po files to use wp-bootstrap- prefix (WordPress convention)
- Add 11 new locale translations (de_CH_informal, de_DE, de_DE_informal,
  en_GB, es_ES, fr_CH, it_CH, it_IT, nl_NL, pl_PL, pt_PT)
- Total: 13 locales + en_US base = 14 supported languages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 17:51:18 +01:00
parent b285d75878
commit 815f6fa19e
18 changed files with 10168 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w
**Note for AI Assistants:** Clean this section after the specific features are done or new releases are made. Effective changes are tracked in `CHANGELOG.md`. Do not add completed versions here - document them in the Session History section at the end of this file.
Current version is **v1.0.4**. See `PLAN.md` for details.
Current version is **v1.0.5**. See `PLAN.md` for details.
## Technical Stack
@@ -77,8 +77,26 @@ Text domain: `wp-bootstrap`
- `en_US` - English (United States) [base language - .pot template]
- `de_CH` - German (Switzerland, formal)
- `de_CH_informal` - German (Switzerland, informal)
- `de_DE` - German (Germany, formal)
- `de_DE_informal` - German (Germany, informal)
- `en_GB` - English (United Kingdom)
- `es_ES` - Spanish (Spain)
- `fr_CH` - French (Switzerland)
- `fr_FR` - French (France)
- `it_CH` - Italian (Switzerland)
- `it_IT` - Italian (Italy)
- `nl_NL` - Dutch (Netherlands)
- `pl_PL` - Polish (Poland)
- `pt_PT` - Portuguese (Portugal)
There is no need to compile translation to *.mo locally as it will be done in the Gitea CD/CI pipeline
Translation file naming convention: `wp-bootstrap-{locale}.po` (e.g., `wp-bootstrap-de_CH.po`)
Compiled .mo files are built by the Gitea CI/CD pipeline during releases. For local development:
```bash
for po in languages/wp-bootstrap-*.po; do msgfmt -o "${po%.po}.mo" "$po"; done
```
### Create Releases
@@ -193,6 +211,37 @@ Build steps (in order):
## Session History
### Session 13 — v1.0.5 Translation Files (2026-02-11)
**Completed:** Standardized translation file naming and added 11 new locale translations.
**What was done:**
- Renamed all .po files to use `wp-bootstrap-` prefix for WordPress text domain convention
- Previously: mixed naming (some with prefix like `wp-bootstrap-en_GB.po`, some without like `de_CH.po`)
- Now: all 13 files follow `wp-bootstrap-{locale}.po` pattern
- Compiled all 13 .po files to .mo for local development
- Added 11 new locales: de_CH_informal, de_DE, de_DE_informal, en_GB, es_ES, fr_CH, it_CH, it_IT, nl_NL, pl_PL, pt_PT
**Files renamed:**
- `de_CH.po``wp-bootstrap-de_CH.po`
- `de_CH_informal.po``wp-bootstrap-de_CH_informal.po`
- `de_DE.po``wp-bootstrap-de_DE.po`
- `de_DE_informal.po``wp-bootstrap-de_DE_informal.po`
- `es_ES.po``wp-bootstrap-es_ES.po`
- `fr_CH.po``wp-bootstrap-fr_CH.po`
- `fr_FR.po``wp-bootstrap-fr_FR.po`
- `it_CH.po``wp-bootstrap-it_CH.po`
- `it_IT.po``wp-bootstrap-it_IT.po`
- `pt_PT.po``wp-bootstrap-pt_PT.po`
**Key learnings:**
- WordPress expects translation files named `{text-domain}-{locale}.po` (e.g., `wp-bootstrap-de_CH.po`)
- `load_theme_textdomain()` loads files matching this pattern from the `languages/` directory
- Files without the text domain prefix would not be loaded by WordPress
### Session 12 — v1.0.4 Template Render Filter (2026-02-11)
**Completed:** Added `wp_bootstrap_should_render_template` filter to `TemplateController::render()` for clean plugin/theme separation.