i18n on the web - deepseek translations
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
Add-table builder posts, and both are decoded by the same code.
|
||||
#}
|
||||
<section class="panel">
|
||||
<h2>Add columns to <code>{{ page.selection.table }}</code></h2>
|
||||
<p class="hint">Columns are appended. Nothing that already exists is changed, and the new columns can be indexed as they are added.</p>
|
||||
<h2>{{ nav.tr("td-add-columns-to") }} <code>{{ page.selection.table }}</code></h2>
|
||||
<p class="hint">{{ nav.tr("td-append-hint") }}</p>
|
||||
<form id="column-form"
|
||||
hx-post="/admin/tables/columns{{ page.selection.query() }}"
|
||||
hx-target="#table-panel" hx-swap="innerHTML"
|
||||
@@ -26,27 +26,27 @@
|
||||
|
||||
{% if let Some(detail) = page.detail %}
|
||||
<section class="panel">
|
||||
<h2>Rename a column</h2>
|
||||
<p class="hint">Renames what the column is called, not the physical column underneath, so stored data and scripts are untouched. Only possible while the table has no rows.</p>
|
||||
<h2>{{ nav.tr("td-rename-column") }}</h2>
|
||||
<p class="hint">{{ nav.tr("td-rename-hint") }}</p>
|
||||
<form hx-post="/admin/tables/rename"
|
||||
hx-target="#table-panel" hx-swap="innerHTML">
|
||||
<input type="hidden" name="profile" value="{{ page.selection.profile }}">
|
||||
<input type="hidden" name="table" value="{{ page.selection.table }}">
|
||||
<div class="form-grid">
|
||||
<label>Column
|
||||
<label>{{ nav.tr("td-column-label") }}
|
||||
<select name="old_column_name">
|
||||
<option value="">Choose a column</option>
|
||||
<option value="">{{ nav.tr("td-choose-column") }}</option>
|
||||
{% for column in detail.renameable_columns() %}
|
||||
<option value="{{ column.name }}" {% if page.rename.old_column_name == column.name %}selected{% endif %}>{{ column.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>New name
|
||||
<label>{{ nav.tr("td-new-name") }}
|
||||
<input name="new_column_name" value="{{ page.rename.new_column_name }}" placeholder="invoice_number">
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit">Rename column</button>
|
||||
<button type="submit">{{ nav.tr("td-rename-button") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -55,16 +55,16 @@
|
||||
|
||||
{% if let Some(detail) = page.detail %}
|
||||
<section class="panel">
|
||||
<h2>Columns it has now <span class="count">{{ detail.columns.len() }}</span></h2>
|
||||
<h2>{{ nav.tr("td-columns-now") }} <span class="count">{{ detail.columns.len() }}</span></h2>
|
||||
<table class="builder-table">
|
||||
<thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead>
|
||||
<thead><tr><th>{{ nav.tr("td-col-column") }}</th><th>{{ nav.tr("td-col-type") }}</th><th>{{ nav.tr("td-col-notes") }}</th></tr></thead>
|
||||
<tbody>
|
||||
{% for column in detail.columns %}
|
||||
<tr>
|
||||
<td><code>{{ column.name }}</code></td>
|
||||
<td>{{ column.field_type }}{% if !column.sql_type.is_empty() %} <small class="hint">{{ column.sql_type }}</small>{% endif %}</td>
|
||||
<td>
|
||||
{%- for flag in column.flags() %}<span class="tag">{{ flag }}</span>{% endfor -%}
|
||||
{%- for flag in column.flags(nav.locale) %}<span class="tag">{{ flag }}</span>{% endfor -%}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -72,9 +72,9 @@
|
||||
</table>
|
||||
|
||||
{% if !detail.scripts.is_empty() %}
|
||||
<h3 class="panel-subhead">Scripts</h3>
|
||||
<h3 class="panel-subhead">{{ nav.tr("td-scripts") }}</h3>
|
||||
<table class="builder-table">
|
||||
<thead><tr><th>Target column</th><th>Type</th><th>Description</th></tr></thead>
|
||||
<thead><tr><th>{{ nav.tr("td-col-target-column") }}</th><th>{{ nav.tr("td-col-type") }}</th><th>{{ nav.tr("td-col-description") }}</th></tr></thead>
|
||||
<tbody>
|
||||
{% for script in detail.scripts %}
|
||||
<tr>
|
||||
@@ -82,7 +82,7 @@
|
||||
<td>{{ script.target_column_type }}</td>
|
||||
<td>
|
||||
{{ script.description }}
|
||||
<details><summary>source</summary><pre class="sql-preview">{{ script.script }}</pre></details>
|
||||
<details><summary>{{ nav.tr("td-source") }}</summary><pre class="sql-preview">{{ script.script }}</pre></details>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user