i18n on the web - deepseek translations
This commit is contained in:
@@ -1,22 +1,18 @@
|
||||
{# GET /admin/ecb — crate::pages::admin::ecb::ui::EcbPage #}
|
||||
{% extends "ui/base.html" %}
|
||||
|
||||
{% block title %}Exchange rates{% endblock %}
|
||||
{% block title %}{{ nav.tr("ecb-title") }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<section class="heading">
|
||||
<div>
|
||||
<p class="eyebrow">Exchange rates</p>
|
||||
<h1>ECB reference rates</h1>
|
||||
<p>
|
||||
The importer fetches the ECB's published rates once a day and records every
|
||||
attempt. Conversions read only what it has verified, so coverage is what decides
|
||||
whether a foreign-currency amount can be posted at all.
|
||||
</p>
|
||||
<p class="eyebrow">{{ nav.tr("ecb-title") }}</p>
|
||||
<h1>{{ nav.tr("ecb-heading") }}</h1>
|
||||
<p>{{ nav.tr("ecb-description") }}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a href="/admin">← Admin panel</a>
|
||||
<a href="/admin">{{ nav.tr("ui-back-to-admin-panel") }}</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -24,23 +20,19 @@
|
||||
|
||||
<section class="panel">
|
||||
<h2>
|
||||
Import attempts <span class="count">{{ page.batches.len() }}</span>
|
||||
{%- if page.failure_count() > 0 %}<span class="tag tag-bad">{{ page.failure_count() }} failed</span>{% endif -%}
|
||||
{{ nav.tr("ecb-import-attempts") }} <span class="count">{{ page.batches.len() }}</span>
|
||||
{%- if page.failure_count() > 0 %}<span class="tag tag-bad">{{ page.failed_count_label() }}</span>{% endif -%}
|
||||
</h2>
|
||||
{% if page.batches.is_empty() %}
|
||||
<p class="hint">
|
||||
The importer has not recorded an attempt. It runs on startup and then daily, so
|
||||
an empty log means the server has not completed a run since this table was
|
||||
created.
|
||||
</p>
|
||||
<p class="hint">{{ nav.tr("ecb-no-attempts-hint") }}</p>
|
||||
{% else %}
|
||||
<div class="table-scroll">
|
||||
<table class="builder-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="mark">#</th><th>Result</th><th>Started</th><th>Finished</th>
|
||||
<th>Took</th><th>Window</th><th class="numeric">Observations</th>
|
||||
<th>Verified through</th>
|
||||
<th class="mark">#</th><th>{{ nav.tr("ecb-th-result") }}</th><th>{{ nav.tr("ecb-th-started") }}</th><th>{{ nav.tr("ecb-th-finished") }}</th>
|
||||
<th>{{ nav.tr("ecb-th-took") }}</th><th>{{ nav.tr("ecb-th-window") }}</th><th class="numeric">{{ nav.tr("ecb-th-observations") }}</th>
|
||||
<th>{{ nav.tr("ecb-th-verified-through") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -48,24 +40,24 @@
|
||||
<tr{% if batch.failed() %} class="attempt-failed"{% endif %}>
|
||||
<td class="mark">{{ batch.batch_id }}</td>
|
||||
<td>
|
||||
{%- if batch.succeeded() %}<span class="tag tag-ok">succeeded</span>
|
||||
{%- else if batch.running() %}<span class="tag">running</span>
|
||||
{%- else %}<span class="tag tag-bad">failed</span>{% endif -%}
|
||||
{%- if batch.succeeded() %}<span class="tag tag-ok">{{ nav.tr("ecb-batch-succeeded") }}</span>
|
||||
{%- else if batch.running() %}<span class="tag">{{ nav.tr("ecb-batch-running") }}</span>
|
||||
{%- else %}<span class="tag tag-bad">{{ nav.tr("ecb-batch-failed") }}</span>{% endif -%}
|
||||
</td>
|
||||
<td class="moment">{{ batch.started() }}</td>
|
||||
<td class="moment">
|
||||
{%- if let Some(finished) = batch.finished() %}{{ finished }}
|
||||
{%- else %}<span class="hint">still running</span>{% endif -%}
|
||||
{%- else %}<span class="hint">{{ nav.tr("ecb-still-running") }}</span>{% endif -%}
|
||||
</td>
|
||||
<td class="numeric">
|
||||
{%- if let Some(took) = batch.took() %}{{ took }}
|
||||
{%- if let Some(took) = batch.took(nav.locale) %}{{ took }}
|
||||
{%- else %}<span class="hint">—</span>{% endif -%}
|
||||
</td>
|
||||
<td>
|
||||
{{ batch.window() }}
|
||||
<div class="hint endpoint" title="{{ batch.endpoint }}"><code>{{ batch.endpoint }}</code></div>
|
||||
</td>
|
||||
<td class="numeric">{{ batch.observations() }}</td>
|
||||
<td class="numeric">{{ batch.observations(nav.locale) }}</td>
|
||||
<td class="moment">
|
||||
{%- if let Some(date) = batch.verified_through_date %}{{ date }}
|
||||
{%- else %}<span class="hint">—</span>{% endif -%}
|
||||
@@ -81,11 +73,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="hint">
|
||||
Attempts are an audit record: they cannot be edited or deleted, and a batch that
|
||||
re-fetched a day an earlier one already owned inserts nothing, which is why the
|
||||
new count can be lower than the total.
|
||||
</p>
|
||||
<p class="hint">{{ nav.tr("ecb-audit-hint") }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
id="ecb-status">
|
||||
<h2>
|
||||
{{ page.headline() }}
|
||||
{% if page.import_running %}<span class="tag">import running</span>{% endif %}
|
||||
{% if page.import_running %}<span class="tag">{{ nav.tr("ecb-import-running") }}</span>{% endif %}
|
||||
</h2>
|
||||
<p class="hint">{{ page.explanation() }}</p>
|
||||
|
||||
@@ -21,28 +21,24 @@
|
||||
rule the backend applies -- so the backend applies it and sends both
|
||||
bounds, rather than the page inviting the reader to do it in their head. #}
|
||||
<div class="postable">
|
||||
<p class="postable-lead">What can be posted right now</p>
|
||||
<p class="postable-lead">{{ nav.tr("ecb-postable-lead") }}</p>
|
||||
{% if let Some(through) = page.transactions_postable_through %}
|
||||
<dl class="postable-grid">
|
||||
<div>
|
||||
<dt>Ordinary transactions</dt>
|
||||
<dd>dated up to and including <strong>{{ through }}</strong></dd>
|
||||
<dd class="hint">Converted at the rate published the business day before the transaction.</dd>
|
||||
<dt>{{ nav.tr("ecb-ordinary-transactions") }}</dt>
|
||||
<dd>{{ nav.tr("ecb-dated-up-to") }} <strong>{{ through }}</strong></dd>
|
||||
<dd class="hint">{{ nav.tr("ecb-ordinary-rate-hint") }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Statements & decisive dates</dt>
|
||||
<dd>dated up to and including <strong>{{ page.statements_postable_through.as_deref().unwrap_or("—") }}</strong></dd>
|
||||
<dd class="hint">Converted at the rate published on that day, or the last business day before it.</dd>
|
||||
<dt>{{ nav.tr("ecb-statements-title") }}</dt>
|
||||
<dd>{{ nav.tr("ecb-dated-up-to") }} <strong>{{ page.statements_postable_through.as_deref().unwrap_or("—") }}</strong></dd>
|
||||
<dd class="hint">{{ nav.tr("ecb-statements-rate-hint") }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<p class="hint">
|
||||
A foreign-currency amount dated after its limit is refused outright until the
|
||||
importer catches up — it is not converted at a stale rate.
|
||||
</p>
|
||||
<p class="hint">{{ nav.tr("ecb-postable-limit-hint") }}</p>
|
||||
{% else %}
|
||||
<p>
|
||||
<strong>Nothing.</strong> No publication has ever been verified, so every
|
||||
foreign-currency amount is refused whatever its date.
|
||||
<strong>{{ nav.tr("ecb-nothing") }}</strong> {{ nav.tr("ecb-no-publication-hint") }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -52,40 +48,40 @@
|
||||
them read as trivia. #}
|
||||
<div class="coverage">
|
||||
<div class="coverage-point">
|
||||
<span class="coverage-label">Verified through</span>
|
||||
<span class="coverage-label">{{ nav.tr("ecb-verified-through") }}</span>
|
||||
<span class="coverage-date">
|
||||
{%- if let Some(date) = page.verified_through_date %}{{ date }}
|
||||
{%- else %}never{% endif -%}
|
||||
{%- else %}{{ nav.tr("ecb-never") }}{% endif -%}
|
||||
</span>
|
||||
</div>
|
||||
<div class="coverage-gap">
|
||||
{%- if page.healthy %}<span class="tag tag-ok">up to date</span>
|
||||
{%- else if page.days_behind > 0 %}<span class="tag tag-bad">{{ page.days_behind }} publication day{% if page.days_behind != 1 %}s{% endif %} behind</span>
|
||||
{%- else %}<span class="tag tag-bad">no coverage</span>{% endif -%}
|
||||
{%- if page.healthy %}<span class="tag tag-ok">{{ nav.tr("ecb-up-to-date") }}</span>
|
||||
{%- else if page.days_behind > 0 %}<span class="tag tag-bad">{{ page.behind_label() }}</span>
|
||||
{%- else %}<span class="tag tag-bad">{{ nav.tr("ecb-no-coverage") }}</span>{% endif -%}
|
||||
</div>
|
||||
<div class="coverage-point">
|
||||
<span class="coverage-label">Should reach</span>
|
||||
<span class="coverage-label">{{ nav.tr("ecb-should-reach") }}</span>
|
||||
<span class="coverage-date">{{ page.latest_verifiable_date }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dl class="status-grid">
|
||||
<div>
|
||||
<dt>Last attempt</dt>
|
||||
<dd>{% if let Some(when) = page.last_attempt() %}{{ when }}{% else %}<span class="hint">none recorded</span>{% endif %}</dd>
|
||||
<dt>{{ nav.tr("ecb-last-attempt") }}</dt>
|
||||
<dd>{% if let Some(when) = page.last_attempt() %}{{ when }}{% else %}<span class="hint">{{ nav.tr("ecb-none-recorded") }}</span>{% endif %}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Last success</dt>
|
||||
<dd>{% if let Some(when) = page.last_success() %}{{ when }}{% else %}<span class="hint">none</span>{% endif %}</dd>
|
||||
<dt>{{ nav.tr("ecb-last-success") }}</dt>
|
||||
<dd>{% if let Some(when) = page.last_success() %}{{ when }}{% else %}<span class="hint">{{ nav.tr("ecb-none") }}</span>{% endif %}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Next import</dt>
|
||||
<dt>{{ nav.tr("ecb-next-import") }}</dt>
|
||||
<dd>{{ page.next_import() }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Currencies on {% if let Some(date) = page.verified_through_date %}{{ date }}{% else %}the covered day{% endif %}</dt>
|
||||
<dt>{% if let Some(date) = page.verified_through_date %}{{ nav.tr_args("ecb-currencies-on", [("date", date.clone())]) }}{% else %}{{ nav.tr("ecb-the-covered-day") }}{% endif %}</dt>
|
||||
<dd>
|
||||
{%- if page.covered_currencies.is_empty() %}<span class="hint">none</span>
|
||||
{%- if page.covered_currencies.is_empty() %}<span class="hint">{{ nav.tr("ecb-none") }}</span>
|
||||
{%- else %}{{ page.covered_currencies.len() }}{% endif -%}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -99,8 +95,8 @@
|
||||
|
||||
{% if let Some(failure) = page.last_failure() %}
|
||||
<p class="hint failure-note">
|
||||
Most recent failure — batch {{ failure.batch_id }}, started {{ failure.started() }}:
|
||||
{% if let Some(message) = failure.error_message %}{{ message }}{% else %}no reason was recorded.{% endif %}
|
||||
{{ nav.tr_args("ecb-most-recent-failure", [("batch", failure.batch_id.to_string()), ("started", failure.started())]) }}
|
||||
{% if let Some(message) = failure.error_message %}{{ message }}{% else %}{{ nav.tr("ecb-no-reason-recorded") }}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user