fix localisation on user page

This commit is contained in:
Riley L. 2025-05-01 22:02:39 +02:00
parent e5b5022b48
commit bc069cecc4
3 changed files with 15 additions and 12 deletions

View file

@ -490,29 +490,31 @@ local function r_user(username)
print(format([[ print(format([[
<form class="transaction box backgroundbox {disable_class}" action="" method="POST"> <form class="transaction box backgroundbox {disable_class}" action="" method="POST">
<h3>{+user.form.transfer}</h3> <h3>{+user.form.transfer}</h3>
<label for="user_dst">Destination: </label> <label for="user_dst">{+field.destination}: </label>
<select name="user_dst">]], { <select name="user_dst">]], {
username = username, username = username,
})) }))
local users = get_active_users(); local users = get_active_users();
for _, u in ipairs(users) do for _, u in ipairs(users) do
if u.name ~= username then
print(format("<option value={!name}>{name}</option>", { name = u.name })) print(format("<option value={!name}>{name}</option>", { name = u.name }))
end end
end
print(format([[ print(format([[
</select> </select>
<input type="text" name="user_src" value="{!username}" hidden /> <input type="text" name="user_src" value="{!username}" hidden />
<label for="amount">Amount (ct): </label> <label for="amount">{+field.amount}: </label>
<input type="number" name="amount" id="amount" /> <input type="number" name="amount" id="amount" />
<label for="comment">Comment: </label> <label for="comment">{+field.comment}: </label>
<input type="text" name="comment" id="comment" /> <input type="text" name="comment" id="comment" />
<input type="submit" value="{+user.form.transfer.submit}" class="amount-ntr button" /> <input type="submit" value="{+user.form.transfer.submit}" class="amount-ntr button" />
</form> </form>
<form class="transaction box backgroundbox {disable_class}" action="" method="POST"> <form class="transaction box backgroundbox {disable_class}" action="" method="POST">
<h3>{+user.form.transaction}</h3> <h3>{+user.form.transaction}</h3>
<input type="text" name="user_dst" value="{!username}" hidden /> <input type="text" name="user_dst" value="{!username}" hidden />
<label for="amount">Amount (ct): </label> <label for="amount">{+field.amount}: </label>
<input type="number" name="amount" id="amount" /> <input type="number" name="amount" id="amount" />
<label for="comment">Comment: </label> <label for="comment">{+field.comment}: </label>
<input type="text" name="comment" id="comment" /> <input type="text" name="comment" id="comment" />
<input type="submit" value="{+user.form.transaction.submit}" class="amount-ntr button" /> <input type="submit" value="{+user.form.transaction.submit}" class="amount-ntr button" />
</form> </form>
@ -520,7 +522,7 @@ local function r_user(username)
<h3>{+user.form.buy}</h3> <h3>{+user.form.buy}</h3>
<input type="text" name="user_dst" value="{!username}" hidden /> <input type="text" name="user_dst" value="{!username}" hidden />
<input type="text" name="negate_pcount" value="1" hidden /> <input type="text" name="negate_pcount" value="1" hidden />
<label for="pcount">Count: </label> <label for="pcount">{+field.count}: </label>
<input type="number" name="pcount" id="pcount" value="1" /> <input type="number" name="pcount" id="pcount" value="1" />
<label for="pcode">{+field.barcode}: </label> <label for="pcode">{+field.barcode}: </label>
<input type="text" name="pcode" id="pcode" /> <input type="text" name="pcode" id="pcode" />

View file

@ -1,6 +1,7 @@
[abrechenbarkeit] [abrechenbarkeit]
appname=Abrechenbarkeit appname=Abrechenbarkeit
about=Über about=Über
field.destination=Ziel
field.amount=Menge field.amount=Menge
field.barcode=Barcode field.barcode=Barcode
field.comment=Kommentar field.comment=Kommentar
@ -29,12 +30,12 @@ time.second=Sekunde
time.seconds=Sekunden time.seconds=Sekunden
user.balance=Kontostand user.balance=Kontostand
user.form.buy.submit=Kaufen user.form.buy.submit=Kaufen
user.form.buy=Produkt Kaufen user.form.buy=Produkt kaufen
user.form.restock.submit=Wiederauffüllen user.form.restock.submit=Wiederauffüllen
user.form.restock=Produkt wiederauffüllen user.form.restock=Produkt wiederauffüllen
user.form.transaction.submit=Aktualisieren user.form.transaction.submit=Aktualisieren
user.form.transaction=Transaktion erstellen user.form.transaction=Transaktion erstellen
user.form.transfer=Geld Überweisen user.form.transfer=Geld überweisen
user.form.transfer.submit=Senden user.form.transfer.submit=Senden
user.last_txn=Letzte Transaktion {time}. user.last_txn=Letzte Transaktion {time}.
user.view_log=Benutzerprotokoll einsehen user.view_log=Benutzerprotokoll einsehen

View file

@ -6,11 +6,11 @@ about.thanks=Thanks for choosing Abrechenbarkeit.
about.title=About Abrechenbarkeit about.title=About Abrechenbarkeit
about=About about=About
appname=Abrechenbarkeit appname=Abrechenbarkeit
field.amount=Amount field.destination=Destination
field.barcode=Barcode field.amount=Amount (ct)
field.comment=Comment field.comment=Comment
field.count=Count field.count=Count
field.name=Name field.barcode=Barcode
field.price=Price field.price=Price
field.time=Time field.time=Time
field.upstream_price=Upstream Price field.upstream_price=Upstream Price