feat: add i18n translations to platform marketing website

- Add platform translation keys to all locale files (en, fr, de, lb)
- Integrate language selector in platform base template header
- Translate homepage-wizamart.html (hero, pricing, addons, find-shop, CTA)
- Translate pricing.html, find-shop.html, signup-success.html
- Add i18n context to platform routes via get_jinja2_globals()
- Support variable interpolation for trial_days, count parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-27 15:34:02 +01:00
parent 95987d0c1c
commit 68a303727b
10 changed files with 905 additions and 101 deletions

View File

@@ -2,7 +2,7 @@
{# Letzshop Vendor Finder Page #}
{% extends "platform/base.html" %}
{% block title %}Find Your Shop - Wizamart{% endblock %}
{% block title %}{{ _("platform.find_shop.title") }} - Wizamart{% endblock %}
{% block content %}
<div x-data="vendorFinderData()" class="py-16 lg:py-24">
@@ -10,10 +10,10 @@
{# Header #}
<div class="text-center mb-12">
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4">
Find Your Letzshop Shop
{{ _("platform.find_shop.title") }}
</h1>
<p class="text-xl text-gray-600 dark:text-gray-400">
Enter your Letzshop shop URL or search by name to get started.
{{ _("platform.find_shop.subtitle") }}
</p>
</div>
@@ -24,7 +24,7 @@
type="text"
x-model="searchQuery"
@keyup.enter="lookupVendor()"
placeholder="Enter Letzshop URL or shop name..."
placeholder="{{ _('platform.find_shop.search_placeholder') }}"
class="flex-1 px-4 py-3 rounded-xl border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white placeholder-gray-400 focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
/>
<button
@@ -38,18 +38,18 @@
</svg>
</template>
<template x-if="!loading">
<span>Search</span>
<span>{{ _("platform.find_shop.search_button") }}</span>
</template>
</button>
</div>
{# Examples #}
<div class="mt-4 text-sm text-gray-500 dark:text-gray-400">
<strong>Examples:</strong>
<strong>{{ _("platform.find_shop.examples") }}</strong>
<ul class="list-disc list-inside mt-1">
<li>https://letzshop.lu/vendors/my-shop</li>
<li>letzshop.lu/vendors/my-shop</li>
<li>my-shop (just the shop name)</li>
<li>my-shop</li>
</ul>
</div>
</div>
@@ -61,6 +61,7 @@
<div class="p-8">
<div class="flex items-start justify-between">
<div>
<p class="text-sm text-green-600 font-medium mb-1">{{ _("platform.find_shop.found") }}</p>
<h2 class="text-2xl font-bold text-gray-900 dark:text-white" x-text="result.vendor.name"></h2>
<a :href="result.vendor.letzshop_url" target="_blank"
class="text-indigo-600 dark:text-indigo-400 hover:underline mt-1 inline-block"
@@ -81,13 +82,15 @@
<template x-if="!result.vendor.is_claimed">
<a :href="'/signup?letzshop=' + result.vendor.slug"
class="px-8 py-3 bg-green-600 hover:bg-green-700 text-white font-semibold rounded-xl transition-colors">
Claim This Shop & Start Free Trial
{{ _("platform.find_shop.claim_button") }}
</a>
</template>
<template x-if="result.vendor.is_claimed">
<div class="px-6 py-3 bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400 rounded-xl">
This shop has already been claimed. If this is your shop, please
<a href="/contact" class="text-indigo-600 hover:underline">contact support</a>.
<span class="inline-flex items-center">
<span class="text-yellow-500 mr-2">{{ _("platform.find_shop.claimed_badge") }}</span>
</span>
{{ _("platform.find_shop.already_claimed") }}
</div>
</template>
</div>
@@ -99,12 +102,12 @@
<svg class="w-16 h-16 text-gray-400 mx-auto mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">Shop Not Found</h3>
<p class="text-gray-600 dark:text-gray-400" x-text="result.error || 'We could not find a Letzshop shop with that URL. Please check and try again.'"></p>
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">{{ _("platform.find_shop.not_found") }}</h3>
<p class="text-gray-600 dark:text-gray-400" x-text="result.error || '{{ _("platform.find_shop.not_found") }}'"></p>
<div class="mt-6">
<a href="/signup" class="text-indigo-600 dark:text-indigo-400 hover:underline">
Or sign up without a Letzshop connection &rarr;
{{ _("platform.find_shop.or_signup") }} &rarr;
</a>
</div>
</div>
@@ -114,18 +117,18 @@
{# Help Section #}
<div class="mt-12 text-center">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Need Help?</h3>
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">{{ _("platform.find_shop.need_help") }}</h3>
<p class="text-gray-600 dark:text-gray-400 mb-4">
Don't have a Letzshop account yet? No problem!
{{ _("platform.find_shop.no_account_yet") }}
</p>
<div class="flex flex-col sm:flex-row gap-4 justify-center">
<a href="https://letzshop.lu" target="_blank"
class="px-6 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 font-medium rounded-xl hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
Create a Letzshop Account
{{ _("platform.find_shop.create_letzshop") }}
</a>
<a href="/signup"
class="px-6 py-3 bg-indigo-600 hover:bg-indigo-700 text-white font-medium rounded-xl transition-colors">
Sign Up Without Letzshop
{{ _("platform.find_shop.signup_without") }}
</a>
</div>
</div>