feat: implement multi-language translation support for products
- Add database migrations for translation tables and digital product fields - Create MarketplaceProductTranslation model for localized content - Create ProductTranslation model for vendor translation overrides - Add product type enum (physical, digital, service, subscription) - Add digital delivery method and platform fields - Add numeric price fields (price_numeric, sale_price_numeric) - Implement language fallback pattern (requested -> 'en' -> None) - Add helper methods: get_title(), get_description(), get_translation() - Add vendor override pattern with effective_* properties - Move title/description from products to translations table 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,15 @@ from .content_page import ContentPage
|
||||
from .customer import Customer, CustomerAddress
|
||||
from .inventory import Inventory
|
||||
from .marketplace_import_job import MarketplaceImportJob
|
||||
from .marketplace_product import MarketplaceProduct
|
||||
from .marketplace_product import (
|
||||
DigitalDeliveryMethod,
|
||||
MarketplaceProduct,
|
||||
ProductType,
|
||||
)
|
||||
from .marketplace_product_translation import MarketplaceProductTranslation
|
||||
from .order import Order, OrderItem
|
||||
from .product import Product
|
||||
from .product_translation import ProductTranslation
|
||||
from .user import User
|
||||
from .vendor import Role, Vendor, VendorUser
|
||||
from .vendor_domain import VendorDomain
|
||||
@@ -40,21 +46,35 @@ __all__ = [
|
||||
"ArchitectureViolation",
|
||||
"ViolationAssignment",
|
||||
"ViolationComment",
|
||||
# Base
|
||||
"Base",
|
||||
# User & Auth
|
||||
"User",
|
||||
# Company & Vendor
|
||||
"Company",
|
||||
"ContentPage",
|
||||
"Inventory",
|
||||
"Customer",
|
||||
"CustomerAddress",
|
||||
"Order",
|
||||
"OrderItem",
|
||||
"Vendor",
|
||||
"VendorUser",
|
||||
"Role",
|
||||
"Product",
|
||||
"MarketplaceImportJob",
|
||||
"MarketplaceProduct",
|
||||
"VendorDomain",
|
||||
"VendorTheme",
|
||||
# Content
|
||||
"ContentPage",
|
||||
# Customer
|
||||
"Customer",
|
||||
"CustomerAddress",
|
||||
# Product - Enums
|
||||
"ProductType",
|
||||
"DigitalDeliveryMethod",
|
||||
# Product - Models
|
||||
"MarketplaceProduct",
|
||||
"MarketplaceProductTranslation",
|
||||
"Product",
|
||||
"ProductTranslation",
|
||||
# Import
|
||||
"MarketplaceImportJob",
|
||||
# Inventory
|
||||
"Inventory",
|
||||
# Orders
|
||||
"Order",
|
||||
"OrderItem",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user