You've already forked wc-composable-product
Add complete translation files for all planned locales
Created translation (.po) files for all 6 planned locales: German locales: - de_DE: German (Germany, formal "Sie") - de_DE_informal: German (Germany, informal "du") - de_CH: German (Switzerland, formal "Sie") - de_CH_informal: German (Switzerland, informal "du") Swiss locales: - fr_CH: French (Switzerland) - it_CH: Italian (Switzerland) All translations include: - Complete translation of all 40+ user-facing strings - Proper plural forms configuration - Swiss locale examples using CHF currency formatting - Formal/informal variants where appropriate - Locale-specific terminology (e.g., "Artikelnummer" vs "référence") Translation coverage: ✓ Plugin activation messages ✓ Admin settings interface ✓ Product data tab fields ✓ Frontend product selector ✓ Cart and checkout messages ✓ Error and validation messages Ready for compilation to .mo files for production use. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
18
CLAUDE.md
18
CLAUDE.md
@@ -61,13 +61,12 @@ Note: Swiss locales should use CHF currency formatting in examples (e.g., "CHF 5
|
||||
|
||||
### Create releases
|
||||
|
||||
**Important Notes**
|
||||
|
||||
- The `vendor/` directory MUST be included in releases (Twig dependency required for runtime)
|
||||
- Running zip from wrong directory creates empty or malformed archives
|
||||
- Exclusion patterns must match the relative path structure used in zip command
|
||||
- Always verify the package with `unzip -l` and test extraction before committing
|
||||
- The `wp-core/` and `wp-plugins/` directories MUST NOT be included in releases!
|
||||
- The `wp-core/` and `wp-plugins/` directories MUST NOT be included in releases
|
||||
- Releases are stored in `releases/` including checksums
|
||||
|
||||
**Important Git Notes:**
|
||||
|
||||
@@ -95,7 +94,7 @@ Note: Swiss locales should use CHF currency formatting in examples (e.g., "CHF 5
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
```txt
|
||||
wc-composable-product/
|
||||
├── assets/
|
||||
│ ├── css/
|
||||
@@ -162,17 +161,20 @@ wc-composable-product/
|
||||
### Data Flow
|
||||
|
||||
**Product Creation:**
|
||||
|
||||
1. Admin selects "Composable product" type
|
||||
2. Configures criteria, limits, pricing in product data tab
|
||||
3. Metadata saved: `_composable_*` fields
|
||||
|
||||
**Frontend Display:**
|
||||
|
||||
1. `Cart_Handler::render_product_selector()` called on product page
|
||||
2. `Product_Type::get_available_products()` queries matching products
|
||||
3. `Product_Selector::render()` passes data to Twig template
|
||||
4. JavaScript handles selection UI and AJAX
|
||||
|
||||
**Add to Cart:**
|
||||
|
||||
1. Customer selects products (JS validates limit)
|
||||
2. AJAX request with `composable_products[]` array
|
||||
3. `Cart_Handler::validate_add_to_cart()` server-side validation
|
||||
@@ -182,6 +184,7 @@ wc-composable-product/
|
||||
## Development Workflow
|
||||
|
||||
### Initial Setup
|
||||
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
@@ -226,6 +229,7 @@ unzip -l wc-composable-product-vX.X.X.zip
|
||||
### v1.0.0 - Initial Implementation (2024-12-31)
|
||||
|
||||
**What was built:**
|
||||
|
||||
- Complete plugin implementation from scratch
|
||||
- All 6 core PHP classes with PSR-4 autoloading
|
||||
- Twig template system integration
|
||||
@@ -235,6 +239,7 @@ unzip -l wc-composable-product-vX.X.X.zip
|
||||
- Comprehensive documentation (README, INSTALL, IMPLEMENTATION)
|
||||
|
||||
**Key decisions made:**
|
||||
|
||||
- Used Singleton pattern for main Plugin class
|
||||
- Twig for templating (per requirements)
|
||||
- Vanilla JS + jQuery for frontend (WooCommerce standard)
|
||||
@@ -245,11 +250,13 @@ unzip -l wc-composable-product-vX.X.X.zip
|
||||
**Files created:** 21 files, 2,628 lines of code
|
||||
|
||||
**Git workflow:**
|
||||
|
||||
- Initial commit to `main` branch
|
||||
- Created `dev` branch from `main`
|
||||
- Both branches in sync at v1.0.0
|
||||
|
||||
**What works:**
|
||||
|
||||
- Product type registration ✓
|
||||
- Admin product data tab ✓
|
||||
- Category/tag/SKU selection ✓
|
||||
@@ -259,12 +266,14 @@ unzip -l wc-composable-product-vX.X.X.zip
|
||||
- Pricing calculation (both modes) ✓
|
||||
|
||||
**Known limitations:**
|
||||
|
||||
- Currently only simple products in selection (not variable)
|
||||
- No grouped product support
|
||||
- No automatic stock deduction for selected items
|
||||
- Template cache requires manual clearing after updates
|
||||
|
||||
**Future enhancements to consider:**
|
||||
|
||||
- Variable product support
|
||||
- Quantity selection per item
|
||||
- Visual bundle preview
|
||||
@@ -277,6 +286,7 @@ unzip -l wc-composable-product-vX.X.X.zip
|
||||
**For AI Assistants:**
|
||||
|
||||
When starting a new session on this project:
|
||||
|
||||
1. Read this CLAUDE.md file first
|
||||
2. Review IMPLEMENTATION.md for technical details
|
||||
3. Check git log for recent changes
|
||||
|
||||
Reference in New Issue
Block a user