Add locales

This commit is contained in:
gabatxo1312
2026-01-30 18:23:54 +01:00
parent 577170bfdd
commit 362beac856
22 changed files with 519 additions and 103 deletions
+8 -8
View File
@@ -3,22 +3,22 @@
{% import "components/cards.html" as cards %}
{% block main %}
{{ typography::heading("Editer") }}
{{ typography::heading(t!("book.edit.title")) }}
{% call cards::card() %}
<form method="post" action="/books/{{ book.id }}">
<div class="mb-3">
<label class="form-label" for="title">Name</label>
<label class="form-label" for="title">{{ t!("book.attributes.title") }}</label>
<input type="text" name="title" class="form-control" value="{{ book.title }}" required>
</div>
<div class="mb-3">
<label for="authors" class="form-label">Author(s)</label>
<label for="authors" class="form-label">{{ t!("book.attributes.authors") }}</label>
<input type="text" name="authors" class="form-control" value="{{ book.authors }}" required>
</div>
<div class="mb-3">
<label for="owner_id" class="form-label">Owner</label>
<label for="owner_id" class="form-label">{{ t!("book.attributes.owner") }}</label>
<select name="owner_id" class="form-control" required>
{% for user in users %}
{% if book.owner_id == user.id %}
@@ -31,7 +31,7 @@
</div>
<div class="mb-3">
<label for="current_holder_id" class="form-label">Current Holder</label>
<label for="current_holder_id" class="form-label">{{ t!("book.attributes.current_holder") }}</label>
<select class="form-control" name="current_holder_id">
<option></option>
{% match book.current_holder_id %}
@@ -52,7 +52,7 @@
</div>
<div class="mb-3">
<label for="description" class="form-label">Description</label>
<label for="description" class="form-label">{{ t!("book.attributes.description") }}</label>
{% match book.description %}
{% when Some with (description) %}
<textarea name="description" class="form-control">{{ description }}</textarea>
@@ -62,7 +62,7 @@
</div>
<div class="mb-3">
<label class="form-label" for="comment">Comment</label>
<label class="form-label" for="comment">{{ t!("book.attributes.comment") }}</label>
{% match book.comment %}
{% when Some with (comment) %}
<textarea name="comment" class="form-control">{{ comment }}</textarea>
@@ -72,7 +72,7 @@
</div>
<div class="mt-4 text-center">
<input type="submit" value="Edit book" class="btn btn-success">
<input type="submit" value='{{ t!("book.edit.button") }}' class="btn btn-success">
</div>
</form>
{% endcall %}