feat(i18n): add multilingual platform descriptions and HostWizard demo data
Some checks failed
CI / ruff (push) Successful in 11s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

- Add description_translations JSON column to Platform model + migration
- Add language tabs to platform admin edit form for multilingual descriptions
- Update API schemas to include description_translations in request/response
- Translate pricing section UI labels via _t() macro (monthly/annual/CTA/etc.)
- Add Luxembourgish (lb) support to all platforms (OMS, Main, Loyalty, Hosting)
- Seed description_translations, contact emails, and social links for all platforms
- Add LuxWeb Agency demo merchant with hosting stores, team, and content pages
- Fix language code typo: lu → lb in platform-edit.js availableLanguages
- Fix store content pages to use correct primary platform instead of hardcoded OMS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 23:38:52 +01:00
parent 2268f32f51
commit 820ab1aaa4
8 changed files with 327 additions and 32 deletions

View File

@@ -130,19 +130,41 @@
<span x-show="errors.name" class="text-xs text-red-600 dark:text-red-400 mt-1" x-text="errors.name"></span>
</label>
<!-- Description -->
<label class="block mb-4 text-sm">
<!-- Description (multilingual) -->
<div class="block mb-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Description
</span>
<!-- Language Tabs -->
<div class="mt-2 border-b border-gray-200 dark:border-gray-700">
<nav class="flex -mb-px space-x-2">
<template x-for="lang in formData.supported_languages" :key="lang">
<button
type="button"
@click="currentLang = lang"
:class="currentLang === lang
? 'border-purple-500 text-purple-600 dark:text-purple-400'
: 'border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'"
class="py-2 px-3 border-b-2 font-medium text-xs transition-colors"
>
<span x-text="languageNames[lang] || lang.toUpperCase()"></span>
<span x-show="lang === formData.default_language" class="ml-1 text-xs text-gray-400">(default)</span>
</button>
</template>
</nav>
</div>
<!-- Per-language textarea -->
<textarea
x-model="formData.description"
x-model="formData.description_translations[currentLang]"
rows="3"
maxlength="500"
:disabled="saving"
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-textarea"
:placeholder="'Description in ' + (languageNames[currentLang] || currentLang)"
class="block w-full mt-2 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-textarea"
></textarea>
</label>
</div>
<!-- Default Language -->
<label class="block mb-4 text-sm">