refactor(i18n): Batch 3 — eliminate {% if lang %} blocks in directory templates
Add 19 new locale keys (dir_page_title, dir_page_meta_desc, dir_page_og_desc,
dir_results_count_singular/plural, dir_ex_*, sp_enquiry_placeholder,
sp_cta_basic_desc/btn, sp_locked_popover_desc, sp_cta_claim_desc,
enquiry_forwarded_msg, enquiry_received_msg) and replace all 23 {% if lang %}
blocks across directory.html, supplier_detail.html, partials/results.html,
and partials/enquiry_result.html.
directory.html hero description reuses existing dir_subheading key via
tformat(n=, c=). Results count split into singular/plural keys to handle
EN "supplier"/"suppliers" and DE "Anbieter"/"Anbietern" pluralization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{% if lang == 'de' %}Padel-Platz Anbieterverzeichnis - {{ config.APP_NAME }}{% else %}Padel Court Supplier Directory - {{ config.APP_NAME }}{% endif %}{% endblock %}
|
||||
{% block title %}{{ t.dir_page_title }} - {{ config.APP_NAME }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% if lang == 'de' %}
|
||||
<meta name="description" content="Über {{ total_suppliers }}+ Anbieter aus {{ total_countries }} Ländern. Hersteller, Baufirmen, Kunstrasenproduzenten, Beleuchtung und Software. Den richtigen Partner für dein Projekt finden.">
|
||||
<meta property="og:title" content="Padel-Platz Anbieterverzeichnis - {{ config.APP_NAME }}">
|
||||
<meta property="og:description" content="Über {{ total_suppliers }}+ Anbieter aus {{ total_countries }} Ländern. Hersteller, Baufirmen, Kunstrasenproduzenten, Beleuchtung und Software.">
|
||||
{% else %}
|
||||
<meta name="description" content="Browse {{ total_suppliers }}+ padel court suppliers across {{ total_countries }} countries. Manufacturers, builders, turf, lighting, and software. Find the right partner for your project.">
|
||||
<meta property="og:title" content="Padel Court Supplier Directory - {{ config.APP_NAME }}">
|
||||
<meta property="og:description" content="Browse {{ total_suppliers }}+ padel court suppliers across {{ total_countries }} countries. Manufacturers, builders, turf, lighting, and software.">
|
||||
{% endif %}
|
||||
<meta name="description" content="{{ t.dir_page_meta_desc | tformat(count=total_suppliers, countries=total_countries) }}">
|
||||
<meta property="og:title" content="{{ t.dir_page_title }} - {{ config.APP_NAME }}">
|
||||
<meta property="og:description" content="{{ t.dir_page_og_desc | tformat(count=total_suppliers, countries=total_countries) }}">
|
||||
<style>
|
||||
:root {
|
||||
--dir-green: #15803D;
|
||||
@@ -305,7 +299,7 @@
|
||||
<main class="container-page">
|
||||
<div class="dir-hero">
|
||||
<h1>{{ t.dir_heading }}</h1>
|
||||
<p>{% if lang == 'de' %}Über {{ total_suppliers }}+ Anbieter aus {{ total_countries }} Ländern. Hersteller, Baufirmen und Spezialisten für dein Projekt.{% else %}Browse {{ total_suppliers }}+ suppliers across {{ total_countries }} countries. Find manufacturers, builders, and specialists for your project.{% endif %}</p>
|
||||
<p>{{ t.dir_subheading | tformat(n=total_suppliers, c=total_countries) }}</p>
|
||||
<div class="dir-stats">
|
||||
<span><strong>{{ total_suppliers }}</strong> {{ t.dir_stat_suppliers }}</span>
|
||||
<span><strong>{{ total_countries }}</strong> {{ t.dir_stat_countries }}</span>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<p style="font-weight:700;color:#16A34A;margin-bottom:4px">{{ t.enquiry_success_title }}</p>
|
||||
<p style="font-size:0.8125rem;color:#166534">
|
||||
{% if supplier and supplier.contact_email %}
|
||||
{% if lang == 'de' %}Deine Nachricht wurde an {{ supplier.name }} weitergeleitet. Der Anbieter meldet sich direkt bei dir.{% else %}We've forwarded your message to {{ supplier.name }}. They'll be in touch directly.{% endif %}
|
||||
{{ t.enquiry_forwarded_msg | tformat(name=supplier.name) }}
|
||||
{% else %}
|
||||
{% if lang == 'de' %}Deine Nachricht wurde empfangen. Das Team meldet sich in Kürze bei dir.{% else %}Your message has been received. The team will be in touch shortly.{% endif %}
|
||||
{{ t.enquiry_received_msg }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<p style="font-size:0.8125rem;color:#64748B;margin-bottom:1rem">
|
||||
{% if lang == 'de' %}{{ suppliers|length }} von {{ total }} Anbieter{% if total != 1 %}n{% endif %}{% else %}Showing {{ suppliers|length }} of {{ total }} supplier{{ 's' if total != 1 }}{% endif %}
|
||||
{% if total != 1 %}{{ t.dir_results_count_plural | tformat(shown=suppliers|length, total=total) }}{% else %}{{ t.dir_results_count_singular | tformat(shown=suppliers|length, total=total) }}{% endif %}
|
||||
{% if page > 1 %} (page {{ page }}){% endif %}
|
||||
</p>
|
||||
|
||||
@@ -38,19 +38,19 @@
|
||||
<div class="ph-grid"></div>
|
||||
<div class="example-icon">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
|
||||
<p>{% if lang == 'de' %}Dein Projektfoto{% else %}Your project photo{% endif %}</p>
|
||||
<p>{{ t.dir_ex_photo }}</p>
|
||||
</div>
|
||||
<div class="dir-card__featured" style="background:#3B82F6">{% if lang == 'de' %}Beispiel{% else %}Example{% endif %}</div>
|
||||
<div class="dir-card__cat dir-card__cat--example">{% if lang == 'de' %}Deine Kategorie{% else %}Your Category{% endif %}</div>
|
||||
<div class="dir-card__featured" style="background:#3B82F6">{{ t.dir_ex_badge }}</div>
|
||||
<div class="dir-card__cat dir-card__cat--example">{{ t.dir_ex_category }}</div>
|
||||
</div>
|
||||
<div class="dir-card__body">
|
||||
<div class="dir-card__logo-wrap">
|
||||
<div class="dir-card__logo-ph">?</div>
|
||||
</div>
|
||||
<h3 class="dir-card__name">{% if lang == 'de' %}Dein Unternehmen{% else %}Your Company{% endif %}</h3>
|
||||
<h3 class="dir-card__name">{{ t.dir_ex_company }}</h3>
|
||||
<p class="dir-card__loc">
|
||||
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
||||
{% if lang == 'de' %}Deine Stadt, Land{% else %}Your City, Country{% endif %}
|
||||
{{ t.dir_ex_location }}
|
||||
</p>
|
||||
<div class="dir-card__stats">
|
||||
<span class="dir-card__stat dir-card__stat--verified">
|
||||
@@ -59,10 +59,10 @@
|
||||
</span>
|
||||
<span class="dir-card__stat">12 projects · 8 yrs</span>
|
||||
</div>
|
||||
<p class="dir-card__desc">{% if lang == 'de' %}Verifizierte Einträge enthalten Titelfoto, Projektstatistiken und einen direkten Anfragebutton — sie erscheinen über nicht verifizierten Anbietern in den Suchergebnissen.{% else %}Verified listings include cover photo, project stats, and a direct quote button — placed above unverified suppliers in search results.{% endif %}</p>
|
||||
<p class="dir-card__desc">{{ t.dir_ex_desc }}</p>
|
||||
<div class="dir-card__foot">
|
||||
<span></span>
|
||||
<span class="dir-card__action dir-card__action--example">{% if lang == 'de' %}Eintrag erstellen →{% else %}Get listed →{% endif %}</span>
|
||||
<span class="dir-card__action dir-card__action--example">{{ t.dir_ex_cta }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{% if lang == 'de' %}{{ supplier.name }} - Anbieterverzeichnis - {{ config.APP_NAME }}{% else %}{{ supplier.name }} - Supplier Directory - {{ config.APP_NAME }}{% endif %}{% endblock %}
|
||||
{% block title %}{{ supplier.name }} - {{ t.dir_page_title }} - {{ config.APP_NAME }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% set _sup_country = country_labels.get(supplier.country_code, supplier.country_code) %}
|
||||
@@ -361,7 +361,7 @@
|
||||
<div class="sp-enquiry-field">
|
||||
<label class="sp-enquiry-label">{{ t.sp_enquiry_message }} <span style="color:#EF4444">*</span></label>
|
||||
<textarea name="message" class="sp-enquiry-input sp-enquiry-textarea" required
|
||||
placeholder="{% if lang == 'de' %}Erzähl {{ supplier.name }} von Deinem Projekt…{% else %}Tell {{ supplier.name }} about your project…{% endif %}"></textarea>
|
||||
placeholder="{{ t.sp_enquiry_placeholder | tformat(name=supplier.name) }}"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="sp-enquiry-submit">{{ t.sp_enquiry_submit }}</button>
|
||||
</form>
|
||||
@@ -461,10 +461,10 @@
|
||||
<div class="sp-cta-strip">
|
||||
<div class="sp-cta-strip__text">
|
||||
<h3>{{ t.sp_cta_basic_h3 }}</h3>
|
||||
<p>{% if lang == 'de' %}Upgrade auf Growth, um in unserer Anbieter-Vermittlung zu erscheinen und qualifizierte Projekt-Leads zu erhalten.{% else %}Upgrade to Growth to appear in our supplier matching and receive qualified project leads.{% endif %}</p>
|
||||
<p>{{ t.sp_cta_basic_desc }}</p>
|
||||
</div>
|
||||
<a href="{{ url_for('suppliers.signup') }}" class="sp-cta-strip__btn">
|
||||
{% if lang == 'de' %}Auf Growth upgraden →{% else %}Upgrade to Growth →{% endif %}
|
||||
{{ t.sp_cta_basic_btn }}
|
||||
</a>
|
||||
</div>
|
||||
{% elif supplier.tier == 'growth' %}
|
||||
@@ -500,7 +500,7 @@
|
||||
<div class="sp-locked-popover" id="locked-popover" role="tooltip">
|
||||
<p class="sp-locked-popover__title">{{ t.sp_locked_popover_title }}</p>
|
||||
<p class="sp-locked-popover__body">
|
||||
{% if lang == 'de' %}Dieser Anbieter hat seinen Eintrag noch nicht verifiziert. Nutze unseren Angebotsassistenten und wir vermitteln dich mit verifizierten Anbietern in Deiner Region.{% else %}This supplier hasn't verified their listing yet. Use our quote wizard and we'll match you with verified suppliers in your region.{% endif %}
|
||||
{{ t.sp_locked_popover_desc }}
|
||||
</p>
|
||||
<a href="{{ url_for('leads.quote_request', country=supplier.country_code) }}"
|
||||
class="sp-locked-popover__link">{{ t.sp_locked_popover_link }}</a>
|
||||
@@ -514,7 +514,7 @@
|
||||
<div class="sp-cta-strip">
|
||||
<div class="sp-cta-strip__text">
|
||||
<h3>{{ t.sp_cta_claim_h3 }}</h3>
|
||||
<p>{% if lang == 'de' %}Beanspruche und verifiziere diesen Eintrag, um Projektanfragen von Padel-Entwicklern zu erhalten.{% else %}Claim and verify this listing to start receiving project enquiries from padel developers.{% endif %}</p>
|
||||
<p>{{ t.sp_cta_claim_desc }}</p>
|
||||
</div>
|
||||
<a href="{{ url_for('suppliers.claim', slug=supplier.slug) }}" class="sp-cta-strip__btn sp-cta-strip__btn--green">
|
||||
{{ t.sp_cta_claim_btn }}
|
||||
|
||||
@@ -259,6 +259,9 @@
|
||||
"scenario_updated": "Aktualisiert",
|
||||
"scenario_created": "Erstellt",
|
||||
"dir_heading": "Padelplatz-Hersteller, Platzbauer & Anbieter",
|
||||
"dir_page_title": "Padel-Platz Anbieterverzeichnis",
|
||||
"dir_page_meta_desc": "Über {count}+ Anbieter aus {countries} Ländern. Hersteller, Baufirmen, Kunstrasenproduzenten, Beleuchtung und Software. Den richtigen Partner für dein Projekt finden.",
|
||||
"dir_page_og_desc": "Über {count}+ Anbieter aus {countries} Ländern. Hersteller, Baufirmen, Kunstrasenproduzenten, Beleuchtung und Software.",
|
||||
"dir_subheading": "Über {n} Anbieter aus {c} Ländern. Hersteller, Platzbauer und schlüsselfertige Lösungen für Deinen Padelplatz.",
|
||||
"dir_stat_suppliers": "Anbieter",
|
||||
"dir_stat_countries": "Länder",
|
||||
@@ -281,6 +284,15 @@
|
||||
"dir_empty_heading": "Keine Anbieter gefunden",
|
||||
"dir_empty_sub": "Passe Deine Suche oder Filter an.",
|
||||
"dir_empty_clear": "Alle Filter zurücksetzen",
|
||||
"dir_results_count_singular": "{shown} von {total} Anbieter",
|
||||
"dir_results_count_plural": "{shown} von {total} Anbietern",
|
||||
"dir_ex_photo": "Dein Projektfoto",
|
||||
"dir_ex_badge": "Beispiel",
|
||||
"dir_ex_category": "Deine Kategorie",
|
||||
"dir_ex_company": "Dein Unternehmen",
|
||||
"dir_ex_location": "Deine Stadt, Land",
|
||||
"dir_ex_desc": "Verifizierte Einträge enthalten Titelfoto, Projektstatistiken und einen direkten Anfragebutton — sie erscheinen über nicht verifizierten Anbietern in den Suchergebnissen.",
|
||||
"dir_ex_cta": "Eintrag erstellen →",
|
||||
"dir_cat_manufacturer": "Hersteller",
|
||||
"dir_cat_turnkey": "Generalunternehmer",
|
||||
"dir_cat_consultant": "Berater",
|
||||
@@ -352,8 +364,15 @@
|
||||
"sp_locked_popover_title": "Direkte Anfragen nicht verfügbar",
|
||||
"sp_locked_popover_link": "Angebotsassistent nutzen →",
|
||||
"sp_locked_popover_dismiss": "Schließen",
|
||||
"sp_enquiry_placeholder": "Erzähl {name} von Deinem Projekt…",
|
||||
"sp_cta_basic_desc": "Upgrade auf Growth, um in unserer Anbieter-Vermittlung zu erscheinen und qualifizierte Projekt-Leads zu erhalten.",
|
||||
"sp_cta_basic_btn": "Auf Growth upgraden →",
|
||||
"sp_locked_popover_desc": "Dieser Anbieter hat seinen Eintrag noch nicht verifiziert. Nutze unseren Angebotsassistenten und wir vermitteln dich mit verifizierten Anbietern in Deiner Region.",
|
||||
"sp_cta_claim_desc": "Beanspruche und verifiziere diesen Eintrag, um Projektanfragen von Padel-Entwicklern zu erhalten.",
|
||||
"enquiry_success_title": "Anfrage gesendet!",
|
||||
"enquiry_error_title": "Bitte korrigiere Folgendes:",
|
||||
"enquiry_forwarded_msg": "Deine Nachricht wurde an {name} weitergeleitet. Der Anbieter meldet sich direkt bei dir.",
|
||||
"enquiry_received_msg": "Deine Nachricht wurde empfangen. Das Team meldet sich in Kürze bei dir.",
|
||||
"q_btn_next": "Weiter →",
|
||||
"q_btn_back": "← Zurück",
|
||||
"q_btn_submit": "Absenden & Angebote erhalten →",
|
||||
|
||||
@@ -259,6 +259,9 @@
|
||||
"scenario_updated": "Updated",
|
||||
"scenario_created": "Created",
|
||||
"dir_heading": "Padel Court Supplier Directory",
|
||||
"dir_page_title": "Padel Court Supplier Directory",
|
||||
"dir_page_meta_desc": "Browse {count}+ padel court suppliers across {countries} countries. Manufacturers, builders, turf, lighting, and software. Find the right partner for your project.",
|
||||
"dir_page_og_desc": "Browse {count}+ padel court suppliers across {countries} countries. Manufacturers, builders, turf, lighting, and software.",
|
||||
"dir_subheading": "Browse {n}+ suppliers across {c} countries. Find manufacturers, builders, and specialists for your project.",
|
||||
"dir_stat_suppliers": "suppliers",
|
||||
"dir_stat_countries": "countries",
|
||||
@@ -281,6 +284,15 @@
|
||||
"dir_empty_heading": "No suppliers found",
|
||||
"dir_empty_sub": "Try adjusting your search or filters.",
|
||||
"dir_empty_clear": "Clear all filters",
|
||||
"dir_results_count_singular": "Showing {shown} of {total} supplier",
|
||||
"dir_results_count_plural": "Showing {shown} of {total} suppliers",
|
||||
"dir_ex_photo": "Your project photo",
|
||||
"dir_ex_badge": "Example",
|
||||
"dir_ex_category": "Your Category",
|
||||
"dir_ex_company": "Your Company",
|
||||
"dir_ex_location": "Your City, Country",
|
||||
"dir_ex_desc": "Verified listings include cover photo, project stats, and a direct quote button — placed above unverified suppliers in search results.",
|
||||
"dir_ex_cta": "Get listed →",
|
||||
"dir_cat_manufacturer": "Manufacturer",
|
||||
"dir_cat_turnkey": "Turnkey Provider",
|
||||
"dir_cat_consultant": "Consultant",
|
||||
@@ -352,8 +364,15 @@
|
||||
"sp_locked_popover_title": "Direct quotes unavailable",
|
||||
"sp_locked_popover_link": "Use Quote Wizard →",
|
||||
"sp_locked_popover_dismiss": "Dismiss",
|
||||
"sp_enquiry_placeholder": "Tell {name} about your project…",
|
||||
"sp_cta_basic_desc": "Upgrade to Growth to appear in our supplier matching and receive qualified project leads.",
|
||||
"sp_cta_basic_btn": "Upgrade to Growth →",
|
||||
"sp_locked_popover_desc": "This supplier hasn't verified their listing yet. Use our quote wizard and we'll match you with verified suppliers in your region.",
|
||||
"sp_cta_claim_desc": "Claim and verify this listing to start receiving project enquiries from padel developers.",
|
||||
"enquiry_success_title": "Enquiry sent!",
|
||||
"enquiry_error_title": "Please fix the following:",
|
||||
"enquiry_forwarded_msg": "We've forwarded your message to {name}. They'll be in touch directly.",
|
||||
"enquiry_received_msg": "Your message has been received. The team will be in touch shortly.",
|
||||
"q_btn_next": "Next →",
|
||||
"q_btn_back": "← Back",
|
||||
"q_btn_submit": "Submit & Get Quotes →",
|
||||
|
||||
Reference in New Issue
Block a user