i18n on the web - deepseek translations
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
{# GET /admin/export — crate::pages::import_export::export::ui::ExportPage #}
|
||||
{% extends "ui/form_page.html" %}
|
||||
|
||||
{% block title %}Export CSV{% endblock %}
|
||||
{% block eyebrow %}Data transfer{% endblock %}
|
||||
{% block heading %}Export CSV{% endblock %}
|
||||
{% block lead %}<p>The download is generated from live table data through gRPC.</p>{% endblock %}
|
||||
{% block title %}{{ nav.tr("export-title") }}{% endblock %}
|
||||
{% block eyebrow %}{{ nav.tr("transfer-eyebrow") }}{% endblock %}
|
||||
{% block heading %}{{ nav.tr("export-title") }}{% endblock %}
|
||||
{% block lead %}<p>{{ nav.tr("export-lead") }}</p>{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
{# A real form post, not HTMX: the response is a file download. #}
|
||||
<form method="post" action="/admin/export.csv">
|
||||
<div class="form-grid">
|
||||
<label>Profile
|
||||
<label>{{ nav.tr("export-profile") }}
|
||||
<select name="profile_name" required>
|
||||
<option value="">Choose a profile</option>
|
||||
<option value="">{{ nav.tr("export-choose-profile") }}</option>
|
||||
{% for profile in page.catalog.profiles %}
|
||||
<option value="{{ profile.name }}">{{ profile.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>Tables
|
||||
<label>{{ nav.tr("export-tables") }}
|
||||
<input name="table_names" list="export-tables" required placeholder="invoices, customers">
|
||||
<small>Separate multiple tables with commas.</small>
|
||||
<small>{{ nav.tr("export-comma-hint") }}</small>
|
||||
</label>
|
||||
</div>
|
||||
<datalist id="export-tables">
|
||||
{%- for profile in page.catalog.profiles %}{% for table in profile.tables %}<option value="{{ table }}"></option>{% endfor %}{% endfor -%}
|
||||
</datalist>
|
||||
<div class="form-actions">
|
||||
<a href="/">Cancel</a>
|
||||
<button type="submit">Download CSV</button>
|
||||
<a href="/">{{ nav.tr("common-cancel") }}</a>
|
||||
<button type="submit">{{ nav.tr("export-download") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
{% extends "ui/form_page.html" %}
|
||||
{% import "ui/alert.html" as alert %}
|
||||
|
||||
{% block title %}Import CSV{% endblock %}
|
||||
{% block eyebrow %}Data transfer{% endblock %}
|
||||
{% block heading %}Import CSV{% endblock %}
|
||||
{% block lead %}<p>Choose a browser-local file or paste CSV. Rows are validated against live table structures before gRPC bulk insertion.</p>{% endblock %}
|
||||
{% block title %}{{ nav.tr("import-title") }}{% endblock %}
|
||||
{% block eyebrow %}{{ nav.tr("transfer-eyebrow") }}{% endblock %}
|
||||
{% block heading %}{{ nav.tr("import-title") }}{% endblock %}
|
||||
{% block lead %}<p>{{ nav.tr("import-lead") }}</p>{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<form hx-post="/admin/import" hx-target="#submission-status" hx-swap="innerHTML"
|
||||
hx-disabled-elt="button[type=submit]">
|
||||
<div class="form-grid">
|
||||
<label>Profile
|
||||
<label>{{ nav.tr("import-profile") }}
|
||||
<input name="profile_name" list="import-profiles" value="{{ page.form.profile_name }}" required placeholder="billing">
|
||||
</label>
|
||||
<label>Target tables<input name="table_names" list="import-tables" value="{{ page.form.table_names }}" required placeholder="invoices, customers"></label>
|
||||
<label class="wide">CSV file
|
||||
<label>{{ nav.tr("import-target-tables") }}<input name="table_names" list="import-tables" value="{{ page.form.table_names }}" required placeholder="invoices, customers"></label>
|
||||
<label class="wide">{{ nav.tr("import-csv-file") }}
|
||||
<input type="file" accept=".csv,text/csv"
|
||||
onchange="this.files[0]?.text().then(value => document.getElementById('csv-data').value = value)">
|
||||
</label>
|
||||
<label class="wide">CSV data<textarea id="csv-data" name="csv_data" rows="14" required>{{ page.form.csv_data }}</textarea></label>
|
||||
<label class="wide">{{ nav.tr("import-csv-data") }}<textarea id="csv-data" name="csv_data" rows="14" required>{{ page.form.csv_data }}</textarea></label>
|
||||
</div>
|
||||
<datalist id="import-profiles">
|
||||
{% for profile in page.catalog.profiles %}<option value="{{ profile.name }}"></option>{% endfor %}
|
||||
@@ -28,11 +28,11 @@
|
||||
{%- for profile in page.catalog.profiles %}{% for table in profile.tables %}<option value="{{ table }}"></option>{% endfor %}{% endfor -%}
|
||||
</datalist>
|
||||
<div id="submission-status" aria-live="polite">
|
||||
{%- if let Some(message) = page.error %}{% call alert::error("Could not import CSV", message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.error %}{% call alert::error(nav.locale, nav.tr("import-error-title"), message) %}{% endcall %}{% endif -%}
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<a href="/">Cancel</a>
|
||||
<button type="submit">Import rows</button>
|
||||
<a href="/">{{ nav.tr("common-cancel") }}</a>
|
||||
<button type="submit">{{ nav.tr("import-import-rows") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user