Replace hardcoded English strings across all 22 templates, 10 JS files, and 4 locale files (en/fr/de/lb) with ~300 translation keys per language. Uses server-side _() for Jinja2 templates and I18n.t() for JS toast messages and dynamic Alpine.js expressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.6 KiB
HTML
45 lines
1.6 KiB
HTML
{# app/modules/loyalty/templates/loyalty/merchant/program-edit.html #}
|
|
{% extends "merchant/base.html" %}
|
|
{% from 'shared/macros/headers.html' import page_header_flex %}
|
|
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
|
{% from 'shared/macros/modals.html' import confirm_modal %}
|
|
|
|
{% block title %}{{ _('loyalty.merchant.program_edit.title') }}{% endblock %}
|
|
|
|
{% block i18n_modules %}['loyalty']{% endblock %}
|
|
|
|
{% block alpine_data %}merchantLoyaltySettings(){% endblock %}
|
|
|
|
{% block content %}
|
|
{% call page_header_flex(title=_('loyalty.merchant.program_edit.page_title'), subtitle=_('loyalty.merchant.program_edit.subtitle')) %}{% endcall %}
|
|
|
|
{{ loading_state(_('loyalty.merchant.program_edit.loading')) }}
|
|
{{ error_state(_('loyalty.merchant.program_edit.error_loading')) }}
|
|
|
|
<div x-show="!loading">
|
|
<form @submit.prevent="saveSettings">
|
|
{% set show_delete = true %}
|
|
{% set show_status = true %}
|
|
{% set cancel_url = '/merchants/loyalty/program' %}
|
|
{% include "loyalty/shared/program-form.html" %}
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Delete Confirmation Modal -->
|
|
{{ confirm_modal(
|
|
'deleteProgramModal',
|
|
_('loyalty.merchant.program_edit.delete_title'),
|
|
_('loyalty.merchant.program_edit.delete_message'),
|
|
'deleteProgram()',
|
|
'showDeleteModal',
|
|
_('loyalty.common.delete'),
|
|
_('loyalty.common.cancel'),
|
|
'danger'
|
|
) }}
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
<script defer src="{{ url_for('loyalty_static', path='shared/js/loyalty-program-form.js') }}"></script>
|
|
<script defer src="{{ url_for('loyalty_static', path='merchant/js/loyalty-settings.js') }}"></script>
|
|
{% endblock %}
|