Translate the whole site to English: English routes with 301 redirects from the Dutch paths, English UI, docs, seeds and captions, one-time live content migration
This commit is contained in:
@@ -3,22 +3,22 @@
|
||||
{% block docs_content %}
|
||||
<h1>API: {{ group.title }}</h1>
|
||||
<p>{{ group.description }}</p>
|
||||
<p class="muted">Elke HTML-route geeft JSON terug met <code>Accept: application/json</code>. Authenticatie: sessiecookie, <code>X-API-KEY</code>, <code>Authorization: Bearer</code> of <code>Basic</code>.</p>
|
||||
<p class="muted">Every HTML route returns JSON with <code>Accept: application/json</code>. Authentication: session cookie, <code>X-API-KEY</code>, <code>Authorization: Bearer</code> or <code>Basic</code>.</p>
|
||||
{% for item in endpoints %}
|
||||
<section class="endpoint" data-endpoint data-method="{{ item.method }}" data-path="{{ item.path }}" data-auth="{{ item.auth }}" data-negotiation="{{ item.negotiation }}" data-destructive="{{ '1' if item.destructive else '0' }}">
|
||||
<div class="signature"><span class="method">{{ item.method }}</span><code>{{ item.path }}</code><span class="auth">{{ item.min_role }}</span></div>
|
||||
<strong>{{ item.title }}</strong>
|
||||
{% if item.description %}<p>{{ item.description }}</p>{% endif %}
|
||||
{% if item.fields %}
|
||||
<table class="admin-table"><thead><tr><th>Veld</th><th>Type</th><th>Plek</th><th>Verplicht</th></tr></thead><tbody>
|
||||
{% for f in item.fields %}<tr><td><code>{{ f.name }}</code>{% if f.enum %}<div class="allowed">Toegestaan: {{ f.enum | join(', ') }}</div>{% endif %}</td><td>{{ f.type }}</td><td>{{ f.location }}</td><td>{{ 'ja' if f.required else 'nee' }}</td></tr>{% endfor %}
|
||||
<table class="admin-table"><thead><tr><th>Field</th><th>Type</th><th>Location</th><th>Required</th></tr></thead><tbody>
|
||||
{% for f in item.fields %}<tr><td><code>{{ f.name }}</code>{% if f.enum %}<div class="allowed">Allowed: {{ f.enum | join(', ') }}</div>{% endif %}</td><td>{{ f.type }}</td><td>{{ f.location }}</td><td>{{ 'yes' if f.required else 'no' }}</td></tr>{% endfor %}
|
||||
</tbody></table>
|
||||
{% endif %}
|
||||
<div class="tabs" data-tabs>
|
||||
<button type="button" class="active" data-tab="curl">cURL</button>
|
||||
<button type="button" data-tab="js">JS</button>
|
||||
<button type="button" data-tab="python">Python</button>
|
||||
<button type="button" data-tab="expected">Verwacht</button>
|
||||
<button type="button" data-tab="expected">Expected</button>
|
||||
{% if item.interactive %}<button type="button" data-tab="live">Live</button>{% endif %}
|
||||
</div>
|
||||
<pre data-panel="curl">{{ item.curl }}</pre>
|
||||
@@ -26,7 +26,7 @@
|
||||
console.log(await response.json());</pre>
|
||||
<pre data-panel="python" hidden>import httpx
|
||||
print(httpx.request("{{ item.method }}", BASE + "{{ item.path }}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())</pre>
|
||||
<pre data-panel="expected" hidden>{{ item.sample | tojson(indent=2) if item.sample is not none else 'Geen voorbeeld' }}</pre>
|
||||
<pre data-panel="expected" hidden>{{ item.sample | tojson(indent=2) if item.sample is not none else 'No example' }}</pre>
|
||||
{% if item.interactive %}
|
||||
<div data-panel="live" hidden class="tester">
|
||||
{% for f in item.fields %}
|
||||
@@ -35,8 +35,8 @@ print(httpx.request("{{ item.method }}", BASE + "{{ item.path }}", headers={"Acc
|
||||
{% else %}<input type="text" data-param="{{ f.name }}" data-location="{{ f.location }}" value="{{ f.example or '' }}">{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="actions"><button class="button small" type="button" data-send {% if item.auth != 'public' and not viewer %}disabled title="Log in om te versturen"{% endif %}>Verstuur</button></div>
|
||||
<pre data-response>Nog niet verstuurd.</pre>
|
||||
<div class="actions"><button class="button small" type="button" data-send {% if item.auth != 'public' and not viewer %}disabled title="Log in to send"{% endif %}>Send</button></div>
|
||||
<pre data-response>Not sent yet.</pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
@@ -45,7 +45,7 @@ print(httpx.request("{{ item.method }}", BASE + "{{ item.path }}", headers={"Acc
|
||||
<h2>Live services</h2>
|
||||
{% for service in services %}
|
||||
<section class="endpoint"><strong>{{ service.title }}</strong> <code>{{ service.name }}</code><p>{{ service.description }}</p>
|
||||
<p class="muted">Velden: {% for f in service.fields %}<code>{{ f.key }}</code> ({{ f.type }}){% if not loop.last %}, {% endif %}{% endfor %}</p></section>
|
||||
<p class="muted">Fields: {% for f in service.fields %}<code>{{ f.key }}</code> ({{ f.type }}){% if not loop.last %}, {% endif %}{% endfor %}</p></section>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user