reuse field translations

This commit is contained in:
metamuffin 2024-11-06 18:31:21 +01:00
parent 2fe75952b8
commit 51bc73ae4d
No known key found for this signature in database
GPG key ID: 718F9749DCDBD654
2 changed files with 22 additions and 20 deletions

View file

@ -614,33 +614,33 @@ local function r_products()
<div class="container">
<form action="/?products" method="POST" class="box backgroundbox">
<h3>{+products.form.add}</h3>
<label for="name">{+products.form.name}: </label>
<label for="name">{+field.name}: </label>
<input type="text" name="name" id="name" />
<label for="price">{+products.form.price}: </label>
<label for="price">{+field.price}: </label>
<input type="number" name="price" id="price" />
<label for="user">{+products.form.user}: </label>
<label for="user">{+field.user}: </label>
<input type="text" name="user" id="user" />
<label for="barcode">{+products.form.barcode}: </label>
<label for="barcode">{+field.barcode}: </label>
<input type="text" name="barcode" id="barcode" />
<input type="submit" value="{+products.form.add.short}" class="amount-ntr button" />
<input type="submit" value="{+field.add.short}" class="amount-ntr button" />
</form>
<form action="/?products" method="POST" class="box backgroundbox">
<h3>{+products.form.remove}</h3>
<input type="text" name="delete" value="1" hidden />
<label for="barcode">{+products.form.barcode}: </label>
<label for="barcode">{+field.barcode}: </label>
<input type="text" name="barcode" id="barcode" />
<input type="submit" value="{+products.form.remove.short}" class="amount-ntr button" />
<input type="submit" value="{+field.remove.short}" class="amount-ntr button" />
</form>
</div>
]], {
currency = config.unit or "",
}))
print(format([[<table class="productlist"><tr>
<th>{+products.list.name}</th>
<th>{+products.list.price}</th>
<th>{+products.list.barcode}</th>
<th>{+products.list.count}</th>
<th>{+products.list.user}</th>
<th>{+field.name}</th>
<th>{+field.price}</th>
<th>{+field.barcode}</th>
<th>{+field.count}</th>
<th>{+field.user}</th>
</tr>]]))
local pbals = product_balances()
for barcode, price, user, name in read_products() do

View file

@ -1,6 +1,11 @@
[abrechenbarkeit]
appname=Abrechenbarkeit
about.desc=Abrechenbarkeit is a simple trust-based ledger for keeping track of money spent on product.
about.license=Abrechenbarkeit is free software. It is licensed exclusively GNU Affero General Public License Version 3 only.
about.source=The source code is published on {codeberg}Codeberg{ae}. This is also where {issues}issues with this software{ae} should be reported.
about.thanks=Thanks for choosing Abrechenbarkeit.
about.title=About Abrechenbarkeit
about=About
appname=Abrechenbarkeit
field.amount=Amount
field.barcode=Barcode
field.comment=Comment
@ -9,13 +14,9 @@ field.name=Name
field.price=Price
field.time=Time
field.upstream_price=Upstream Price
field.user=User
field.username=Username
index.form.create_user.submit=Continue
about.desc=Abrechenbarkeit is a simple trust-based ledger for keeping track of money spent on product.
about.title=About Abrechenbarkeit
about.license=Abrechenbarkeit is free software. It is licensed exclusively GNU Affero General Public License Version 3 only.
about.source=The source code is published on {codeberg}Codeberg{ae}. This is also where {issues}issues with this software{ae} should be reported.
about.thanks=Thanks for choosing Abrechenbarkeit.
index.form.create_user=User Creation
log.actions.revert=Revert
log.actions=Actions
@ -23,6 +24,7 @@ log=Log
products.form.add=Add Product
products.form.remove=Remove Product
products.form.title=Product List
products.title=Product List
products=Products
time.day=day
time.days=days
@ -39,8 +41,8 @@ user.form.buy=Buy Product
user.form.restock.submit=Restock
user.form.restock=Restock Product
user.form.transaction.submit=Update
user.form.transaction.success=Transaction successful
user.form.transaction=Create Transaction
user.last_txn=Last transaction added {time}.
user.view_log=View user log
user.lazy_creation=This user account does not exist yet. It will only be created after the first transaction.
user.form.transaction.success=Transaction successful
user.view_log=View user log