translate to swedish

This commit is contained in:
Linus Miller 2025-12-23 23:45:27 +01:00
parent 8a028d2719
commit a11026972b
14 changed files with 75 additions and 80 deletions

View File

@ -11,14 +11,14 @@ const AccountsPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Accounts</title>
<title> : Konton</title>
</Head>
<h1>Accounts</h1>
<h1>Konton</h1>
<table className='grid'>
<thead>
<th>Number</th>
<th>Description</th>
<th>Nummer</th>
<th>Beskrivning</th>
</thead>
<tbody>
{accounts.map((account) => (

View File

@ -20,16 +20,16 @@ const BalancesPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Balances</title>
<title> : Balanser</title>
</Head>
<h1>Balances</h1>
<h1>Balanser</h1>
{years.length && balances.length && (
<table className={cn('grid', s.table)}>
<thead>
<tr>
<th>Account</th>
<th>Description</th>
<th>Konto</th>
<th>Beskrivning</th>
{years.map((year) => (
<th>{year}</th>
))}

View File

@ -43,9 +43,9 @@ const EntriesPage: FunctionComponent = () => {
return financialYears.length && journals.length ? (
<section>
<Head>
<title> : Entries</title>
<title> : Verifikat</title>
</Head>
<h1>Entries</h1>
<h1>Verifikat</h1>
<form onSubmit={onSubmit}>
<select defaultValue='D' name='journal'>
@ -60,7 +60,7 @@ const EntriesPage: FunctionComponent = () => {
<option value={financialYear.year}>{financialYear.year}</option>
))}
</select>
<button>Search</button>
<button>Sök</button>
</form>
<h2>
@ -70,11 +70,11 @@ const EntriesPage: FunctionComponent = () => {
<thead>
<tr>
<th>ID</th>
<th>Number</th>
<th>Entry Date</th>
<th>Transaction Date</th>
<th>Amount</th>
<th>Description</th>
<th>Nummer</th>
<th>Bokföringsdatum</th>
<th>Transaktionsdatum</th>
<th>Belopp</th>
<th>Beskrivning</th>
</tr>
</thead>
<tbody>

View File

@ -17,11 +17,11 @@ const EntryPage: FunctionComponent = () => {
<Head>
<title>
{' '}
: Entry {entry.journal} {entry.number}{' '}
: Verifikat {entry.journal} {entry.number}{' '}
</title>
</Head>
<h1>
Entry {entry.journal} {entry.number}
Verifikat {entry.journal} {entry.number}
</h1>
<table className='grid'>
@ -29,11 +29,11 @@ const EntryPage: FunctionComponent = () => {
<tr>
<th>ID</th>
<th>Journal</th>
<th>Number</th>
<th>Entry Date</th>
<th>Transaction Date</th>
<th>Amount</th>
<th>Description</th>
<th>Nummer</th>
<th>Bokföringsdatum</th>
<th>Transaktionsdatum</th>
<th>Belopp</th>
<th>Beskrivning</th>
</tr>
</thead>
<tbody>
@ -51,14 +51,14 @@ const EntryPage: FunctionComponent = () => {
</tbody>
</table>
<h2>Transactions</h2>
<h2>Transaktioner</h2>
<table className='grid'>
<thead>
<tr>
<th>Account</th>
<th>Konto</th>
<th>Debit</th>
<th>Credit</th>
<th>Description</th>
<th>Kredit</th>
<th>Beskrivning</th>
</tr>
</thead>
<tbody>

View File

@ -7,10 +7,11 @@ import { formatNumber } from '../utils/format_number.ts'
import Head from './head.ts'
const InvoicePage: FunctionComponent = () => {
const route = useRoute()
const invoice = usePromise<Invoice & { files?: File[]; transactions?: Transaction[] }>(() =>
rek(`/api/invoices/${route.params.id}`),
)
const route = useRoute()
return (
<section>
@ -20,12 +21,6 @@ const InvoicePage: FunctionComponent = () => {
<h1>Invoice</h1>
<table>
<thead>
<tr>
<th>what</th>
<th>who</th>
</tr>
</thead>
{invoice && (
<tbody>
<tr>

View File

@ -28,10 +28,10 @@ const InvoicesPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Invoices : {supplier?.name}</title>
<title> : Fakturor : {supplier?.name}</title>
</Head>
<h1>Invoices for {supplier?.name}</h1>
<h1>Fakturor från {supplier?.name}</h1>
<p>
<strong>Total: {formatPrice(totalAmount)}</strong>
@ -43,11 +43,11 @@ const InvoicesPage: FunctionComponent = () => {
<th>ID</th>
<th>Fisken</th>
<th>PHM</th>
<th>Invoice Date</th>
<th>Due Date</th>
<th>Number</th>
<th>Amount</th>
<th>Files</th>
<th>Fakturadatum</th>
<th>Förfallodag</th>
<th>Nummer</th>
<th>Belopp</th>
<th>Filer</th>
</tr>
</thead>
<tbody>

View File

@ -11,10 +11,10 @@ const InvoicesPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Invoices</title>
<title> : Fakturor</title>
</Head>
<h1>Invoices</h1>
<h1>Fakturor</h1>
<ul>
{suppliers?.map((supplier) => (
<li>

View File

@ -20,10 +20,10 @@ const ObjectComponent: FunctionComponent<ObjectComponentProps> = ({ objectId })
<table className='grid'>
<thead>
<tr>
<th>Entry</th>
<th>Date</th>
<th>Account</th>
<th>Amount</th>
<th>Verifikat</th>
<th>Datum</th>
<th>Konto</th>
<th>Belopp</th>
</tr>
</thead>
<tbody>

View File

@ -15,10 +15,10 @@ const ObjectsPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Objects</title>
<title> : Objekt</title>
</Head>
<h1>Objects</h1>
<h1>Objekt</h1>
<div className={s.objects}>
{objects.map((object) => (
<button onClick={() => setCurrentObject(object)}>

View File

@ -19,16 +19,16 @@ const ResultsPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Results</title>
<title> : Resultat</title>
</Head>
<h1>Results</h1>
<h1>Resultat</h1>
{years.length && results.length && (
<table className={cn('grid', s.table)}>
<thead>
<tr>
<th>Account</th>
<th>Description</th>
<th>Konto</th>
<th>Beskrivning</th>
{years.map((year) => (
<th>{year}</th>
))}

View File

@ -2,9 +2,9 @@ import { h, type FunctionComponent } from 'preact'
const StartPage: FunctionComponent = () => (
<section>
<h1>Fart Page</h1>
<h1>Start</h1>
<p>Haha oh my, fart page.</p>
<p>Kommer vettigare info här snart.</p>
</section>
)

View File

@ -41,7 +41,7 @@ const TransactionsPage: FunctionComponent = () => {
return (
<section>
<Head>
<title> : Transactions</title>
<title> : Transaktioner</title>
</Head>
<form onSubmit={onSubmit}>
@ -51,21 +51,21 @@ const TransactionsPage: FunctionComponent = () => {
))}
</select>
<input type='text' name='accountNumber' defaultValue={location.query.accountNumber || ''} />
<button>Search</button>
<button>Sök</button>
</form>
<h1>Transactions</h1>
<h1>Transaktioner</h1>
<div>
<table className='grid'>
<thead>
<th>Date</th>
<th>Account</th>
<th>Datum</th>
<th>Konto</th>
<th>Debit</th>
<th>Credit</th>
<th>Description</th>
<th>Entry</th>
<th>Entry Description</th>
<th>Invoice</th>
<th>Kredit</th>
<th>Beskrivning</th>
<th>Verifikat</th>
<th>Verifikat beskrivning</th>
<th>Faktura</th>
</thead>
<tbody>
{transactions.map((transaction) => (

View File

@ -20,64 +20,64 @@ export default [
{
path: '/accounts',
name: 'accounts',
title: 'Accounts',
title: 'Konton',
component: Accounts,
},
{
path: '/entries',
name: 'entries',
title: 'Entries',
title: 'Verifikat',
component: Entries,
},
{
path: '/entries/:id',
name: 'entry',
title: 'Entry',
name: 'entries-id',
title: 'Verifikat :id',
component: Entry,
nav: false,
},
{
path: '/objects',
name: 'objects',
title: 'Objects',
title: 'Objekt',
component: Objects,
},
{
path: '/invoices',
path: 'invoices',
name: 'invoices',
title: 'Invoices',
title: 'Fakturor',
component: Invoices,
},
{
path: '/invoices/:id',
name: 'invoice',
title: 'Invoice',
name: 'invoices-id',
title: 'Faktura :id',
component: Invoice,
nav: false,
},
{
path: '/invoices/by-supplier/:supplier',
name: 'invoices',
title: 'Invoices',
name: 'invoices-by-supplier',
title: 'Fakturor från leverantör',
component: InvoicesBySupplier,
nav: false,
},
{
path: '/balances',
name: 'balances',
title: 'Balances',
title: 'Balanser',
component: Balances,
},
{
path: '/results',
name: 'results',
title: 'Results',
title: 'Resultat',
component: Results,
},
{
path: '/transactions',
name: 'transactions',
title: 'Transactions',
title: 'Transaktioner',
component: Transactions,
},
]

View File

@ -98,7 +98,7 @@ const invoiceRoutes: FastifyPluginCallbackZod = (fastify, _, done) => {
),
])
.where('i.id', '=', request.params.id)
.execute()
.executeTakeFirst()
},
})