i18n on the web - deepseek translations
This commit is contained in:
@@ -17,33 +17,33 @@
|
||||
{% import "ui/dialog.html" as panel_dialog %}
|
||||
{% import "ui/toast.html" as panel_toast %}
|
||||
{% if standalone_column_panel %}
|
||||
{%- if let Some(message) = page.error %}{% call panel_alert::error("Could not add the column", message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.status %}{% call panel_toast::success("Staged", message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.error %}{% call panel_dialog::error("Could not add the column", message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.error %}{% call panel_alert::error(nav.locale, nav.tr("td-could-not-add-column"), message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.status %}{% call panel_toast::success(nav.tr("td-staged"), message) %}{% endcall %}{% endif -%}
|
||||
{%- if let Some(message) = page.error %}{% call panel_dialog::error(nav.locale, nav.tr("td-could-not-add-column"), message) %}{% endcall %}{% endif -%}
|
||||
{% endif %}
|
||||
|
||||
<div class="form-grid">
|
||||
<label>{% if page.columns.show_link_target() %}Link alias{% else %}Column name{% endif %}
|
||||
<label>{% if page.columns.show_link_target() %}{{ nav.tr("td-link-alias") }}{% else %}{{ nav.tr("td-column-name") }}{% endif %}
|
||||
<input name="column_name_input" value="{{ page.columns.name_input }}" placeholder="issued_on">
|
||||
{% if page.columns.show_link_target() %}<small>The alias is the column name used to distinguish this relationship.</small>{% endif %}
|
||||
{% if page.columns.show_link_target() %}<small>{{ nav.tr("td-link-alias-hint") }}</small>{% endif %}
|
||||
</label>
|
||||
<label>Column type
|
||||
<label>{{ nav.tr("td-column-type") }}
|
||||
<select name="column_type_input"
|
||||
hx-post="/admin/tables/columns/builder{{ page.selection.query() }}"
|
||||
hx-trigger="change" hx-include="#column-form"
|
||||
hx-target="#column-panel" hx-swap="innerHTML"
|
||||
hx-vals='{"action": "refresh"}'>
|
||||
<option value="">Choose a type</option>
|
||||
<option value="">{{ nav.tr("td-choose-type") }}</option>
|
||||
{% for column_type in column_types %}
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}FKlink{% else %}{{ column_type }}{% endif %}</option>
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else %}{{ column_type }}{% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
{% if page.columns.show_temporal_type() %}
|
||||
<label>Temporal type
|
||||
<label>{{ nav.tr("td-temporal-type") }}
|
||||
<select name="temporal_type_input">
|
||||
<option value="">Choose a temporal type</option>
|
||||
<option value="">{{ nav.tr("td-choose-temporal-type") }}</option>
|
||||
{% for temporal_type in temporal_types %}
|
||||
<option value="{{ temporal_type }}" {% if page.columns.temporal_type_input == *temporal_type %}selected{% endif %}>{{ temporal_type }}</option>
|
||||
{% endfor %}
|
||||
@@ -52,9 +52,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% if page.columns.show_gtin_type() %}
|
||||
<label>GTIN type
|
||||
<label>{{ nav.tr("td-gtin-type") }}
|
||||
<select name="gtin_type_input">
|
||||
<option value="">Choose a GTIN length</option>
|
||||
<option value="">{{ nav.tr("td-choose-gtin-length") }}</option>
|
||||
{% for gtin_type in gtin_types %}
|
||||
<option value="{{ gtin_type }}" {% if page.columns.gtin_type_input == *gtin_type %}selected{% endif %}>GTIN-{{ gtin_type }}</option>
|
||||
{% endfor %}
|
||||
@@ -63,57 +63,57 @@
|
||||
{% endif %}
|
||||
|
||||
{% if page.columns.show_decimal_arguments() %}
|
||||
<label>Precision
|
||||
<label>{{ nav.tr("td-precision") }}
|
||||
<input name="decimal_precision_input" value="{{ page.columns.decimal_precision_input }}"
|
||||
inputmode="numeric" placeholder="12">
|
||||
<small>Total digits stored, at least 1.</small>
|
||||
<small>{{ nav.tr("td-precision-hint") }}</small>
|
||||
</label>
|
||||
<label>Scale
|
||||
<label>{{ nav.tr("td-scale") }}
|
||||
<input name="decimal_scale_input" value="{{ page.columns.decimal_scale_input }}"
|
||||
inputmode="numeric" placeholder="3">
|
||||
<small>Digits after the point, no more than the precision.</small>
|
||||
<small>{{ nav.tr("td-scale-hint") }}</small>
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if page.columns.show_link_target() %}
|
||||
<label>Referenced table
|
||||
<label>{{ nav.tr("td-referenced-table") }}
|
||||
<select name="link_table_input">
|
||||
<option value="">Choose a table</option>
|
||||
<option value="">{{ nav.tr("td-choose-table") }}</option>
|
||||
{% if !page.global_link_target_tables().is_empty() %}
|
||||
<optgroup label="Global">
|
||||
<optgroup label="{{ nav.tr("td-group-global") }}">
|
||||
{% for table in page.global_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.user_link_target_tables().is_empty() %}
|
||||
<optgroup label="User-created">
|
||||
<optgroup label="{{ nav.tr("td-group-user") }}">
|
||||
{% for table in page.user_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.system_link_target_tables().is_empty() %}
|
||||
<optgroup label="System-created">
|
||||
<optgroup label="{{ nav.tr("td-group-system") }}">
|
||||
{% for table in page.system_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
</select>
|
||||
{% if page.global_link_target_tables().is_empty() && page.user_link_target_tables().is_empty() && page.system_link_target_tables().is_empty() %}<small>No eligible tables exist in this scope.</small>{% endif %}
|
||||
{% if page.global_link_target_tables().is_empty() && page.user_link_target_tables().is_empty() && page.system_link_target_tables().is_empty() %}<small>{{ nav.tr("td-no-eligible-tables") }}</small>{% endif %}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if page.columns.show_money_options() %}
|
||||
<label>Currency
|
||||
<label>{{ nav.tr("td-currency") }}
|
||||
<input name="column_currency_input" value="{{ page.columns.currency_input }}" list="currency-codes"
|
||||
maxlength="3" placeholder="EUR">
|
||||
</label>
|
||||
<label>Rounding
|
||||
<label>{{ nav.tr("td-rounding") }}
|
||||
<select name="column_rounding_input">
|
||||
<option value="none" {% if page.columns.rounding_input != "half-up" %}selected{% endif %}>none</option>
|
||||
<option value="half-up" {% if page.columns.rounding_input == "half-up" %}selected{% endif %}>half-up</option>
|
||||
<option value="none" {% if page.columns.rounding_input != "half-up" %}selected{% endif %}>{{ nav.tr("td-rounding-none") }}</option>
|
||||
<option value="half-up" {% if page.columns.rounding_input == "half-up" %}selected{% endif %}>{{ nav.tr("td-rounding-half-up") }}</option>
|
||||
</select>
|
||||
</label>
|
||||
{% endif %}
|
||||
@@ -124,48 +124,48 @@
|
||||
that asks for one on top.
|
||||
#}
|
||||
{% if page.columns.show_indexing() %}
|
||||
<label>Indexing
|
||||
<label>{{ nav.tr("td-indexing") }}
|
||||
<select name="column_indexing_input">
|
||||
<option value="no" {% if page.columns.indexing_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.columns.indexing_input == "yes" %}selected{% endif %}>yes</option>
|
||||
<option value="no" {% if page.columns.indexing_input != "yes" %}selected{% endif %}>{{ nav.tr("common-no") }}</option>
|
||||
<option value="yes" {% if page.columns.indexing_input == "yes" %}selected{% endif %}>{{ nav.tr("common-yes") }}</option>
|
||||
</select>
|
||||
</label>
|
||||
{% else if page.columns.pending_is_auto_indexed() %}
|
||||
<div class="field-note">
|
||||
<span class="field-label">Indexing</span>
|
||||
<p class="hint">Indexed automatically — a link is a foreign key, and the server indexes every one of them.</p>
|
||||
<span class="field-label">{{ nav.tr("td-indexing") }}</span>
|
||||
<p class="hint">{{ nav.tr("td-indexed-automatically") }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<label>Required
|
||||
<label>{{ nav.tr("td-required") }}
|
||||
<select name="column_required_input">
|
||||
<option value="no" {% if page.columns.required_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.columns.required_input == "yes" %}selected{% endif %}>yes</option>
|
||||
<option value="no" {% if page.columns.required_input != "yes" %}selected{% endif %}>{{ nav.tr("common-no") }}</option>
|
||||
<option value="yes" {% if page.columns.required_input == "yes" %}selected{% endif %}>{{ nav.tr("common-yes") }}</option>
|
||||
</select>
|
||||
<small>A row must carry a value for it.</small>
|
||||
<small>{{ nav.tr("td-required-hint") }}</small>
|
||||
</label>
|
||||
{% if page.columns.show_quantity_ledger() %}
|
||||
<label>Quantity ledger
|
||||
<label>{{ nav.tr("td-quantity-ledger") }}
|
||||
<select name="column_quantity_ledger_input">
|
||||
<option value="no" {% if page.columns.quantity_ledger_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.columns.quantity_ledger_input == "yes" %}selected{% endif %}>yes</option>
|
||||
<option value="no" {% if page.columns.quantity_ledger_input != "yes" %}selected{% endif %}>{{ nav.tr("common-no") }}</option>
|
||||
<option value="yes" {% if page.columns.quantity_ledger_input == "yes" %}selected{% endif %}>{{ nav.tr("common-yes") }}</option>
|
||||
</select>
|
||||
<small>{{ page.columns.quantity_ledger_types() }} only.</small>
|
||||
<small>{{ nav.tr_args("td-ql-only", [("types", page.columns.quantity_ledger_types())]) }}</small>
|
||||
</label>
|
||||
{% else %}
|
||||
<p class="hint">A shared table keeps no books of its own, so it cannot hold a quantity-ledger column.</p>
|
||||
<p class="hint">{{ nav.tr("td-shared-no-quantity-ledger") }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="secondary"
|
||||
hx-post="/admin/tables/columns/builder{{ page.selection.query() }}"
|
||||
hx-include="#column-form" hx-target="#column-panel" hx-swap="innerHTML"
|
||||
hx-vals='{"action": "add-column"}'>Stage column</button>
|
||||
hx-vals='{"action": "add-column"}'>{{ nav.tr("td-stage-column") }}</button>
|
||||
|
||||
{% if page.columns.added.is_empty() %}
|
||||
<p class="hint">No columns staged yet. Describe one above and press <em>Stage column</em>.</p>
|
||||
<p class="hint">{{ nav.tr("td-no-staged-columns") }} <em>{{ nav.tr("td-stage-column") }}</em>.</p>
|
||||
{% else %}
|
||||
<table class="builder-table">
|
||||
<thead><tr><th>Name</th><th>Type</th><th>Indexed</th><th>Options</th><th></th></tr></thead>
|
||||
<thead><tr><th>{{ nav.tr("td-col-name") }}</th><th>{{ nav.tr("td-col-type") }}</th><th>{{ nav.tr("td-col-indexed") }}</th><th>{{ nav.tr("td-col-options") }}</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{% for column in page.columns.added %}
|
||||
<tr>
|
||||
@@ -182,21 +182,21 @@
|
||||
{% if column.indexed %}[x]{% else %}[ ]{% endif %}
|
||||
</button>
|
||||
{% else if column.is_indexed() %}
|
||||
<span class="tag">indexed automatically</span>
|
||||
<span class="tag">{{ nav.tr("td-indexed-automatically-tag") }}</span>
|
||||
{% else %}
|
||||
<span class="hint">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if column.required %}<span class="tag">required</span>{% endif %}
|
||||
{% if column.quantity_ledger %}<span class="tag">quantity ledger</span>{% endif %}
|
||||
{% if !column.currency.is_empty() %}<span class="tag">{{ column.currency }}, {{ column.money_mode.label() }}</span>{% endif %}
|
||||
{% if column.required %}<span class="tag">{{ nav.tr("column-flag-required") }}</span>{% endif %}
|
||||
{% if column.quantity_ledger %}<span class="tag">{{ nav.tr("column-flag-quantity-ledger") }}</span>{% endif %}
|
||||
{% if !column.currency.is_empty() %}<span class="tag">{{ column.currency }}, {{ column.money_mode.display_label(nav.locale) }}</span>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="danger"
|
||||
hx-post="/admin/tables/columns/builder{{ page.selection.query() }}"
|
||||
hx-include="#column-form" hx-target="#column-panel" hx-swap="innerHTML"
|
||||
hx-vals='{"action": "remove-column", "index": "{{ loop.index0 }}"}'>Remove</button>
|
||||
hx-vals='{"action": "remove-column", "index": "{{ loop.index0 }}"}'>{{ nav.tr("common-remove") }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -216,5 +216,5 @@
|
||||
{% endfor %}
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit">Add {{ page.columns.added.len() }} column(s) to the table</button>
|
||||
<button type="submit">{{ nav.tr_count("td-add-columns-button", "count", page.columns.added.len() as i64) }}</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user