feat(i18n): the interface speaks both languages

The account has had a `locale` since the beginning and it only chose which grammar
quick add read a line with — so picking English changed nothing anybody could see,
and the field said so honestly: "Sprog i hurtig tilføjelse". It says "Sprog" now,
because it means it.

Every component goes through `t()`. Danish is the source: a key missing from
English falls through to Danish rather than to the key, because a Danish sentence
in an English screen can be read and `settings.notifications.title` cannot.

`tag()` is the single place `Intl` is asked. Before, `'da-DK'` was written into a
dozen components, and that is the half of a translation that gets left behind — an
English interface still saying "24. aug." is exactly the shape of a job half done.
There is a smoke test that switches to English and refuses to see a Danish month
name in the calendar's heading.

Colour and theme names are keys now. `colors.js` keeps its ids untouched — they
are what the database stores, and `internal/store` reads them out of that file —
but `name` is `'color.tomato'`, resolved where it is drawn.

The Inbox keeps its name. It is a project row the server creates at signup, not a
string in the interface, and it can be renamed like any other project.

Four copies of "3 hours ago" became one, in `web/src/lib/when.js`. They had
already drifted: one said "aldrig logget ind", another "aldrig", and two stopped
at days where the others carried on to a date.

Routes stay Danish. `/indstillinger`, `/projekt`, `/uddelegeret` are bookmarks and
they are in every smoke test; translating them buys nothing and costs both.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kristian Wind
2026-08-18 09:46:08 +02:00
co-authored by Claude Opus 5
parent e3c7fc792a
commit 4d8b70918b
30 changed files with 1657 additions and 566 deletions
+35 -27
View File
@@ -22,46 +22,54 @@ export class ApiError extends Error {
}
}
/** Danish messages for the codes the API can return. The server sends English
* prose for logs; what a person reads is decided here, where the locale is known. */
import { t } from './i18n.svelte.js';
/**
* The key for each code the API can return.
*
* Keys rather than sentences, because the server's own prose is English and
* written for a log — what a person reads is decided here, where the locale is
* known. `errorcodes_test.go` walks this table against the codes Go can emit, so
* a code the server gained and this did not fails the build rather than falling
* through to that log prose.
*/
const MESSAGES = {
unauthorized: 'Forkert e-mail eller adgangskode.',
totp_required: 'Indtast koden fra din authenticator.',
forbidden: 'Det har du ikke adgang til.',
not_found: 'Findes ikke.',
conflict: 'Det er der allerede.',
rate_limited: 'For mange forsøg. Vent et øjeblik.',
validation_failed: 'Tjek felterne herunder.',
payload_too_large: 'Det er for stort.',
internal_error: 'Noget gik galt. Prøv igen.',
bad_request: 'Anmodningen kunne ikke læses.',
unauthorized: 'error.unauthorized',
totp_required: 'error.totpRequired',
forbidden: 'error.forbidden',
not_found: 'error.notFound',
conflict: 'error.conflict',
rate_limited: 'error.rateLimited',
validation_failed: 'error.validation',
payload_too_large: 'error.tooLarge',
internal_error: 'error.internal',
bad_request: 'error.badRequest',
// Client-only: a network failure is not an HTTP status, so the server has no
// code for it.
offline: 'Ingen forbindelse til serveren.',
offline: 'error.offline',
// Situations that used to arrive as a plain `conflict` and were therefore
// shown as "Det er der allerede." — which was not merely vague but wrong. An
// shown as "that already exists" — which was not merely vague but wrong. An
// unconfigured Gmail is not a Gmail that is already connected.
gmail_not_configured:
'Gmail er ikke sat op på denne server. Administratoren skal registrere en OAuth-klient hos Google og sætte VERDANDE_GMAIL_CLIENT_ID og _SECRET.',
ai_not_configured: 'Der er ikke valgt en AI-udbyder. Sæt den op under Indstillinger → AI.',
totp_not_enabled: 'To-faktor er ikke slået til.',
inbox_protected: 'Indbakken kan ikke slettes.',
last_admin:
'Det er den sidste administrator. Gør en anden til administrator først — ellers er der ingen, der kan komme ind på denne side igen.'
gmail_not_configured: 'error.gmailNotConfigured',
ai_not_configured: 'error.aiNotConfigured',
totp_not_enabled: 'error.totpNotEnabled',
inbox_protected: 'error.inboxProtected',
last_admin: 'error.lastAdmin'
};
/**
* What to show a person for a failed request.
*
* A code with no message here falls back to the server's prose, which is English
* and written for a log — not good, but better than swallowing the only
* explanation there is. A code that turns up in that fallback is a code this
* table is missing.
* A code with no key here falls back to the server's prose, which is English and
* written for a log — not good, but better than swallowing the only explanation
* there is. A code that turns up in that fallback is a code this table is missing.
*/
export function humanMessage(err) {
if (!(err instanceof ApiError)) return MESSAGES.offline;
return MESSAGES[err.code] ?? err.message ?? MESSAGES.internal_error;
if (!(err instanceof ApiError)) return t(MESSAGES.offline);
const key = MESSAGES[err.code];
if (key) return t(key);
return err.message ?? t(MESSAGES.internal_error);
}
async function request(method, path, body, options = {}) {
+13 -10
View File
@@ -21,17 +21,20 @@
* carries a `--color-<id>` token for each, and a Go test reads this file to check
* the server's list of accepted names has not drifted from it.
*/
// `name` is a key rather than a word: the picker calls `t()` on it. The ids stay
// exactly as they are — they are what the database stores, and `internal/store`
// has a test that reads them out of this file.
export const COLORS = [
{ id: 'graphite', name: 'Grafit' },
{ id: 'tomato', name: 'Tomat' },
{ id: 'amber', name: 'Rav' },
{ id: 'lime', name: 'Lime' },
{ id: 'green', name: 'Grøn' },
{ id: 'teal', name: 'Petrol' },
{ id: 'blue', name: 'Blå' },
{ id: 'indigo', name: 'Indigo' },
{ id: 'violet', name: 'Violet' },
{ id: 'magenta', name: 'Magenta' }
{ id: 'graphite', name: 'color.graphite' },
{ id: 'tomato', name: 'color.tomato' },
{ id: 'amber', name: 'color.amber' },
{ id: 'lime', name: 'color.lime' },
{ id: 'green', name: 'color.green' },
{ id: 'teal', name: 'color.teal' },
{ id: 'blue', name: 'color.blue' },
{ id: 'indigo', name: 'color.indigo' },
{ id: 'violet', name: 'color.violet' },
{ id: 'magenta', name: 'color.magenta' }
];
/** The CSS variable a colour id paints with, falling back to the default. */
+5 -4
View File
@@ -13,6 +13,7 @@
import { TASK, startDrag, carries, accept } from '$lib/dnd.js';
import { focusOnMount } from '$lib/focus.js';
import TaskRow from './TaskRow.svelte';
import { t } from '$lib/i18n.svelte.js';
let { project, sections, canEdit, onsectionadded } = $props();
@@ -143,7 +144,7 @@
{/each}
{#if !tasks.length}
<p class="empty">Tom</p>
<p class="empty">{t('view.emptySection')}</p>
{/if}
</div>
</section>
@@ -156,8 +157,8 @@
<input
bind:value={name}
use:focusOnMount
placeholder="Sektionens navn"
aria-label="Ny sektion"
placeholder={t('view.sectionName')}
aria-label={t('view.newSection')}
onblur={() => !name.trim() && (adding = false)}
onkeydown={(e) => e.key === 'Escape' && (adding = false)}
/>
@@ -168,7 +169,7 @@
onclick={() => {
adding = true;
name = '';
}}>+ Tilføj sektion</button
}}>{t('view.addSection')}</button
>
{/if}
</section>
+25 -10
View File
@@ -13,6 +13,7 @@
*/
import { app } from '$lib/stores.svelte.js';
import { TASK, startDrag, carries, dragged, accept } from '$lib/dnd.js';
import { t, tag } from '$lib/i18n.svelte.js';
let {
/**
@@ -53,7 +54,21 @@
let cursor = $state(span === 'week' ? startOfWeek(new Date()) : startOfMonth(new Date()));
const WEEKDAYS = ['man', 'tir', 'ons', 'tor', 'fre', 'lør', 'søn'];
/**
* The weekday names, from Intl rather than written out.
*
* Not to save seven strings — so the abbreviations are the ones the language
* actually uses. Every language shortens its weekdays differently, and guessing
* at that from a translation table is how a calendar ends up saying something
* no reader of that language would write.
*
* Monday first, because the grid is. The 1st of January 2024 was a Monday; any
* Monday would do, and a constant one keeps this out of the render path.
*/
const WEEKDAYS = $derived.by(() => {
const format = new Intl.DateTimeFormat(tag(), { weekday: 'short' });
return Array.from({ length: 7 }, (_, i) => format.format(new Date(Date.UTC(2024, 0, 1 + i))));
});
function startOfMonth(d) {
return new Date(d.getFullYear(), d.getMonth(), 1);
@@ -123,7 +138,7 @@
);
const monthName = $derived(
cursor.toLocaleDateString('da-DK', { month: 'long', year: 'numeric' })
cursor.toLocaleDateString(tag(), { month: 'long', year: 'numeric' })
);
// "24. aug. – 30. aug. 2026", collapsed to one month name when the week does not
@@ -134,9 +149,9 @@
const day = { day: 'numeric', month: 'short' };
const left =
from.getMonth() === to.getMonth()
? from.toLocaleDateString('da-DK', { day: 'numeric' })
: from.toLocaleDateString('da-DK', day);
return `${left}–${to.toLocaleDateString('da-DK', day)} ${to.getFullYear()}`;
? from.toLocaleDateString(tag(), { day: 'numeric' })
: from.toLocaleDateString(tag(), day);
return `${left}–${to.toLocaleDateString(tag(), day)} ${to.getFullYear()}`;
});
/**
@@ -196,17 +211,17 @@
<div class="calendar" class:week={span === 'week'}>
<header>
<button onclick={() => step(-1)} aria-label={span === 'week' ? 'Forrige uge' : 'Forrige måned'}
<button onclick={() => step(-1)} aria-label={span === 'week' ? t('view.prevWeek') : t('view.prevMonth')}
>‹</button
>
<h2 class:week={span === 'week'}>
{heading}
{#if weekNumber}<span class="weekno">uge {weekNumber}</span>{/if}
{#if weekNumber}<span class="weekno">{t('view.weekNumber', { n: weekNumber })}</span>{/if}
</h2>
<button onclick={() => step(1)} aria-label={span === 'week' ? 'Næste uge' : 'Næste måned'}
<button onclick={() => step(1)} aria-label={span === 'week' ? t('view.nextWeek') : t('view.nextMonth')}
>›</button
>
<button class="today" onclick={() => (cursor = startOfSpan(new Date()))}>I dag</button>
<button class="today" onclick={() => (cursor = startOfSpan(new Date()))}>{t('task.today')}</button>
</header>
<div class="weekdays" aria-hidden="true">
@@ -257,7 +272,7 @@
{/each}
{#if tasks.length > chipLimit}
<span class="more">+{tasks.length - chipLimit} mere</span>
<span class="more">{t('view.more', { n: tasks.length - chipLimit })}</span>
{/if}
</div>
{/each}
+3 -3
View File
@@ -328,7 +328,7 @@
}
</script>
<nav class="sidebar" aria-label="Hovedmenu">
<nav class="sidebar" aria-label={t('nav.main')}>
<div class="brand">
<!-- Verdande's mark: the rune Wunjo, which is the letter the Norn's name
starts with in the elder futhark. One glyph, no wordmark beside it —
@@ -573,8 +573,8 @@
class="swatch"
class:chosen={(group.color ?? 'graphite') === color.id}
style="background: {colorVar(color.id)}"
title={color.name}
aria-label={color.name}
title={t(color.name)}
aria-label={t(color.name)}
aria-pressed={(group.color ?? 'graphite') === color.id}
onmousedown={(e) => e.preventDefault()}
onclick={() => app.setGroupColor(group.id, color.id)}
+40 -39
View File
@@ -19,6 +19,7 @@
import { api, humanMessage } from '$lib/api.js';
import { app } from '$lib/stores.svelte.js';
import { focusOnMount } from '$lib/focus.js';
import { t } from '$lib/i18n.svelte.js';
// loading | login | setup | totp | forgot | sent | invite | reset | done
let mode = $state('loading');
@@ -144,31 +145,31 @@
{#if mode === 'loading'}
<p class="lede">&nbsp;</p>
{:else if mode === 'setup'}
<p class="lede">Opret den første konto. Den bliver administrator.</p>
<p class="lede">{t('auth.firstAccount')}</p>
<label>
Navn
{t('auth.name')}
<input bind:value={name} autocomplete="name" required />
{#if fields.name}<span class="field-error">Skal udfyldes</span>{/if}
{#if fields.name}<span class="field-error">{t('auth.nameRequired')}</span>{/if}
</label>
<label>
E-mail
{t('auth.email')}
<input bind:value={email} type="email" autocomplete="username" required />
{#if fields.email}<span class="field-error">Skal være en e-mailadresse</span>{/if}
{#if fields.email}<span class="field-error">{t('auth.emailInvalid')}</span>{/if}
</label>
<label>
Adgangskode
{t('auth.password')}
<input bind:value={password} type="password" autocomplete="new-password" required />
<span class="hint">Mindst 10 tegn. En sætning er både nemmere og stærkere.</span>
<span class="hint">{t('auth.passwordHint')}</span>
{#if fields.password}<span class="field-error">{fields.password}</span>{/if}
</label>
<button type="submit" disabled={busy}>Opret konto</button>
<button type="submit" disabled={busy}>{t('auth.createAccount')}</button>
{:else if mode === 'totp'}
<p class="lede">Indtast koden fra din authenticator.</p>
<p class="lede">{t('auth.totpPrompt')}</p>
<label>
Kode
{t('auth.code')}
<input
bind:value={code}
use:focusOnMount
@@ -178,34 +179,34 @@
class="code"
required
/>
<span class="hint">Har du mistet din telefon, virker en af dine gendannelseskoder her.</span>
<span class="hint">{t('auth.totpRecovery')}</span>
</label>
<button type="submit" disabled={busy}>Fortsæt</button>
<button type="submit" disabled={busy}>{t('auth.continue')}</button>
{:else if mode === 'forgot'}
<p class="lede">Vi sender et link til at vælge en ny adgangskode.</p>
<p class="lede">{t('auth.resetPrompt')}</p>
<label>
E-mail
{t('auth.email')}
<input bind:value={email} type="email" autocomplete="username" required />
</label>
<button type="submit" disabled={busy}>Send link</button>
<button type="button" class="link" onclick={() => (mode = 'login')}>Tilbage</button>
<button type="submit" disabled={busy}>{t('auth.sendLink')}</button>
<button type="button" class="link" onclick={() => (mode = 'login')}>{t('auth.back')}</button>
{:else if mode === 'invite' || mode === 'reset'}
{#if !token}
<!-- A link that lost its token on the way. Saying so beats a form that
cannot succeed and a message that arrives only after it is filled in. -->
<p class="lede">
Linket er ikke komplet. Åbn det fra e-mailen igen, eller bed om et nyt.
{t('auth.linkBroken')}
</p>
<a class="link" href="/">Til log ind</a>
<a class="link" href="/">{t('auth.toSignIn')}</a>
{:else if app.user}
<!-- Already somebody else. The invite is tied to an address, so using it
from this session would create a second account for a person who is
right here in the first one. -->
<p class="lede">
Du er logget ind som {app.user.name}. Log ud først, og åbn så linket igen.
{t('auth.alreadySignedIn', { name: app.user.name })}
</p>
<button
type="button"
@@ -213,61 +214,61 @@
onclick={async () => {
await api.logout();
location.reload();
}}>Log ud</button
}}>{t('auth.signOut')}</button
>
{:else if mode === 'invite'}
<p class="lede">Du er inviteret. Vælg et navn og en adgangskode.</p>
<p class="lede">{t('auth.invited')}</p>
<label>
Navn
{t('auth.name')}
<input bind:value={name} autocomplete="name" required />
{#if fields.name}<span class="field-error">Skal udfyldes</span>{/if}
{#if fields.name}<span class="field-error">{t('auth.nameRequired')}</span>{/if}
</label>
<label>
Adgangskode
{t('auth.password')}
<input bind:value={password} type="password" autocomplete="new-password" required />
<span class="hint">Mindst 10 tegn. En sætning er både nemmere og stærkere.</span>
<span class="hint">{t('auth.passwordHint')}</span>
{#if fields.password}<span class="field-error">{fields.password}</span>{/if}
</label>
<button type="submit" disabled={busy}>Opret konto</button>
<button type="submit" disabled={busy}>{t('auth.createAccount')}</button>
{:else}
<p class="lede">Vælg en ny adgangskode.</p>
<p class="lede">{t('auth.pickNew')}</p>
<label>
Ny adgangskode
{t('auth.newPassword')}
<input bind:value={password} type="password" autocomplete="new-password" required />
<span class="hint">Mindst 10 tegn. Alle andre enheder bliver logget ud.</span>
<span class="hint">{t('auth.newPasswordHint')}</span>
{#if fields.password}<span class="field-error">{fields.password}</span>{/if}
</label>
<button type="submit" disabled={busy}>Gem adgangskoden</button>
<button type="submit" disabled={busy}>{t('auth.savePassword')}</button>
{/if}
{:else if mode === 'done'}
<p class="lede">Adgangskoden er skiftet. Log ind med den nye.</p>
<a class="link" href="/">Til log ind</a>
<p class="lede">{t('auth.passwordChanged')}</p>
<a class="link" href="/">{t('auth.toSignIn')}</a>
{:else if mode === 'sent'}
<!-- Deliberately not "we sent an email": that would confirm the address
has an account here to anybody who tried it. -->
<p class="lede">
Hvis adressen har en konto, er der et link på vej. Tjek også spamfilteret.
{t('auth.resetSent')}
</p>
<button type="button" class="link" onclick={() => (mode = 'login')}>Tilbage</button>
<button type="button" class="link" onclick={() => (mode = 'login')}>{t('auth.back')}</button>
{:else}
<p class="lede">Log ind for at fortsætte.</p>
<p class="lede">{t('auth.signInPrompt')}</p>
<label>
E-mail
{t('auth.email')}
<input bind:value={email} type="email" autocomplete="username" required />
</label>
<label>
Adgangskode
{t('auth.password')}
<input bind:value={password} type="password" autocomplete="current-password" required />
</label>
<button type="submit" disabled={busy}>Log ind</button>
<button type="submit" disabled={busy}>{t('auth.signIn')}</button>
<button type="button" class="link" onclick={() => (mode = 'forgot')}>
Glemt adgangskode?
{t('auth.forgot')}
</button>
{/if}
+36 -35
View File
@@ -13,6 +13,7 @@
import { api, humanMessage } from '$lib/api.js';
import { app } from '$lib/stores.svelte.js';
import { focusOnMount } from '$lib/focus.js';
import { t } from '$lib/i18n.svelte.js';
let { task, onclose } = $props();
@@ -35,8 +36,8 @@
{ rule: 'FREQ=DAILY', label: 'Hver dag' },
{ rule: 'FREQ=WEEKLY', label: 'Hver uge' },
{ rule: 'FREQ=WEEKLY;INTERVAL=2', label: 'Hver anden uge' },
{ rule: 'FREQ=MONTHLY', label: 'Hver måned' },
{ rule: 'FREQ=YEARLY', label: 'Hvert år' }
{ rule: 'FREQ=MONTHLY', label: t('detail.monthly') },
{ rule: 'FREQ=YEARLY', label: t('detail.yearly') }
];
let subtasks = $state([]);
@@ -176,7 +177,7 @@
if (patch.priority) priority = patch.priority;
if (patch.recurrence_rule) recurrence = patch.recurrence_rule;
if (patch.labels) labels = patch.labels.join(', ');
app.toast(`Læst som ${took.join(', ')}.`);
app.toast(t('detail.readAs', { what: took.join(', ') }));
}
}
@@ -363,9 +364,9 @@
<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_noninteractive_element_interactions -->
<div class="scrim" onclick={onclose} role="presentation"></div>
<aside class="drawer" aria-label="Opgave">
<aside class="drawer" aria-label={t('detail.task')}>
<header>
<button class="close" onclick={onclose} aria-label="Luk">
<button class="close" onclick={onclose} aria-label={t('detail.close')}>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M6 6l12 12M18 6L6 18" />
</svg>
@@ -379,38 +380,38 @@
use:focusOnMount
bind:value={content}
onblur={saveContent}
aria-label="Opgavens tekst"
aria-label={t('detail.text')}
/>
</div>
<div class="field">
<label for="description">Beskrivelse</label>
<label for="description">{t('detail.description')}</label>
<textarea
id="description"
rows="4"
bind:value={description}
onblur={saveDescription}
placeholder="Detaljer, links, hvad der skal huskes"
placeholder={t('detail.descriptionPlaceholder')}
></textarea>
</div>
<div class="grid">
<div class="field">
<label for="priority">Prioritet</label>
<label for="priority">{t('detail.priority')}</label>
<select
id="priority"
bind:value={priority}
onchange={() => save({ priority: Number(priority) })}
>
<option value={1}>P1 — haster</option>
<option value={1}>{t('detail.p1')}</option>
<option value={2}>P2</option>
<option value={3}>P3</option>
<option value={4}>Ingen</option>
<option value={4}>{t('detail.none')}</option>
</select>
</div>
<div class="field">
<label for="due">Forfalder</label>
<label for="due">{t('detail.due')}</label>
<input
id="due"
type="date"
@@ -421,18 +422,18 @@
</div>
<div class="field">
<label for="labels">Etiketter</label>
<label for="labels">{t('detail.labels')}</label>
<input
id="labels"
bind:value={labels}
onblur={saveLabels}
placeholder="adskilt af komma"
placeholder={t('detail.labelsPlaceholder')}
/>
</div>
<div class="grid">
<div class="field">
<label for="project">Projekt</label>
<label for="project">{t('detail.project')}</label>
<select id="project" bind:value={projectId} onchange={saveProject}>
{#each app.projects as project (project.id)}
<option value={project.id}>{project.name}</option>
@@ -441,7 +442,7 @@
</div>
<div class="field">
<label for="repeat">Gentages</label>
<label for="repeat">{t('detail.repeats')}</label>
<select id="repeat" bind:value={recurrence} onchange={saveRecurrence}>
{#each REPEATS as option (option.rule)}
<option value={option.rule}>{option.label}</option>
@@ -458,9 +459,9 @@
{#if members.length > 1}
<div class="field">
<label for="assignee">Ansvarlig</label>
<label for="assignee">{t('detail.assignee')}</label>
<select id="assignee" bind:value={assignee} onchange={saveAssignee}>
<option value="">Ingen</option>
<option value="">{t('detail.none')}</option>
{#each members as member (member.user_id)}
<option value={member.user_id}>{member.name}</option>
{/each}
@@ -469,7 +470,7 @@
{/if}
<section>
<h3>Undertasks</h3>
<h3>{t('detail.subtasks')}</h3>
{#each subtasks as subtask (subtask.id)}
<div class="subtask" class:done={subtask.completed}>
@@ -477,26 +478,26 @@
class="check"
class:checked={subtask.completed}
onclick={() => toggleSubtask(subtask)}
aria-label={subtask.completed ? 'Genåbn' : 'Markér som færdig'}
aria-label={subtask.completed ? t('detail.reopen') : t('task.complete')}
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M6 12.5l4 4 8-8.5" />
</svg>
</button>
<span class="subtask-text">{subtask.content}</span>
<button class="remove" onclick={() => removeSubtask(subtask)} aria-label="Slet">
<button class="remove" onclick={() => removeSubtask(subtask)} aria-label={t('detail.delete')}>
×
</button>
</div>
{/each}
<form onsubmit={addSubtask}>
<input bind:value={newSubtask} placeholder="Tilføj en undertask" aria-label="Ny undertask" />
<input bind:value={newSubtask} placeholder={t('detail.addSubtask')} aria-label={t('detail.newSubtask')} />
</form>
</section>
<section>
<h3>Filer</h3>
<h3>{t('detail.files')}</h3>
{#each attachments as attachment (attachment.id)}
<div class="file">
@@ -504,7 +505,7 @@
in place would run its own script on this origin. -->
<a href={attachment.url} download={attachment.filename}>{attachment.filename}</a>
<span class="size">{kb(attachment.size)}</span>
<button class="remove" onclick={() => removeAttachment(attachment)} aria-label="Slet">
<button class="remove" onclick={() => removeAttachment(attachment)} aria-label={t('detail.delete')}>
×
</button>
</div>
@@ -512,18 +513,18 @@
<label class="upload">
<input type="file" onchange={upload} disabled={uploading} />
<span>{uploading ? 'Lægger op …' : 'Vedhæft en fil'}</span>
<span>{uploading ? t('detail.uploading') : t('detail.attachFile')}</span>
</label>
</section>
<section>
<h3>Påmindelser</h3>
<h3>{t('detail.reminders')}</h3>
{#each reminders as reminder (reminder.id)}
<div class="reminder">
<span>{reminder.remind_at ? stamp(reminder.remind_at) : `${reminder.offset_min} min.`}</span>
{#if reminder.sent}<span class="sent">sendt</span>{/if}
<button class="remove" onclick={() => removeReminder(reminder)} aria-label="Slet">
{#if reminder.sent}<span class="sent">{t('detail.sent')}</span>{/if}
<button class="remove" onclick={() => removeReminder(reminder)} aria-label={t('detail.delete')}>
×
</button>
</div>
@@ -533,14 +534,14 @@
<input
type="datetime-local"
bind:value={newReminder}
aria-label="Ny påmindelse"
aria-label={t('detail.newReminder')}
/>
<button class="add" type="submit">Tilføj</button>
<button class="add" type="submit">{t('detail.add')}</button>
</form>
</section>
<section>
<h3>Kommentarer</h3>
<h3>{t('detail.comments')}</h3>
{#each comments as comment (comment.id)}
<article class="comment">
@@ -560,7 +561,7 @@
{/each}
</div>
{#if comment.user_id === app.user?.id}
<button class="remove" onclick={() => removeComment(comment)} aria-label="Slet">
<button class="remove" onclick={() => removeComment(comment)} aria-label={t('detail.delete')}>
×
</button>
{/if}
@@ -571,10 +572,10 @@
<textarea
rows="2"
bind:value={newComment}
placeholder="Skriv en kommentar"
aria-label="Ny kommentar"
placeholder={t('detail.writeComment')}
aria-label={t('detail.newComment')}
></textarea>
<button class="add" type="submit" disabled={posting}>Skriv</button>
<button class="add" type="submit" disabled={posting}>{t('detail.post')}</button>
</form>
</section>
</div>
+512 -1
View File
@@ -72,5 +72,516 @@ export const da = {
'task.noPriority': 'Ingen prioritet',
// --- a project group -----------------------------------------------------------
'group.colorOf': 'Farve på {name}'
'group.colorOf': 'Farve på {name}',
// --- settings: the frame -------------------------------------------------------
'settings.title': 'Indstillinger',
'settings.tab.account': 'Konto',
'settings.tab.notifications': 'Notifikationer',
'settings.tab.integrations': 'Integrationer',
'settings.tab.ai': 'AI',
'settings.tab.tokens': 'API-tokens',
'settings.tab.users': 'Brugere',
'settings.tab.history': 'Historik',
'settings.tab.errors': 'Fejl',
'settings.tab.data': 'Data og skabeloner',
// --- settings: the account -----------------------------------------------------
'account.profile': 'Profil',
'account.profileHint':
'Tidszonen er ikke pynt: alle datoer i appen bliver afgjort i den, så “i morgen kl. 9” betyder noget andet, når du skifter den.',
'account.name': 'Navn',
'account.email': 'E-mail',
'account.emailFixed': 'Kan ikke ændres her.',
'account.timezone': 'Tidszone',
'account.parseLanguage': 'Sprog',
'account.danish': 'Dansk',
'account.english': 'English',
'account.parseHint':
'Både fladens sprog og den grammatik, hurtig tilføjelse tolker en linje med — “hver mandag” eller “every monday”.',
'account.save': 'Gem',
'account.saved': 'Gemt.',
'account.appearance': 'Udseende',
'account.appearanceHint':
'Gemmes i denne browser. Det er en egenskab ved den skærm, du sidder ved — en bærbar i solen og en skærm i et mørkt rum vil have hvert sit svar.',
'account.password': 'Adgangskode',
'account.passwordHint':
'At skifte den logger alle andre sessioner ud — hvilket for det meste er grunden til at gøre det.',
'account.currentPassword': 'Nuværende adgangskode',
'account.newPassword': 'Ny adgangskode',
'account.changePassword': 'Skift adgangskode',
'account.passwordChanged': 'Skiftet.',
'account.totp': 'To-faktor',
'account.totpHint': 'En engangskode fra en authenticator-app oven i adgangskoden.',
'account.writeThemDown': 'Skriv dem ned nu.',
'account.recoveryHint': 'De vises kun denne ene gang — serveren har kun deres hash.',
'account.gotThem': 'Jeg har dem',
'account.passwordRequired':
'Kræves til begge handlinger nedenfor. At slå to-faktor fra er præcis det, en fremmed med din session ville gøre først.',
'account.newRecoveryCodes': 'Nye gendannelseskoder',
'account.totpOff': 'Slå to-faktor fra',
'account.scanHint': 'Scan i din authenticator-app, eller indtast nøglen manuelt.',
'account.codeFromApp': 'Koden fra appen',
'account.totpProofHint':
'To-faktor er først slået til, når en kode har bevist, at appen faktisk har nøglen.',
'account.confirm': 'Bekræft',
'account.cancel': 'Fortryd',
'account.totpOn': 'Slå to-faktor til',
'account.devices': 'Enheder',
'account.devicesHint':
'Hvor du er logget ind. Genkender du ikke en af dem, så log den ud og skift adgangskode.',
'account.thisDevice': 'denne enhed',
'account.signOutDevice': 'Log ud',
'account.totpEnabled': 'Slået til.',
'account.recoveryLeftOne': '{n} gendannelseskode tilbage.',
'account.recoveryLeftMany': '{n} gendannelseskoder tilbage.',
// --- settings: notifications ---------------------------------------------------
'push.title': 'Notifikationer på enheden',
'push.hint':
'Påmindelser og beskeder fra andre, også når fanen er lukket. Beskeden krypteres til din browser undervejs — push-tjenesten kan ikke læse den.',
'push.unsupported':
'Denne browser understøtter det ikke. Safari kræver, at appen er lagt på hjemmeskærmen; over almindelig HTTP virker det kun på localhost.',
'push.blocked':
'Browseren har blokeret notifikationer for dette site. Det kan kun laves om i browserens egne indstillinger — en side kan ikke spørge igen, når svaret har været nej.',
'push.on': 'Slået til på denne enhed.',
'push.turnOff': 'Slå fra',
'push.turnOn': 'Slå til på denne enhed',
'push.perBrowser': 'Gælder kun den browser, du sidder i nu.',
'push.recent': 'Seneste',
'push.none': 'Ingenting endnu.',
'push.open': 'Åbn',
'push.markAllRead': 'Markér alle som læst',
'push.version': 'Version',
'push.running': 'Kører',
'push.seeRelease': 'Se udgivelsen',
// --- settings: API tokens ------------------------------------------------------
'tokens.title': 'API-tokens',
'tokens.hint':
'Det, et script, en CalDAV-klient eller en MCP-forbindelse logger ind med. En token bærer dine rettigheder præcist — den kan intet, du ikke selv kan.',
'tokens.copyNow': 'Kopiér den nu.',
'tokens.onceOnly': 'Den vises kun denne ene gang — serveren har kun dens hash.',
'tokens.copy': 'Kopiér',
'tokens.copied': 'Kopieret.',
'tokens.done': 'Færdig',
'tokens.mcpBefore': 'Skal du bruge den som',
'tokens.mcpLink': 'MCP-forbindelse',
'tokens.mcpAfter': 'i Claude? Så er det denne adresse, dialogen skal have:',
'tokens.copyAddress': 'Kopiér adressen',
'tokens.name': 'Navn',
'tokens.namePlaceholder': 'fx min bærbare, eller backup-scriptet',
'tokens.expires': 'Udløber',
'tokens.never': 'Aldrig',
'tokens.in30': 'Om 30 dage',
'tokens.in90': 'Om 90 dage',
'tokens.inYear': 'Om et år',
'tokens.expiryHint':
'En kalenderklient, der har abonneret i årevis, har brug for “aldrig”. Et script, du kører én gang, har ikke.',
'tokens.create': 'Lav en token',
'tokens.none': 'Ingen tokens endnu.',
'tokens.revoke': 'Tilbagekald',
// --- settings: AI --------------------------------------------------------------
'ai.title': 'AI',
'ai.hint':
'Bruges to steder: at dele en opgave op i undertasks, og at skrive et kort overblik over det, der er udestående. Nøglen ligger på din server og sendes kun til den udbyder, du vælger her.',
'ai.provider': 'Udbyder',
'ai.off': 'Slået fra',
'ai.model': 'Model',
'ai.baseURL': 'Adresse',
'ai.apiKey': 'API-nøgle',
'ai.save': 'Gem',
'ai.saved': 'Gemt.',
'ai.weekly': 'Ugentligt overblik',
'ai.weeklyHint': 'En kort note om, hvad der ser vigtigst ud lige nu.',
'push.unreadOne': '{n} ulæst.',
'push.unreadMany': '{n} ulæste.',
'ai.keyStored': 'Der er gemt en nøgle — lad feltet stå tomt',
'ai.keyBlankHint':
'Feltet er tomt med vilje. Nøglen sendes aldrig tilbage til browseren — en indstillingsside, der fylder et kodeordsfelt ud igen, er en side, der en dag lækker en nøgle ud i et skærmbillede.',
'ai.keyNewHint': 'Gemmes på serveren og vises aldrig igen.',
'tokens.lastUsed': 'sidst brugt {when}',
'tokens.neverUsed': 'aldrig brugt',
'tokens.expired': 'udløbet {when}',
'tokens.expiresOn': 'udløber {when}',
'tokens.revokeNamed': 'Tilbagekald {name}',
// --- settings: people ----------------------------------------------------------
'users.invite': 'Inviter en bruger',
'users.inviteHint':
'Der er ingen åben registrering. Du sender et link, og personen vælger selv navn og adgangskode — så er der ikke en adgangskode, to mennesker kender.',
'users.emailAddress': 'E-mailadresse',
'users.emailPlaceholder': 'navn@example.dk',
'users.mustBeEmail': 'Skal være en e-mailadresse.',
'users.sendInvite': 'Send invitation',
'users.inviteMade': 'Invitationen er oprettet. Send linket til personen:',
'users.pending': 'Afventer svar',
'users.pendingHint':
'Invitationer, der er sendt og ikke brugt endnu. Kun linkets hash er gemt, så det kan ikke vises igen — er det gået til den forkerte, så træk det tilbage.',
'users.revoke': 'Træk tilbage',
'users.accounts': 'Konti',
'users.accountsHint': 'Alle på denne instans.',
'users.admin': 'administrator',
'users.you': 'dig',
'users.makeAdmin': 'Gør til administrator',
'users.removeAdmin': 'Fjern administrator',
'users.delete': 'Slet',
'users.deleteQuestion': 'Slet {name} <{email}> for altid?',
'users.deleteTakes': 'Det sletter {projects} og {tasks} i dem.',
'users.deleteLeaves': '{tasks} i andres projekter bliver stående uden forfatter.',
'users.deleteFinal': 'Det kan ikke fortrydes. Der er ingen papirkurv for konti.',
'users.revokeQuestion':
'Træk invitationen til {email} tilbage? Linket holder op med at virke.',
'users.projectOne': 'projekt',
'users.projectMany': 'projekter',
'users.taskOne': 'opgave',
'users.taskMany': 'opgaver',
'users.never': 'aldrig set',
// --- settings: history and errors -----------------------------------------------
'history.title': 'Historik',
'history.hint':
'Alt, der er blevet gjort på denne server, på tværs af alle projekter — også dem, du ikke selv er med i. Projekternes egne historik-paneler viser det samme, ét projekt ad gangen; det her er spørgsmålet, de ikke kan svare på. Rækkerne bliver stående, når en konto slettes: det, der blev gjort, holder op med at have et navn, ikke med at være sket.',
'history.person': 'Person',
'history.all': 'Alle',
'history.project': 'Projekt',
'history.event': 'Hændelse',
'history.clear': 'Ryd',
'history.more': 'Hent flere',
'history.loading': 'Henter…',
'history.noMatch': 'Ingen hændelser matcher de valgte filtre.',
'history.nothing': 'Der er ikke registreret noget endnu.',
'history.deletedAccount': 'En slettet konto',
'errors.title': 'Serverfejl',
'errors.hint':
'Hver 500, API’et har svaret, med hvad handleren var i gang med og fejlen den ramte. Gemt i databasen, ikke kun i loggen — containerens log starter forfra ved hver genstart, så forklaringen er som regel væk, når nogen kigger. Ryddes efter 30 dage.',
'errors.none': 'Ingen fejl registreret. Det er den rigtige tilstand.',
// --- the views -------------------------------------------------------------------
'view.delegated': 'Venter på andre',
'view.delegatedEmpty': 'Du venter ikke på nogen.',
'view.labelEmpty': 'Ingen åbne opgaver med denne etiket.',
'view.filterEmpty': 'Ingenting matcher lige nu.',
'view.filterFailed': 'Filteret kunne ikke køres.',
'view.upcoming': 'Kommende',
'view.mode': 'Visning',
'view.list': 'Liste',
'view.week': 'Uge',
'view.month': 'Måned',
'view.board': 'Board',
'view.calendar': 'Kalender',
'view.emptySection': 'Tom',
'view.addSection': '+ Tilføj sektion',
'view.sectionName': 'Sektionens navn',
'view.newSection': 'Ny sektion',
'view.prevMonth': 'Forrige måned',
'view.nextMonth': 'Næste måned',
'view.prevWeek': 'Forrige uge',
'view.nextWeek': 'Næste uge',
'view.weekNumber': 'uge {n}',
'view.more': '+{n} mere',
// --- how long ago ----------------------------------------------------------------
'when.justNow': 'lige nu',
'when.minutes': 'for {n} min. siden',
'when.hours': 'for {n} timer siden',
'when.days': 'for {n} dage siden',
'when.never': 'aldrig',
'when.neverSignedIn': 'aldrig logget ind',
// --- settings: data ---------------------------------------------------------------
'data.import': 'Importér fra Todoist',
'data.csvFile': 'CSV-fil',
'data.importing': 'Importerer …',
'data.openProject': 'Åbn projektet',
'data.trash': 'Papirkurv',
'data.trashEmpty': 'Papirkurven er tom.',
'data.restore': 'Hent tilbage',
'data.backups': 'Sikkerhedskopier',
'data.backupNow': 'Tag en kopi nu',
'data.backingUp': 'Kopierer…',
'data.backupMade': 'Kopi taget — {size}',
'data.backupFailed': 'mislykkedes',
'data.download': 'Hent',
'data.noBackups': 'Der er ikke taget nogen kopi endnu.',
'data.swept': 'ryddet væk',
'data.empty': 'tom',
'data.export': 'Eksport',
'data.exportAccount': 'Hele kontoen som JSON',
'data.exportOne': 'Ét projekt',
'data.pickProject': 'Vælg et projekt',
'data.csv': 'CSV',
'data.ics': 'Kalenderfil',
'data.templates': 'Skabeloner',
'data.saveAsTemplate': 'Gem et projekt som skabelon',
'data.templateName': 'Navn på skabelonen',
'data.saveTemplate': 'Gem som skabelon',
'data.noTemplates': 'Ingen skabeloner endnu.',
'data.use': 'Brug',
'data.delete': 'Slet',
'data.newProjectName': 'Navn på det nye projekt',
'data.startDate': 'Startdato',
'data.startDateHint': 'Dag nul for skabelonens datoer. Tom betyder i dag.',
'data.createProject': 'Opret projektet',
// --- a group's own page ------------------------------------------------------------
'group.notFound': 'Gruppen findes ikke, eller den er ikke din.',
'group.failed': 'Gruppen kunne ikke hentes.',
'group.retry': 'Prøv igen',
'group.about': 'Om gruppen',
'group.aboutPlaceholder': 'Hvad er det her for et stykke arbejde?',
'group.writeAbout': 'Skriv hvad det her er for et stykke arbejde.',
'group.saving': 'Gemmer…',
'group.projects': 'Projekter',
'group.projectOne': '1 projekt',
'group.projectMany': '{n} projekter',
'group.noProjects':
'Ingen projekter i gruppen endnu. Træk et herop i sidebjælken, eller vælg gruppen, når du opretter et.',
'group.documents': 'Dokumenter',
'group.documentsHint':
'Filer, der hører til hele gruppen frem for til én opgave i den — kontrakten, tegningen, den aftale alt det andet hviler på.',
'group.remove': 'Fjern',
'group.removeNamed': 'Fjern {name}',
'group.removeQuestion': 'Fjern "{name}"?',
'group.addFile': '+ Læg en fil op',
'group.uploading': 'Lægger op…',
// --- keyboard shortcuts --------------------------------------------------------------
'keys.title': 'Genveje',
'data.importHint':
'Vælg CSV-eksporten af ét projekt. Prioriteterne bliver konverteret, ikke kopieret: Todoist skriver 4 for det, grænsefladen kalder P1.',
'data.trashHint':
'Slettede projekter, med deres opgaver. De bliver hentet tilbage præcis som de var — bortset fra opgaver, du havde slettet hver for sig først; dem var der en grund til.',
'data.backupsHint':
'Databasen kopieres hver nat og de seneste fjorten gemmes. Kopierne er talt, ikke dateret: en container, der har stået slukket en måned, må ikke komme tilbage og slette dem alle for at være for gamle.',
'data.backupsAttachments':
'Vedhæftede filer er ikke med. De er indholdsadresserede og bliver kun lagt til, så fjorten ens kopier af dem ville fylde det drev op, de skulle beskytte — tag hele /data, hvis du vil have det hele.',
'data.restoreHint':
'At lægge en kopi tilbage er ikke en knap her, og det er med vilje: en database kan ikke skiftes ud under en server, der skriver i den, og en halvt gennemført udskiftning ødelægger netop det, den skulle redde. Stop containeren, læg filen i stedet for verdande.db i datamappen, slet -wal og -shm ved siden af, og start den igen.',
'data.exportHint':
'Alt, i den rå form. Det er garantien for, at du kan gå igen — en eksport, der er blevet pyntet, er en eksport, der har mistet noget.',
'data.templatesHint':
'Et projekt gemt som en form, der kan bruges igen. Datoerne i skabelonen er relative, så de bliver regnet ud fra den startdato, du vælger.',
'keys.navigation': 'Navigation',
'keys.jumpToQuickAdd': 'Hop til feltet “tilføj opgave”',
'keys.thisPage': 'Denne side',
'keys.inQuickAdd': 'I hurtig tilføjelse',
'keys.intoProject': 'Læg opgaven i et projekt',
'keys.setLabel': 'Sæt en etiket',
'keys.priority': 'Prioritet',
'keys.date': 'Dato — dansk og engelsk',
'keys.time': 'Klokkeslæt',
'keys.clear': 'Ryd feltet',
// --- signing in ------------------------------------------------------------------
'auth.firstAccount': 'Opret den første konto. Den bliver administrator.',
'auth.name': 'Navn',
'auth.nameRequired': 'Skal udfyldes',
'auth.email': 'E-mail',
'auth.emailInvalid': 'Skal være en e-mailadresse',
'auth.password': 'Adgangskode',
'auth.passwordHint': 'Mindst 10 tegn. En sætning er både nemmere og stærkere.',
'auth.createAccount': 'Opret konto',
'auth.totpPrompt': 'Indtast koden fra din authenticator.',
'auth.code': 'Kode',
'auth.totpRecovery': 'Har du mistet din telefon, virker en af dine gendannelseskoder her.',
'auth.continue': 'Fortsæt',
'auth.resetPrompt': 'Vi sender et link til at vælge en ny adgangskode.',
'auth.sendLink': 'Send link',
'auth.back': 'Tilbage',
'auth.linkBroken': 'Linket er ikke komplet. Åbn det fra e-mailen igen, eller bed om et nyt.',
'auth.toSignIn': 'Til log ind',
'auth.signOut': 'Log ud',
'auth.invited': 'Du er inviteret. Vælg et navn og en adgangskode.',
'auth.pickNew': 'Vælg en ny adgangskode.',
'auth.newPassword': 'Ny adgangskode',
'auth.newPasswordHint': 'Mindst 10 tegn. Alle andre enheder bliver logget ud.',
'auth.savePassword': 'Gem adgangskoden',
'auth.passwordChanged': 'Adgangskoden er skiftet. Log ind med den nye.',
'auth.resetSent': 'Hvis adressen har en konto, er der et link på vej. Tjek også spamfilteret.',
'auth.signInPrompt': 'Log ind for at fortsætte.',
'auth.signIn': 'Log ind',
'auth.forgot': 'Glemt adgangskode?',
// --- a task, opened ---------------------------------------------------------------
'detail.task': 'Opgave',
'detail.close': 'Luk',
'detail.text': 'Opgavens tekst',
'detail.description': 'Beskrivelse',
'detail.descriptionPlaceholder': 'Detaljer, links, hvad der skal huskes',
'detail.priority': 'Prioritet',
'detail.p1': 'P1 — haster',
'detail.none': 'Ingen',
'detail.due': 'Forfalder',
'detail.labels': 'Etiketter',
'detail.labelsPlaceholder': 'adskilt af komma',
'detail.project': 'Projekt',
'detail.repeats': 'Gentages',
'detail.monthly': 'Hver måned',
'detail.yearly': 'Hvert år',
'detail.assignee': 'Ansvarlig',
'detail.subtasks': 'Undertasks',
'detail.addSubtask': 'Tilføj en undertask',
'detail.newSubtask': 'Ny undertask',
'detail.files': 'Filer',
'detail.delete': 'Slet',
'detail.reminders': 'Påmindelser',
'detail.newReminder': 'Ny påmindelse',
'detail.sent': 'sendt',
'detail.add': 'Tilføj',
'detail.comments': 'Kommentarer',
'detail.writeComment': 'Skriv en kommentar',
'detail.newComment': 'Ny kommentar',
'detail.post': 'Skriv',
'detail.readAs': 'Læst som {what}',
'auth.alreadySignedIn': 'Du er logget ind som {name}. Log ud først, og åbn så linket igen.',
'detail.reopen': 'Genåbn',
'detail.uploading': 'Lægger op …',
'detail.attachFile': 'Vedhæft en fil',
// --- settings: integrations --------------------------------------------------------
'int.gmail': 'Gmail',
'int.gmailHint':
'Stjernemarkér en mail, eller giv den en etiket, og den bliver en opgave. Envejs: at fjerne stjernen gør ikke noget ved opgaven.',
'int.connectGmail': 'Forbind Gmail',
'int.fromEnv':
'Klienten er sat i miljøet (VERDANDE_GMAIL_CLIENT_ID), så den kan ikke ændres her. Det er med vilje: en værdi i runens manifest er en beslutning, der bliver anvendt igen ved hver genstart, og en formular, der kunne overskrive den, ville gøre manifestet til en løgn.',
'int.oauthClient': 'OAuth-klient hos Google',
'int.registerHint':
'Registrér en klient i Google Cloud Console → APIs & Services → Credentials → OAuth client ID → Web application, slå Gmail API til, og indsæt de to værdier her. Din egen konto skal stå som testbruger, så længe appen ikke er verificeret hos Google.',
'int.redirectURI': 'Godkendt redirect-URI',
'int.clientID': 'Klient-id',
'int.clientSecret': 'Klienthemmelighed',
'int.secretStored': 'Gemt — udfyld kun for at skifte den',
'int.save': 'Gem',
'int.saved': 'Gemt.',
'int.noClient':
'Der er ikke registreret en OAuth-klient hos Google endnu. Det skal en administrator gøre, før knappen her kan bruges.',
'int.connectedAs': 'Forbundet som',
'int.unknownAccount': 'ukendt konto',
'int.whatMakesATask': 'Hvad laver en opgave',
'int.starred': 'Stjernemarkerede',
'int.aLabel': 'En bestemt etiket',
'int.both': 'Begge dele',
'int.gmailLabelName': 'Etikettens navn i Gmail',
'int.gmailLabelExample': 'fx Opgaver',
'int.fetchNow': 'Hent nu',
'int.disconnect': 'Afbryd',
'int.feed': 'Kalenderfeed',
'int.feedHint':
'Abonnér i Apple Kalender, Google eller Thunderbird. En kalenderklient kan ikke logge ind, så nøglen i adressen er hele adgangskoden — del den ikke.',
'int.address': 'Adresse',
'int.copy': 'Kopiér',
'int.newLink': 'Nyt link',
'int.newLinkHint':
'Et nyt link bryder alle eksisterende abonnementer med det samme. Det er pointen: det er det, man gør, når det gamle er havnet et forkert sted.',
'int.mailToTask': 'Mail til opgave',
'int.mailHint':
'Send eller videresend en mail hertil, og emnelinjen bliver tolket som en hurtig tilføjelse — “Fakturer Anders p1 #Firma” virker også her.',
'int.noMailServer':
'Der er ingen mailserver sat op på denne server, så adressen herunder kan ikke modtage noget endnu. Sæt VERDANDE_SMTP_HOST og de øvrige SMTP-indstillinger, og få mailserveren til at aflevere post til todo+* videre til /inbound/mail.',
'int.yourAddress': 'Din adresse',
'int.newAddress': 'Ny adresse',
'int.caldav': 'CalDAV',
'int.caldavHint':
'Tovejs, i modsætning til feedet ovenfor: Apple Påmindelser og Thunderbird kan også skrive tilbage.',
'int.server': 'Server',
'int.caldavAuth':
'Brugernavn er din e-mail. Adgangskoden er en API-token — ikke din rigtige adgangskode.',
'int.gmailConnected': 'Gmail er forbundet.',
'int.gmailState':
'Svaret fra Google passede ikke til det forsøg, der blev startet her. Prøv igen.',
'int.gmailExpired': 'Forsøget udløb undervejs. Prøv igen.',
'int.gmailInvalid': 'Svaret fra Google kunne ikke læses. Prøv igen.',
'int.gmailFailed': 'Google afviste ombytningen af koden.',
'int.gmailNoRefresh':
'Google sendte ingen refresh-token. Fjern verdande under din Google-konto og forbind igen.',
'int.gmailDenied': 'Adgangen blev afvist hos Google.',
'int.gmailOther': 'Gmail svarede: {what}',
// --- a project ----------------------------------------------------------------------
'project.name': 'Projektets navn',
'project.clickToRename': 'Klik for at omdøbe',
'project.color': 'Farve på projektet',
'project.pickColor': 'Vælg farve',
'project.delete': 'Slet projektet',
'project.share': 'Del',
'project.history': 'Historik',
'project.noHistory': 'Ingenting er sket her endnu.',
'project.canEdit': 'Kan redigere',
'project.canView': 'Kan kun se',
'project.invite': 'Inviter',
'project.inviteByEmail': 'Inviter via e-mail',
'project.emailAddress': 'e-mailadresse',
'project.role': 'Rolle',
'project.sendLinkYourself': 'Ingen mailserver sat op — send selv linket:',
'project.noSection': 'Uden sektion',
'project.rename': 'Omdøb',
'project.deleteSection': 'Slet',
'project.readOnly': 'Du kan se dette projekt, men ikke ændre det.',
'project.notFound': 'Projektet findes ikke, eller du har ikke adgang til det.',
'project.loadFailed': 'Kunne ikke hente projektet. Serveren svarede ikke.',
'project.retry': 'Prøv igen',
'project.nothingHere': 'Ingenting her endnu.',
'project.sharedWith': 'Delt · {n}',
// --- the palette ---------------------------------------------------------------
'color.graphite': 'Grafit',
'color.tomato': 'Tomat',
'color.amber': 'Rav',
'color.lime': 'Lime',
'color.green': 'Grøn',
'color.teal': 'Petrol',
'color.blue': 'Blå',
'color.indigo': 'Indigo',
'color.violet': 'Violet',
'color.magenta': 'Magenta',
// --- what a failed request says -----------------------------------------------
'error.unauthorized': 'Forkert e-mail eller adgangskode.',
'error.totpRequired': 'Indtast koden fra din authenticator.',
'error.forbidden': 'Det har du ikke adgang til.',
'error.notFound': 'Findes ikke.',
'error.conflict': 'Det er der allerede.',
'error.rateLimited': 'For mange forsøg. Vent et øjeblik.',
'error.validation': 'Tjek felterne herunder.',
'error.tooLarge': 'Det er for stort.',
'error.internal': 'Noget gik galt. Prøv igen.',
'error.badRequest': 'Anmodningen kunne ikke læses.',
'error.offline': 'Ingen forbindelse til serveren.',
'error.gmailNotConfigured':
'Gmail er ikke sat op på denne server. En administrator skal registrere en OAuth-klient hos Google under Indstillinger → Integrationer.',
'error.aiNotConfigured': 'Der er ikke valgt en AI-udbyder. Sæt den op under Indstillinger → AI.',
'error.totpNotEnabled': 'To-faktor er ikke slået til.',
'error.inboxProtected': 'Indbakken kan ikke slettes.',
'error.lastAdmin':
'Det er den sidste administrator. Gør en anden til administrator først — ellers er der ingen, der kan komme ind på denne side igen.',
// --- the themes -------------------------------------------------------------------
'theme.dark': 'Nordlys',
'theme.darkNote': 'Mørk med grøn accent.',
'theme.dusk': 'Skumring',
'theme.duskNote': 'Mørk og varm, med rav.',
'theme.light': 'Dagslys',
'theme.lightNote': 'Lys og køligt neutral.',
'theme.paper': 'Papir',
'theme.paperNote': 'Lys og varm, som papir.',
'theme.contrast': 'Kontrast',
'theme.contrastNote': 'Sort på hvidt, til skarpt lys.',
// --- push, in the browser's own words ----------------------------------------------
'push.deniedByBrowser':
'Browseren har blokeret notifikationer for dette site. Det skal slås til i browserens indstillinger.',
'push.notEnabled': 'Notifikationer blev ikke slået til.',
'push.noVapidKey': 'Serveren har ingen VAPID-nøgle.'
};
+511 -1
View File
@@ -68,5 +68,515 @@ export const en = {
'task.noPriority': 'No priority',
// --- a project group -----------------------------------------------------------
'group.colorOf': 'Colour of {name}'
'group.colorOf': 'Colour of {name}',
// --- settings: the frame -------------------------------------------------------
'settings.title': 'Settings',
'settings.tab.account': 'Account',
'settings.tab.notifications': 'Notifications',
'settings.tab.integrations': 'Integrations',
'settings.tab.ai': 'AI',
'settings.tab.tokens': 'API tokens',
'settings.tab.users': 'People',
'settings.tab.history': 'History',
'settings.tab.errors': 'Errors',
'settings.tab.data': 'Data and templates',
// --- settings: the account -----------------------------------------------------
'account.profile': 'Profile',
'account.profileHint':
'The timezone is not decoration: every date in the app is resolved in it, so “tomorrow at 9” means something else once you change it.',
'account.name': 'Name',
'account.email': 'Email',
'account.emailFixed': 'Cannot be changed here.',
'account.timezone': 'Timezone',
'account.parseLanguage': 'Language',
'account.danish': 'Dansk',
'account.english': 'English',
'account.parseHint':
'Both the interface’s language and the grammar quick add reads a line with — “hver mandag” or “every monday”.',
'account.save': 'Save',
'account.saved': 'Saved.',
'account.appearance': 'Appearance',
'account.appearanceHint':
'Kept in this browser. It is a property of the screen you are sitting at — a laptop in the sun and a monitor in a dark room want different answers.',
'account.password': 'Password',
'account.passwordHint':
'Changing it signs every other session out — which is usually the reason to do it.',
'account.currentPassword': 'Current password',
'account.newPassword': 'New password',
'account.changePassword': 'Change password',
'account.passwordChanged': 'Changed.',
'account.totp': 'Two-factor',
'account.totpHint': 'A one-time code from an authenticator app, on top of the password.',
'account.writeThemDown': 'Write them down now.',
'account.recoveryHint': 'They are shown this once — the server only has their hash.',
'account.gotThem': 'I have them',
'account.passwordRequired':
'Required for both actions below. Turning two-factor off is exactly what a stranger holding your session would do first.',
'account.newRecoveryCodes': 'New recovery codes',
'account.totpOff': 'Turn two-factor off',
'account.scanHint': 'Scan it in your authenticator app, or type the key in by hand.',
'account.codeFromApp': 'The code from the app',
'account.totpProofHint':
'Two-factor is only on once a code has proved the app really has the key.',
'account.confirm': 'Confirm',
'account.cancel': 'Cancel',
'account.totpOn': 'Turn two-factor on',
'account.devices': 'Devices',
'account.devicesHint':
'Where you are signed in. If you do not recognise one, sign it out and change your password.',
'account.thisDevice': 'this device',
'account.signOutDevice': 'Sign out',
'account.totpEnabled': 'On.',
'account.recoveryLeftOne': '{n} recovery code left.',
'account.recoveryLeftMany': '{n} recovery codes left.',
// --- settings: notifications ---------------------------------------------------
'push.title': 'Notifications on this device',
'push.hint':
'Reminders and messages from other people, even with the tab closed. The message is encrypted to your browser on the way — the push service cannot read it.',
'push.unsupported':
'This browser does not support it. Safari needs the app added to the home screen; over plain HTTP it only works on localhost.',
'push.blocked':
'The browser has blocked notifications for this site. That can only be changed in the browser’s own settings — a page cannot ask again once the answer has been no.',
'push.on': 'On for this device.',
'push.turnOff': 'Turn off',
'push.turnOn': 'Turn on for this device',
'push.perBrowser': 'Applies only to the browser you are in right now.',
'push.recent': 'Recent',
'push.none': 'Nothing yet.',
'push.open': 'Open',
'push.markAllRead': 'Mark all as read',
'push.version': 'Version',
'push.running': 'Running',
'push.seeRelease': 'See the release',
// --- settings: API tokens ------------------------------------------------------
'tokens.title': 'API tokens',
'tokens.hint':
'What a script, a CalDAV client or an MCP connector signs in with. A token carries exactly your permissions — it can do nothing you cannot.',
'tokens.copyNow': 'Copy it now.',
'tokens.onceOnly': 'It is shown this once — the server only has its hash.',
'tokens.copy': 'Copy',
'tokens.copied': 'Copied.',
'tokens.done': 'Done',
'tokens.mcpBefore': 'Using it as an',
'tokens.mcpLink': 'MCP connector',
'tokens.mcpAfter': 'in Claude? Then this is the address the dialog wants:',
'tokens.copyAddress': 'Copy the address',
'tokens.name': 'Name',
'tokens.namePlaceholder': 'e.g. my laptop, or the backup script',
'tokens.expires': 'Expires',
'tokens.never': 'Never',
'tokens.in30': 'In 30 days',
'tokens.in90': 'In 90 days',
'tokens.inYear': 'In a year',
'tokens.expiryHint':
'A calendar client that has been subscribed for years needs “never”. A script you run once does not.',
'tokens.create': 'Create a token',
'tokens.none': 'No tokens yet.',
'tokens.revoke': 'Revoke',
// --- settings: AI --------------------------------------------------------------
'ai.title': 'AI',
'ai.hint':
'Used in two places: splitting a task into sub-tasks, and writing a short overview of what is outstanding. The key stays on your server and is only sent to the provider you pick here.',
'ai.provider': 'Provider',
'ai.off': 'Off',
'ai.model': 'Model',
'ai.baseURL': 'Address',
'ai.apiKey': 'API key',
'ai.save': 'Save',
'ai.saved': 'Saved.',
'ai.weekly': 'Weekly overview',
'ai.weeklyHint': 'A short note on what looks most important right now.',
'push.unreadOne': '{n} unread.',
'push.unreadMany': '{n} unread.',
'ai.keyStored': 'A key is stored — leave this blank',
'ai.keyBlankHint':
'The field is blank on purpose. The key is never sent back to the browser — a settings page that refills a password field is one that will one day leak a key into a screenshot.',
'ai.keyNewHint': 'Stored on the server and never shown again.',
'tokens.lastUsed': 'last used {when}',
'tokens.neverUsed': 'never used',
'tokens.expired': 'expired {when}',
'tokens.expiresOn': 'expires {when}',
'tokens.revokeNamed': 'Revoke {name}',
// --- settings: people ----------------------------------------------------------
'users.invite': 'Invite somebody',
'users.inviteHint':
'There is no open registration. You send a link and the person picks their own name and password — so there is never a password two people know.',
'users.emailAddress': 'Email address',
'users.emailPlaceholder': 'name@example.com',
'users.mustBeEmail': 'Must be an email address.',
'users.sendInvite': 'Send invitation',
'users.inviteMade': 'The invitation is ready. Send the link to them:',
'users.pending': 'Awaiting a reply',
'users.pendingHint':
'Invitations sent and not used yet. Only the link’s hash is stored, so it cannot be shown again — if it went to the wrong person, revoke it.',
'users.revoke': 'Revoke',
'users.accounts': 'Accounts',
'users.accountsHint': 'Everybody on this instance.',
'users.admin': 'administrator',
'users.you': 'you',
'users.makeAdmin': 'Make administrator',
'users.removeAdmin': 'Remove administrator',
'users.delete': 'Delete',
'users.deleteQuestion': 'Delete {name} <{email}> for good?',
'users.deleteTakes': 'That deletes {projects} and the {tasks} in them.',
'users.deleteLeaves': '{tasks} in other people’s projects stay, without an author.',
'users.deleteFinal': 'It cannot be undone. There is no trash for accounts.',
'users.revokeQuestion': 'Revoke the invitation to {email}? The link stops working.',
'users.projectOne': 'project',
'users.projectMany': 'projects',
'users.taskOne': 'task',
'users.taskMany': 'tasks',
'users.never': 'never seen',
// --- settings: history and errors -----------------------------------------------
'history.title': 'History',
'history.hint':
'Everything that has been done on this server, across every project — including the ones you are not in. A project’s own history panel shows the same rows one project at a time; this is the question those cannot answer. Rows stay when an account is deleted: what was done stops having a name, not having happened.',
'history.person': 'Person',
'history.all': 'All',
'history.project': 'Project',
'history.event': 'Event',
'history.clear': 'Clear',
'history.more': 'Load more',
'history.loading': 'Loading…',
'history.noMatch': 'Nothing matches the filters.',
'history.nothing': 'Nothing has been recorded yet.',
'history.deletedAccount': 'A deleted account',
'errors.title': 'Server errors',
'errors.hint':
'Every 500 the API has answered, with what the handler was attempting and the error it hit. Written to the database rather than only to the log — a container’s log starts over on every restart, so the explanation is usually gone by the time anybody looks. Kept for 30 days.',
'errors.none': 'No errors recorded. That is the right state.',
// --- the views -------------------------------------------------------------------
'view.delegated': 'Waiting on others',
'view.delegatedEmpty': 'You are not waiting on anybody.',
'view.labelEmpty': 'No open tasks with this label.',
'view.filterEmpty': 'Nothing matches right now.',
'view.filterFailed': 'The filter could not be run.',
'view.upcoming': 'Upcoming',
'view.mode': 'View',
'view.list': 'List',
'view.week': 'Week',
'view.month': 'Month',
'view.board': 'Board',
'view.calendar': 'Calendar',
'view.emptySection': 'Empty',
'view.addSection': '+ Add a section',
'view.sectionName': 'The section’s name',
'view.newSection': 'New section',
'view.prevMonth': 'Previous month',
'view.nextMonth': 'Next month',
'view.prevWeek': 'Previous week',
'view.nextWeek': 'Next week',
'view.weekNumber': 'week {n}',
'view.more': '+{n} more',
// --- how long ago ----------------------------------------------------------------
'when.justNow': 'just now',
'when.minutes': '{n} min. ago',
'when.hours': '{n} hours ago',
'when.days': '{n} days ago',
'when.never': 'never',
'when.neverSignedIn': 'never signed in',
// --- settings: data ---------------------------------------------------------------
'data.import': 'Import from Todoist',
'data.csvFile': 'CSV file',
'data.importing': 'Importing …',
'data.openProject': 'Open the project',
'data.trash': 'Trash',
'data.trashEmpty': 'The trash is empty.',
'data.restore': 'Restore',
'data.backups': 'Backups',
'data.backupNow': 'Take one now',
'data.backingUp': 'Copying…',
'data.backupMade': 'Backup written — {size}',
'data.backupFailed': 'failed',
'data.download': 'Download',
'data.noBackups': 'No backup has been taken yet.',
'data.swept': 'swept away',
'data.empty': 'empty',
'data.export': 'Export',
'data.exportAccount': 'The whole account as JSON',
'data.exportOne': 'One project',
'data.pickProject': 'Pick a project',
'data.csv': 'CSV',
'data.ics': 'Calendar file',
'data.templates': 'Templates',
'data.saveAsTemplate': 'Save a project as a template',
'data.templateName': 'Name for the template',
'data.saveTemplate': 'Save as a template',
'data.noTemplates': 'No templates yet.',
'data.use': 'Use',
'data.delete': 'Delete',
'data.newProjectName': 'Name for the new project',
'data.startDate': 'Start date',
'data.startDateHint': 'Day zero for the template’s dates. Blank means today.',
'data.createProject': 'Create the project',
// --- a group's own page ------------------------------------------------------------
'group.notFound': 'That group does not exist, or it is not yours.',
'group.failed': 'The group could not be loaded.',
'group.retry': 'Try again',
'group.about': 'About this group',
'group.aboutPlaceholder': 'What kind of work is this?',
'group.writeAbout': 'Write what kind of work this is.',
'group.saving': 'Saving…',
'group.projects': 'Projects',
'group.projectOne': '1 project',
'group.projectMany': '{n} projects',
'group.noProjects':
'No projects in the group yet. Drag one up here in the sidebar, or pick the group when you create one.',
'group.documents': 'Documents',
'group.documentsHint':
'Files that belong to the whole group rather than to one task in it — the contract, the drawing, the agreement everything else rests on.',
'group.remove': 'Remove',
'group.removeNamed': 'Remove {name}',
'group.removeQuestion': 'Remove "{name}"?',
'group.addFile': '+ Upload a file',
'group.uploading': 'Uploading…',
// --- keyboard shortcuts --------------------------------------------------------------
'keys.title': 'Shortcuts',
'data.importHint':
'Pick the CSV export of one project. Priorities are converted, not copied: Todoist writes 4 for what its interface calls P1.',
'data.trashHint':
'Deleted projects, with their tasks. They come back exactly as they were — except for tasks you had deleted individually first; there was a reason for those.',
'data.backupsHint':
'The database is copied every night and the most recent fourteen are kept. Counted, not dated: a container that has been off for a month must not come back and delete all of them for being too old.',
'data.backupsAttachments':
'Attachments are not included. They are content-addressed and only ever added to, so fourteen identical copies would fill the volume they were meant to protect — take the whole of /data if you want everything.',
'data.restoreHint':
'Putting a copy back is deliberately not a button here: a database cannot be swapped under a server that is writing to it, and a half-finished swap destroys the very thing it was meant to save. Stop the container, put the file in place of verdande.db in the data directory, delete the -wal and -shm beside it, and start it again.',
'data.exportHint':
'Everything, in its raw form. That is the guarantee that you can leave — an export that has been tidied up is an export that has lost something.',
'data.templatesHint':
'A project saved as a shape you can use again. The dates in a template are relative, so they are worked out from the start date you pick.',
'keys.navigation': 'Navigation',
'keys.jumpToQuickAdd': 'Jump to the “add a task” field',
'keys.thisPage': 'This page',
'keys.inQuickAdd': 'In quick add',
'keys.intoProject': 'Put the task in a project',
'keys.setLabel': 'Set a label',
'keys.priority': 'Priority',
'keys.date': 'A date — Danish and English',
'keys.time': 'A time',
'keys.clear': 'Clear the field',
// --- signing in ------------------------------------------------------------------
'auth.firstAccount': 'Create the first account. It becomes the administrator.',
'auth.name': 'Name',
'auth.nameRequired': 'Required',
'auth.email': 'Email',
'auth.emailInvalid': 'Must be an email address',
'auth.password': 'Password',
'auth.passwordHint': 'At least 10 characters. A sentence is both easier and stronger.',
'auth.createAccount': 'Create account',
'auth.totpPrompt': 'Enter the code from your authenticator.',
'auth.code': 'Code',
'auth.totpRecovery': 'If you have lost your phone, one of your recovery codes works here.',
'auth.continue': 'Continue',
'auth.resetPrompt': 'We will send a link to choose a new password.',
'auth.sendLink': 'Send the link',
'auth.back': 'Back',
'auth.linkBroken': 'That link is incomplete. Open it from the email again, or ask for a new one.',
'auth.toSignIn': 'To sign in',
'auth.signOut': 'Sign out',
'auth.invited': 'You have been invited. Choose a name and a password.',
'auth.pickNew': 'Choose a new password.',
'auth.newPassword': 'New password',
'auth.newPasswordHint': 'At least 10 characters. Every other device is signed out.',
'auth.savePassword': 'Save the password',
'auth.passwordChanged': 'The password has been changed. Sign in with the new one.',
'auth.resetSent':
'If that address has an account, a link is on its way. Check the spam filter too.',
'auth.signInPrompt': 'Sign in to continue.',
'auth.signIn': 'Sign in',
'auth.forgot': 'Forgotten your password?',
// --- a task, opened ---------------------------------------------------------------
'detail.task': 'Task',
'detail.close': 'Close',
'detail.text': 'The task’s text',
'detail.description': 'Description',
'detail.descriptionPlaceholder': 'Details, links, whatever has to be remembered',
'detail.priority': 'Priority',
'detail.p1': 'P1 — urgent',
'detail.none': 'None',
'detail.due': 'Due',
'detail.labels': 'Labels',
'detail.labelsPlaceholder': 'separated by commas',
'detail.project': 'Project',
'detail.repeats': 'Repeats',
'detail.monthly': 'Every month',
'detail.yearly': 'Every year',
'detail.assignee': 'Assigned to',
'detail.subtasks': 'Sub-tasks',
'detail.addSubtask': 'Add a sub-task',
'detail.newSubtask': 'New sub-task',
'detail.files': 'Files',
'detail.delete': 'Delete',
'detail.reminders': 'Reminders',
'detail.newReminder': 'New reminder',
'detail.sent': 'sent',
'detail.add': 'Add',
'detail.comments': 'Comments',
'detail.writeComment': 'Write a comment',
'detail.newComment': 'New comment',
'detail.post': 'Post',
'detail.readAs': 'Read as {what}',
'auth.alreadySignedIn': 'You are signed in as {name}. Sign out first, then open the link again.',
'detail.reopen': 'Reopen',
'detail.uploading': 'Uploading …',
'detail.attachFile': 'Attach a file',
// --- settings: integrations --------------------------------------------------------
'int.gmail': 'Gmail',
'int.gmailHint':
'Star an email, or give it a label, and it becomes a task. One way: removing the star does nothing to the task.',
'int.connectGmail': 'Connect Gmail',
'int.fromEnv':
'The client is set in the environment (VERDANDE_GMAIL_CLIENT_ID), so it cannot be changed here. That is deliberate: a value in the Rune’s manifest is a decision reapplied on every restart, and a form that could overwrite it would make the manifest a lie.',
'int.oauthClient': 'OAuth client at Google',
'int.registerHint':
'Register a client in Google Cloud Console → APIs & Services → Credentials → OAuth client ID → Web application, enable the Gmail API, and paste the two values here. Your own account has to be listed as a test user for as long as the app is unverified with Google.',
'int.redirectURI': 'Authorised redirect URI',
'int.clientID': 'Client ID',
'int.clientSecret': 'Client secret',
'int.secretStored': 'Stored — fill this in only to change it',
'int.save': 'Save',
'int.saved': 'Saved.',
'int.noClient':
'No OAuth client has been registered with Google yet. An administrator has to do that before this button can be used.',
'int.connectedAs': 'Connected as',
'int.unknownAccount': 'an unknown account',
'int.whatMakesATask': 'What makes a task',
'int.starred': 'Starred',
'int.aLabel': 'A particular label',
'int.both': 'Both',
'int.gmailLabelName': 'The label’s name in Gmail',
'int.gmailLabelExample': 'e.g. Tasks',
'int.fetchNow': 'Fetch now',
'int.disconnect': 'Disconnect',
'int.feed': 'Calendar feed',
'int.feedHint':
'Subscribe in Apple Calendar, Google or Thunderbird. A calendar client cannot sign in, so the key in the address is the whole password — do not share it.',
'int.address': 'Address',
'int.copy': 'Copy',
'int.newLink': 'New link',
'int.newLinkHint':
'A new link breaks every existing subscription immediately. That is the point: it is what you do when the old one has ended up somewhere it should not be.',
'int.mailToTask': 'Mail to task',
'int.mailHint':
'Send or forward an email here and the subject line is read as a quick add — “Invoice Anders p1 #Company” works here too.',
'int.noMailServer':
'No mail server is configured on this server, so the address below cannot receive anything yet. Set VERDANDE_SMTP_HOST and the other SMTP settings, and have the mail server deliver post for todo+* to /inbound/mail.',
'int.yourAddress': 'Your address',
'int.newAddress': 'New address',
'int.caldav': 'CalDAV',
'int.caldavHint':
'Two-way, unlike the feed above: Apple Reminders and Thunderbird can write back as well.',
'int.server': 'Server',
'int.caldavAuth':
'The username is your email. The password is an API token — not your real password.',
'int.gmailConnected': 'Gmail is connected.',
'int.gmailState': 'Google’s reply did not match the attempt that started here. Try again.',
'int.gmailExpired': 'The attempt expired on the way. Try again.',
'int.gmailInvalid': 'Google’s reply could not be read. Try again.',
'int.gmailFailed': 'Google refused to exchange the code.',
'int.gmailNoRefresh':
'Google sent no refresh token. Remove verdande from your Google account and connect again.',
'int.gmailDenied': 'Access was refused at Google.',
'int.gmailOther': 'Gmail replied: {what}',
// --- a project ----------------------------------------------------------------------
'project.name': 'The project’s name',
'project.clickToRename': 'Click to rename',
'project.color': 'The project’s colour',
'project.pickColor': 'Pick a colour',
'project.delete': 'Delete the project',
'project.share': 'Share',
'project.history': 'History',
'project.noHistory': 'Nothing has happened here yet.',
'project.canEdit': 'Can edit',
'project.canView': 'Can only view',
'project.invite': 'Invite',
'project.inviteByEmail': 'Invite by email',
'project.emailAddress': 'email address',
'project.role': 'Role',
'project.sendLinkYourself': 'No mail server configured — send the link yourself:',
'project.noSection': 'No section',
'project.rename': 'Rename',
'project.deleteSection': 'Delete',
'project.readOnly': 'You can see this project, but not change it.',
'project.notFound': 'That project does not exist, or you do not have access to it.',
'project.loadFailed': 'The project could not be loaded. The server did not answer.',
'project.retry': 'Try again',
'project.nothingHere': 'Nothing here yet.',
'project.sharedWith': 'Shared · {n}',
// --- the palette ---------------------------------------------------------------
'color.graphite': 'Graphite',
'color.tomato': 'Tomato',
'color.amber': 'Amber',
'color.lime': 'Lime',
'color.green': 'Green',
'color.teal': 'Teal',
'color.blue': 'Blue',
'color.indigo': 'Indigo',
'color.violet': 'Violet',
'color.magenta': 'Magenta',
// --- what a failed request says -----------------------------------------------
'error.unauthorized': 'Wrong email or password.',
'error.totpRequired': 'Enter the code from your authenticator.',
'error.forbidden': 'You do not have access to that.',
'error.notFound': 'Not found.',
'error.conflict': 'That already exists.',
'error.rateLimited': 'Too many attempts. Wait a moment.',
'error.validation': 'Check the fields below.',
'error.tooLarge': 'That is too large.',
'error.internal': 'Something went wrong. Try again.',
'error.badRequest': 'The request could not be read.',
'error.offline': 'No connection to the server.',
'error.gmailNotConfigured':
'Gmail is not set up on this server. An administrator has to register an OAuth client with Google under Settings → Integrations.',
'error.aiNotConfigured': 'No AI provider has been chosen. Set one up under Settings → AI.',
'error.totpNotEnabled': 'Two-factor is not on.',
'error.inboxProtected': 'The Inbox cannot be deleted.',
'error.lastAdmin':
'That is the last administrator. Make somebody else an administrator first — otherwise nobody can get back into this page.',
// --- the themes -------------------------------------------------------------------
'theme.dark': 'Northern lights',
'theme.darkNote': 'Dark, with a green accent.',
'theme.dusk': 'Dusk',
'theme.duskNote': 'Dark and warm, with amber.',
'theme.light': 'Daylight',
'theme.lightNote': 'Light and coolly neutral.',
'theme.paper': 'Paper',
'theme.paperNote': 'Light and warm, like paper.',
'theme.contrast': 'Contrast',
'theme.contrastNote': 'Black on white, for bright light.',
// --- push, in the browser's own words ----------------------------------------------
'push.deniedByBrowser':
'The browser has blocked notifications for this site. It has to be turned on in the browser’s own settings.',
'push.notEnabled': 'Notifications were not turned on.',
'push.noVapidKey': 'The server has no VAPID key.'
};
+4 -3
View File
@@ -8,6 +8,7 @@
*/
import { api } from './api.js';
import { t } from './i18n.svelte.js';
/** Whether this browser can do it at all. Safari before 16.4 cannot, and neither
* can any browser on a page served over plain HTTP from a non-localhost host. */
@@ -56,14 +57,14 @@ export async function subscribe() {
if (granted !== 'granted') {
throw new Error(
granted === 'denied'
? 'Browseren har blokeret notifikationer for dette site. Det skal slås til i browserens indstillinger.'
: 'Notifikationer blev ikke slået til.'
? t('push.deniedByBrowser')
: t('push.notEnabled')
);
}
const reg = await registration();
const { public_key } = await api.pushKey();
if (!public_key) throw new Error('Serveren har ingen VAPID-nøgle.');
if (!public_key) throw new Error(t('push.noVapidKey'));
const subscription = await reg.pushManager.subscribe({
// Not optional in Chrome: a subscription that is not userVisibleOnly is
+9 -5
View File
@@ -12,6 +12,7 @@
*/
import { api, ApiError, humanMessage } from './api.js';
import { i18n } from './i18n.svelte.js';
class AppState {
user = $state(null);
@@ -93,6 +94,9 @@ class AppState {
this.loading = true;
try {
this.user = await api.me();
// The interface's language follows the account, so it is set the moment
// the session is known — before anything has drawn a string.
i18n.set(this.user.locale);
const [{ projects }, { groups }, { people }] = await Promise.all([
api.listProjects(),
api.listProjectGroups(),
@@ -666,11 +670,11 @@ export const upcomingView = new UpcomingView();
* the picker rather than a missing block.
*/
export const THEMES = [
{ id: 'dark', name: 'Nordlys', note: 'Mørk med grøn accent.', dark: true },
{ id: 'dusk', name: 'Skumring', note: 'Mørk og varm, med rav.', dark: true },
{ id: 'light', name: 'Dagslys', note: 'Lys og køligt neutral.', dark: false },
{ id: 'paper', name: 'Papir', note: 'Lys og varm, som papir.', dark: false },
{ id: 'contrast', name: 'Kontrast', note: 'Sort på hvidt, til skarpt lys.', dark: false }
{ id: 'dark', name: 'theme.dark', note: 'theme.darkNote', dark: true },
{ id: 'dusk', name: 'theme.dusk', note: 'theme.duskNote', dark: true },
{ id: 'light', name: 'theme.light', note: 'theme.lightNote', dark: false },
{ id: 'paper', name: 'theme.paper', note: 'theme.paperNote', dark: false },
{ id: 'contrast', name: 'theme.contrast', note: 'theme.contrastNote', dark: false }
];
/** Theme, kept in localStorage and applied to the document element. */
+51
View File
@@ -0,0 +1,51 @@
/**
* How long ago something was, in the account's language.
*
* Four pages had a copy of this — the user list, the error log, the history page
* and the backup panel — and they had already drifted: one said "aldrig logget
* ind", another "aldrig", and two of them stopped at days while the others carried
* on to a date. Four copies is three chances for the fifth one to be different
* again.
*
* Written by hand rather than with `Intl.RelativeTimeFormat`, which would say
* "3 hours ago" and "for 3 timer siden" correctly and cannot say "lige nu" — and
* "just now" is the answer for most of what these lists show.
*/
import { t, tag } from './i18n.svelte.js';
export function ago(iso, { never = 'when.never' } = {}) {
if (!iso) return t(never);
const then = new Date(iso);
const seconds = Math.round((Date.now() - then) / 1000);
if (seconds < 60) return t('when.justNow');
if (seconds < 3600) return t('when.minutes', { n: Math.floor(seconds / 60) });
if (seconds < 86400) return t('when.hours', { n: Math.floor(seconds / 3600) });
if (seconds < 604800) return t('when.days', { n: Math.floor(seconds / 86400) });
return then.toLocaleDateString(tag(), { day: 'numeric', month: 'short', year: 'numeric' });
}
/** A date and a time, for a list where the time of day matters. */
export function stamp(iso) {
return new Date(iso).toLocaleString(tag(), {
day: 'numeric',
month: 'short',
hour: '2-digit',
minute: '2-digit'
});
}
/** A day, without the year — for something inside the next few months. */
export function shortDate(iso) {
return new Date(iso).toLocaleDateString(tag(), { day: 'numeric', month: 'short' });
}
/** A day with the year, for something that could be any distance away. */
export function fullDate(iso) {
return new Date(iso).toLocaleDateString(tag(), {
day: 'numeric',
month: 'short',
year: 'numeric'
});
}