From 1cc49ec8d4409ee227a2f0f5462c08be4c7ba6b1 Mon Sep 17 00:00:00 2001 From: Michi Date: Tue, 24 Nov 2026 16:06:09 +0100 Subject: [PATCH] =?UTF-8?q?i18n=20(en/de),=20simple-ansicht,=20settings-po?= =?UTF-8?q?litur,=20projekt-l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Sprachsystem: public/i18n.js + public/lang.js (en Default, de), Sprach-Dropdown in Einstellungen → Allgemein; komplette UI zweisprachig (HTML + app.js), Datum/Zahlen locale-abhängig. Server-Fehlermeldungen bleiben deutsch. - Einfache Ansicht: Scroll-Fix, Layout-Umschalter (Kacheln/Kompakt/Liste), Sortierung, Backup-fällig-Pille. - Credits: © Michael Media + Discord (Einstellungen → Über, README). - Settings poliert: Icon-Chip-Überschriften + dezente Unterabschnitte, kompaktere Abstände, General sinnvoll geordnet. - Projekt löschen: Button in Aktionen (Danger Zone) + Endpoint POST /api/projects/:name/delete mit Guards (nur echter Unterordner, nie _Tools/Root, blockiert bei Scan/Backup), doppelte Bestätigung. Backup bleibt unberührt. Co-Authored-By: Claude Opus 4.8 --- README.md | 10 + lib/settings.js | 20 +- public/app.js | 1027 ++++++++++++++++++-------------- public/i18n.js | 55 ++ public/index.html | 460 +++++++++------ public/lang.js | 1438 +++++++++++++++++++++++++++++++++++++++++++++ server.js | 67 ++- 7 files changed, 2453 insertions(+), 624 deletions(-) create mode 100644 public/i18n.js create mode 100644 public/lang.js diff --git a/README.md b/README.md index 276b5b0..4758591 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,11 @@ Oben rechts schaltest du zwischen zwei Ansichten um (gilt für diesen PC, bleibt Release-ZIP, Generator und mehr. ### Überblick +- **Beim Start** zeigt ein Ladebalken in der Mitte, wie weit das Einlesen ist (Schritt 1: Projekte mit Git, + Technik, Größen · Schritt 2: letzte Änderungen), mit Anzahl und geschätzter Restzeit. „Schon mal loslegen“ + blendet ihn aus, das Einlesen läuft dann im Hintergrund weiter. +- Die **Kopfzeile** passt sich der Fensterbreite an: wird es eng, verschwinden zuerst die Beschriftungen, dann + Nebensächliches – nichts ragt mehr aus dem Fenster. - **Board** mit Spalten *Idee · Aktiv · Pausiert · Fertig · Archiviert* – Karten per Drag & Drop verschieben. Umschalter *Karten | Liste* für eine kompakte Zeilen-Ansicht. - **Galerie** mit Vorschaubildern (das App-Icon oder ein Bild aus dem Projekt wird automatisch gefunden). @@ -96,6 +101,7 @@ Einstellungen → Allgemein → **Fenster**: „Beim Schließen im Hintergrund w ### Mehrere Projektordner Oben links neben dem Logo ist ein Auswahlmenü: - **Klick auf einen Namen** zeigt nur diesen Ordner, **Häkchen** zeigen mehrere gleichzeitig. +- **Keinen anzeigen (leer)** blendet alle Ordner aus – das Dashboard bleibt leer, bis du wieder einen wählst. - **Ordner hinzufügen…** bzw. **Mehrere Ordner einlesen…** (übergeordneten Ordner wählen, Unterordner ankreuzen). Sind mehrere Ordner sichtbar, steht auf jeder Karte, aus welchem sie stammt. @@ -269,3 +275,7 @@ Direktlinks: `#gallery`, `#list`, `#tasks`, `#activity`, `#storage`, `#board/ want.has(r.id)) - if (!active.length && s.roots[0]) active = [s.roots[0]] + // noneShown: deliberately no folder shown (empty dashboard); else at least the first + if (s.noneShown) active = [] + else if (!active.length && s.roots[0]) active = [s.roots[0]] const { activeRoot: _, ...rest } = s return { ...rest, activeRoots: active.map((r) => r.id), activeRoot: active[0]?.id ?? '', projectsRoot: active[0]?.path ?? '' } } @@ -224,8 +227,10 @@ function save(input) { activeRoots = [roots[i].id] } } - const sel = withActive({ roots, activeRoots }) - const projectsRoot = sel.projectsRoot + // "no folder shown" stays until a folder is chosen again + const noneShown = !!s.noneShown && !(Array.isArray(input.activeRoots) && input.activeRoots.length) + const sel = withActive({ roots, activeRoots, noneShown }) + const projectsRoot = sel.projectsRoot || (noneShown ? roots[0]?.path : '') if (!projectsRoot || !isDir(projectsRoot)) throw new Error('Der Projektordner existiert nicht.') let targets = s.backup.targets if (Array.isArray(input.targets)) { @@ -265,6 +270,7 @@ function save(input) { const next = withActive({ roots, activeRoots: sel.activeRoots, + noneShown, itchProfile, features: { ...(s.features ?? featuresFrom(null, itchProfile)), ...(typeof input.features?.itch === 'boolean' ? { itch: input.features.itch } : {}) }, backup: { @@ -292,10 +298,16 @@ function setActive(ids) { const s = get() const list = (Array.isArray(ids) ? ids : [ids]).map(String) const sel = s.roots.filter((x) => list.includes(x.id)) + // [] = show no folder at all (empty dashboard, chosen in the dropdown) + if (!list.filter(Boolean).length) { + current = withActive({ ...s, activeRoots: [], noneShown: true }) + persist(current) + return current + } if (!sel.length) throw new Error('Projektordner nicht gefunden.') const gone = sel.find((r) => !isDir(r.path)) if (gone) throw new Error(`Projektordner nicht erreichbar: ${gone.path}`) - current = withActive({ ...s, activeRoots: sel.map((r) => r.id) }) + current = withActive({ ...s, activeRoots: sel.map((r) => r.id), noneShown: false }) persist(current) return current } diff --git a/public/app.js b/public/app.js index 4628507..8753239 100644 --- a/public/app.js +++ b/public/app.js @@ -18,11 +18,16 @@ const TECH_ICON = { Python: 'square-terminal', Web: 'globe', Arduino: 'circuit-board', } const GIT_ICON = { green: 'cloud-check', yellow: 'cloud-upload', red: 'cloud-off' } +// label/hint/short come from the dictionary (tier..*); here only style + icon const TIER = { - Cache: { label: 'Cache', hint: 'immer neu erzeugbar', cls: 'ok', icon: 'recycle' }, - Release: { label: 'Fertiger Build', hint: 'Version – bewusst löschen', cls: 'warn', icon: 'package' }, - Output: { label: 'Rohbilder', hint: 'Generator-Output', cls: 'warn', icon: 'images' }, + Cache: { cls: 'ok', icon: 'recycle' }, + Release: { cls: 'warn', icon: 'package' }, + Output: { cls: 'warn', icon: 'images' }, } +// use window.I18N.t (not the global t) – these run inside .map((t)=>…) where t is shadowed +const tierLabel = (k) => window.I18N.t('tier.' + k + '.label') +const tierHint = (k) => window.I18N.t('tier.' + k + '.hint') +const tierShort = (k) => window.I18N.t('tier.' + k + '.short') const ACTION_ICON = { 'Einrichten': 'download', 'Starten': 'play', 'Bauen': 'hammer', 'Werkzeuge': 'wand-sparkles', 'Öffnen': 'folder-open', } @@ -52,11 +57,11 @@ function escapeHtml(s) { function timeAgo(iso) { if (!iso) return '' const days = Math.floor((Date.now() - new Date(iso)) / 86400000) - if (days <= 0) return 'heute' - if (days === 1) return 'gestern' - if (days < 30) return `vor ${days} T.` - if (days < 365) return `vor ${Math.floor(days / 30)} Mon.` - return `vor ${Math.floor(days / 365)} J.` + if (days <= 0) return t('time.today') + if (days === 1) return t('time.yesterday') + if (days < 30) return t('time.daysAgo', { n: days }) + if (days < 365) return t('time.monthsAgo', { n: Math.floor(days / 30) }) + return t('time.yearsAgo', { n: Math.floor(days / 365) }) } function fmtMB(mb) { @@ -90,17 +95,17 @@ const lastActivity = (p) => p.lastChange?.at ?? p.lastCommit?.date ?? p.mtime function fmtDate(iso, withYear = true) { if (!iso) return '–' - return new Date(iso).toLocaleDateString('de-DE', withYear ? { day: '2-digit', month: '2-digit', year: '2-digit' } : { day: '2-digit', month: '2-digit' }) + return new Date(iso).toLocaleDateString(I18N.locale(), withYear ? { day: '2-digit', month: '2-digit', year: '2-digit' } : { day: '2-digit', month: '2-digit' }) } function changeTitle(p) { const at = lastActivity(p) - const when = new Date(at).toLocaleString('de-DE', { dateStyle: 'full', timeStyle: 'short' }) - if (p.lastChange) return `Letzte Änderung: ${when}\n${p.lastChange.file}${p.lastChange.partial ? '\n(großes Projekt – nur teilweise durchsucht)' : ''}` - return p.lastChange === undefined ? `Wird ermittelt … (bisher: ${when})` : `Letzte Änderung: ${when}` + const when = new Date(at).toLocaleString(I18N.locale(), { dateStyle: 'full', timeStyle: 'short' }) + if (p.lastChange) return `${t('change.last', { when })}\n${p.lastChange.file}${p.lastChange.partial ? '\n' + t('change.partial') : ''}` + return p.lastChange === undefined ? t('change.detecting', { when }) : t('change.last', { when }) } function sizeTitle(p) { - if (p.storage?.sizeMB == null) return 'Ordnergröße: noch nicht gescannt („Alle scannen“ oben)' - return `Ordnergröße: ${fmtMB(p.storage.sizeMB)} (gescannt ${timeAgo(p.storage.at)})${deletableMB(p) >= 1 ? ` · davon ${fmtMB(deletableMB(p))} aufräumbar` : ''}` + if (p.storage?.sizeMB == null) return t('size.unscanned') + return t('size.scanned', { size: fmtMB(p.storage.sizeMB), ago: timeAgo(p.storage.at) }) + (deletableMB(p) >= 1 ? ' · ' + t('size.cleanable', { size: fmtMB(deletableMB(p)) }) : '') } function factsHtml(p) { return `
@@ -110,7 +115,7 @@ function factsHtml(p) { } function gitHtml(git, short = false) { - const label = short ? ({ green: 'Gesichert', yellow: 'Ungesichert', red: 'Kein Remote' })[git.level] : git.label + const label = short ? t('git.' + git.level) : git.label return `${ic(GIT_ICON[git.level], 'sm')}${escapeHtml(label)}` } @@ -119,13 +124,13 @@ function gitHtml(git, short = false) { let BACKUP_FRESH_DAYS = 7 function cloudInfo(p) { const l = p.lastBackup - if (!l) return { level: 'red', short: 'nie', label: 'Backup: noch nie gesichert' } + if (!l) return { level: 'red', short: t('cloud.never'), label: t('cloud.neverLong') } const days = (Date.now() - new Date(l.at)) / 86400000 - const when = new Date(l.at).toLocaleString('de-DE', { dateStyle: 'medium', timeStyle: 'short' }) + const when = new Date(l.at).toLocaleString(I18N.locale(), { dateStyle: 'medium', timeStyle: 'short' }) const level = l.ok === false ? 'red' : days > BACKUP_FRESH_DAYS ? 'yellow' : 'green' - const extra = l.ok === false ? ' – unvollständig' : days > BACKUP_FRESH_DAYS ? ` – älter als ${BACKUP_FRESH_DAYS} Tage` : '' - const due = backupDue(p) ? ' · seitdem geändert: Backup fällig' : '' - return { level, short: timeAgo(l.at), label: `Backup: gesichert ${when} (${l.how})${extra}${due}` } + const extra = l.ok === false ? ' – ' + t('cloud.incomplete') : days > BACKUP_FRESH_DAYS ? ' – ' + t('cloud.olderThan', { n: BACKUP_FRESH_DAYS }) : '' + const due = backupDue(p) ? ' · ' + t('cloud.dueSince') : '' + return { level, short: timeAgo(l.at), label: t('cloud.savedAt', { when, how: l.how }) + extra + due } } // changed since the last backup (or never backed up) and that backup is older than the reminder time function backupDue(p) { @@ -147,18 +152,18 @@ function cloudChip(p) { // itch.io: p.published = { url, title, source: 'auto' | 'manual' } (server, lib/itch.js) function pubTitle(p) { const x = p.published - return x ? `Auf itch.io veröffentlicht${x.title ? `: ${x.title}` : ''} (${x.source === 'manual' ? 'manuell eingetragen' : 'automatisch erkannt'}) – Klick öffnet die Seite` : '' + return x ? t('pub.title', { title: x.title ? ': ' + x.title : '', src: x.source === 'manual' ? t('pub.manual') : t('pub.auto') }) : '' } // favorites: a star to toggle (tiles, panel) or a small mark (cards, rows) -const favMark = (p) => (p.favorite ? `${ic('star', 'sm')}` : '') -const favBtn = (p, cls = '') => `` +const favMark = (p) => (p.favorite ? `${ic('star', 'sm')}` : '') +const favBtn = (p, cls = '') => `` async function toggleFavorite(p) { try { const res = await fetch(`/api/projects/${encodeURIComponent(p.name)}`, { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ favorite: !p.favorite }), }) const r = await res.json().catch(() => ({})) - if (!res.ok) throw new Error(r.error ?? 'Speichern fehlgeschlagen') + if (!res.ok) throw new Error(r.error ?? t('err.saveFailed')) for (const x of [p, projects.find((y) => y.name === p.name), editing?.name === p.name ? editing : null]) if (x) x.favorite = r.favorite render() if (editing?.name === p.name) { @@ -166,7 +171,7 @@ async function toggleFavorite(p) { el.innerHTML = favBtn(editing) wireFav(el, editing) } - toast(r.favorite ? `${p.name} ist jetzt Favorit` : `${p.name} ist kein Favorit mehr`, 'star') + toast(r.favorite ? t('fav.now', { name: p.name }) : t('fav.not', { name: p.name }), 'star') } catch (e) { toast(e.message, 'triangle-alert') } } function wireFav(el, p) { @@ -187,23 +192,23 @@ function pubBadge(p) { function statusHtml(key) { const s = STATUS_BY[key] ?? STATUS[0] - return `${ic(s.icon, 'sm')}${s.label}` + return `${ic(s.icon, 'sm')}${t('status.' + s.key)}` } function prioHtml(prio) { const icon = prio === 'high' ? 'flame' : prio === 'low' ? 'chevron-down' : 'equal' - return `${ic(icon, 'sm')}${PRIO_LABEL[prio]}` + return `${ic(icon, 'sm')}${t('prio.' + prio)}` } // Which projects folder a project is from - only shown when several are on screen. // A project from a subfolder (scanner) also names the folder it lies in. function rootTag(p, short = false) { const parent = p.parent - ? `${ic('folder-tree', 'sm')}${short ? '' : ' '}${escapeHtml(p.parent.split('\\').pop())}` + ? `${ic('folder-tree', 'sm')}${short ? '' : ' '}${escapeHtml(p.parent.split('\\').pop())}` : '' if (!multiRoot() || !p.rootName) return parent const path = roots.find((r) => r.id === p.root)?.path ?? '' - return `${ic('folder', 'sm')}${short ? '' : ' '}${escapeHtml(p.rootName)}${parent}` + return `${ic('folder', 'sm')}${short ? '' : ' '}${escapeHtml(p.rootName)}${parent}` } function techChips(types) { @@ -212,11 +217,11 @@ function techChips(types) { function warnChips(p) { const b = [] - if (deletableMB(p) >= 100) b.push(`${ic('brush-cleaning', 'sm')}${fmtMB(deletableMB(p))}`) + if (deletableMB(p) >= 100) b.push(`${ic('brush-cleaning', 'sm')}${fmtMB(deletableMB(p))}`) if (p.tech?.needsInstall) b.push(`${ic('download', 'sm')}npm install`) - if (p.tools?.generators?.some((g) => g.kind === 'copy')) b.push(`${ic('copy', 'sm')}Generator-Kopie`) + if (p.tools?.generators?.some((g) => g.kind === 'copy')) b.push(`${ic('copy', 'sm')}${t('warn.genCopy')}`) else if (p.tools?.generators?.length) b.push(`${ic('wand-sparkles', 'sm')}ComfyGen`) - if (!p.hasIcon) b.push(`${ic('image-off', 'sm')}kein Icon`) + if (!p.hasIcon) b.push(`${ic('image-off', 'sm')}${t('warn.noIcon')}`) return b.join('') } @@ -227,6 +232,7 @@ let rootPaths = [] // all shown projects folders let roots = [] // registered projects folders [{ id, name, path }] let activeRoots = [] // ids of the shown ones (several possible) const multiRoot = () => activeRoots.length > 1 +let noneShown = false // deliberately no folder shown (dropdown "Keinen anzeigen") // optional features (Einstellungen → Allgemein → Funktionen) let FEATURES = { itch: false } const itchOn = () => !!FEATURES.itch @@ -243,12 +249,15 @@ async function load() { roots = data.roots ?? [] activeRoots = data.activeRoots ?? (data.activeRoot ? [data.activeRoot] : []) BACKUP_FRESH_DAYS = data.remindDays ?? 7 + noneShown = !!data.noneShown + document.getElementById('noneBox').hidden = !noneShown FEATURES = data.features ?? { itch: false } document.body.classList.toggle('no-itch', !itchOn()) renderRootPicker() if (editing) editing = projects.find((p) => p.name === editing.name) ?? editing render() renderBackupButton() + fitHeader() // folder name / backup count may have changed the width // "last change" dates are all known → the backup reminder can count if (!data.activityPending && backup) remindBackup() if (scanState?.running) pollScan() @@ -259,7 +268,7 @@ async function load() { // projects found in subfolders that were never looked at: one hint per session if (data.nestedHint > 0 && !load.nestedHinted && !data.setupNeeded) { load.nestedHinted = true - setTimeout(() => toast(`${data.nestedHint} ${data.nestedHint === 1 ? 'Projekt' : 'Projekte'} in Unterordnern gefunden – Klick zum Ansehen`, 'folder-tree', openNested), 1500) + setTimeout(() => toast(t(data.nestedHint === 1 ? 'nested.found1' : 'nested.foundN', { n: data.nestedHint }), 'folder-tree', openNested), 1500) } } @@ -270,14 +279,14 @@ const newDlg = document.getElementById('newDlg') function openNewProject(from = '') { closeEditor() const sel = document.getElementById('nFrom') - sel.innerHTML = `` + - [...projects].sort((a, b) => a.name.localeCompare(b.name, 'de')).map((p) => ``).join('') + sel.innerHTML = `` + + [...projects].sort((a, b) => a.name.localeCompare(b.name, 'de')).map((p) => ``).join('') sel.value = from document.getElementById('nRoot').innerHTML = roots.map((r) => ``).join('') // default: the folder of the template, else the first shown one document.getElementById('nRoot').value = projects.find((p) => p.name === from)?.root ?? activeRoots[0] ?? '' document.getElementById('nExcl').textContent = (settingsCache?.backup?.excludeDirs ?? ['node_modules', '__pycache__', '.venv']).join(', ') - document.getElementById('nName').value = from ? `${from} - Kopie` : '' + document.getElementById('nName').value = from ? `${from}${t('new.copySuffix')}` : '' document.getElementById('nError').style.display = 'none' syncNewDlg() newDlg.showModal() @@ -288,15 +297,17 @@ function syncNewDlg() { const clone = !!document.getElementById('nFrom').value document.getElementById('nCloneOpts').hidden = !clone document.getElementById('nEmptyHint').hidden = clone - document.getElementById('newTitle').textContent = clone ? 'Projekt klonen' : 'Neues Projekt' - document.querySelector('#nOk span').textContent = clone ? 'Klonen' : 'Anlegen' + document.getElementById('newTitle').textContent = clone ? t('dlg.new.titleClone') : t('dlg.new.title') + document.querySelector('#nOk span').textContent = clone ? t('dlg.new.clone') : t('dlg.new.create') } document.getElementById('nFrom').addEventListener('change', () => { const from = document.getElementById('nFrom').value const name = document.getElementById('nName') // keep a typed name, replace only the suggested one - if (!name.value.trim() || / - Kopie$/.test(name.value)) name.value = from ? `${from} - Kopie` : '' + const suffix = t('new.copySuffix') + const sfxRe = new RegExp(suffix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '$') + if (!name.value.trim() || sfxRe.test(name.value)) name.value = from ? `${from}${suffix}` : '' syncNewDlg() }) document.getElementById('nCancel').onclick = () => newDlg.close() @@ -311,7 +322,7 @@ const driveOf = (p) => (p.match(/^([A-Za-z]:|\\\\[^\\]+\\[^\\]+)/)?.[1] ?? '').t function openMove(p) { moving = p const from = roots.find((r) => r.id === p.root) - document.getElementById('mvFrom').textContent = `Jetzt: ${from ? `${from.path}\\` : ''}${p.folder ?? p.name}` + document.getElementById('mvFrom').textContent = t('move.now', { path: `${from ? `${from.path}\\` : ''}${p.folder ?? p.name}` }) document.getElementById('mvName').value = p.folder ?? p.name document.getElementById('mvRoot').innerHTML = roots.map((r) => ``).join('') document.getElementById('mvRoot').value = p.root ?? activeRoots[0] ?? '' @@ -334,18 +345,18 @@ document.getElementById('moveForm').addEventListener('submit', async (e) => { const err = document.getElementById('mvError') err.style.display = 'none' if (!document.getElementById('mvCopy').hidden && !document.getElementById('mvCopyOk').checked) { - err.innerHTML = `${ic('triangle-alert')}
Bitte bestätigen, dass kopiert und das Original danach gelöscht wird.
` + err.innerHTML = `${ic('triangle-alert')}
${t('move.confirmCopy')}
` err.style.display = '' return } const ok = document.getElementById('mvOk') ok.disabled = true - ok.querySelector('span').textContent = document.getElementById('mvCopy').hidden ? 'Wird umbenannt…' : 'Wird kopiert…' + ok.querySelector('span').textContent = document.getElementById('mvCopy').hidden ? t('move.renaming') : t('move.copying') try { const r = await postJson(api(moving.name, 'move'), { name: document.getElementById('mvName').value, root: document.getElementById('mvRoot').value }) moveDlg.close() closeEditor() - toast(r.shown ? `Jetzt: „${r.name}“ in „${r.rootName}“` : `„${r.name}“ nach „${r.rootName}“ verschoben (wird gerade nicht angezeigt)`, 'folder-pen') + toast(r.shown ? t('move.okShown', { name: r.name, root: r.rootName }) : t('move.okHidden', { name: r.name, root: r.rootName }), 'folder-pen') await load() const p = r.shown && projects.find((x) => x.name === r.key) if (p) openEditor(p) @@ -354,7 +365,7 @@ document.getElementById('moveForm').addEventListener('submit', async (e) => { err.style.display = '' } finally { ok.disabled = false - ok.querySelector('span').textContent = 'Übernehmen' + ok.querySelector('span').textContent = t('common.apply') } }) document.getElementById('newForm').addEventListener('submit', async (e) => { @@ -366,14 +377,14 @@ document.getElementById('newForm').addEventListener('submit', async (e) => { err.style.display = 'none' ok.disabled = true const label = ok.querySelector('span').textContent - ok.querySelector('span').textContent = from ? 'Wird kopiert…' : 'Wird angelegt…' + ok.querySelector('span').textContent = from ? t('move.copying') : t('new.creating') try { const r = await postJson('/api/projects/new', { name: document.getElementById('nName').value, root, from, withGit: document.getElementById('nGit').checked, skipBuild: document.getElementById('nSkipBuild').checked, }) newDlg.close() - toast(`${r.cloned ? 'Klon' : 'Projekt'} „${r.name}“ angelegt`, 'folder-plus') + toast(t(r.cloned ? 'new.clonedOk' : 'new.createdOk', { name: r.name }), 'folder-plus') if (r.shown) { await load() const p = projects.find((x) => x.name === r.key) @@ -397,40 +408,41 @@ const rootBtn = document.getElementById('rootBtn') function renderRootPicker() { const cur = roots.filter((r) => activeRoots.includes(r.id)) document.getElementById('rootName').textContent = - !cur.length ? 'Projekte' : cur.length === 1 ? cur[0].name : cur.length === roots.length && cur.length > 2 ? `Alle Ordner (${cur.length})` : cur.map((r) => r.name).join(' + ') - rootBtn.title = cur.length ? `Projektordner – angezeigt:\n${cur.map((r) => r.path).join('\n')}` : 'Projektordner wählen' + !cur.length ? (roots.length ? t('root.none') : t('root.projects')) : cur.length === 1 ? cur[0].name : cur.length === roots.length && cur.length > 2 ? t('root.allN', { n: cur.length }) : cur.map((r) => r.name).join(' + ') + rootBtn.title = cur.length ? t('root.shown', { list: cur.map((r) => r.path).join('\n') }) : t('root.switch') rootMenu.setAttribute('aria-multiselectable', 'true') rootMenu.innerHTML = roots.map((r) => { const on = activeRoots.includes(r.id) return `
- - +
` }).join('') + - (roots.length > 1 ? `` : '') + + (roots.length > 1 ? `` : '') + + (activeRoots.length ? `` : '') + `${roots.length ? '
' : ''}` + - (hasPicker ? `` : '') + - ` - - ` + (hasPicker ? `` : '') + + ` + + ` } // Adds folders via the server and (optionally) switches to the first new one. async function addRoots(paths, activate) { const r = await postJson('/api/roots/add', { paths, activate }) settingsCache = r - if (!r.added.length) { toast('Schon in der Liste', 'info'); return r } + if (!r.added.length) { toast(t('root.already'), 'info'); return r } if (activate) { closeEditor(); searchTerm = ''; document.getElementById('search').value = '' } await load() if (activate) await loadBackup() - toast(r.added.length === 1 ? `Projektordner „${r.added[0].name}“ hinzugefügt` : `${r.added.length} Projektordner hinzugefügt`, 'folder-plus') + toast(r.added.length === 1 ? t('root.added1', { name: r.added[0].name }) : t('root.addedN', { n: r.added.length }), 'folder-plus') return r } // "Ordner hinzufügen…" (desktop app): folder dialog → add → switch to it async function addRootByPicker() { - const chosen = await pickFolder('Ordner mit Projekten wählen', rootDir) + const chosen = await pickFolder(t('pick.projectsFolder'), rootDir) if (!chosen) return try { await addRoots([chosen], true) } catch (e) { toast(e.message, 'triangle-alert') } } @@ -466,7 +478,7 @@ document.getElementById('rdList').onclick = listRootImport document.getElementById('rdPath').addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); listRootImport() } }) document.getElementById('rdPick').onclick = async () => { const input = document.getElementById('rdPath') - const chosen = await pickFolder('Übergeordneten Ordner wählen', input.value) + const chosen = await pickFolder(t('pick.parentFolder'), input.value) if (chosen) { input.value = chosen; listRootImport() } } document.getElementById('rdClose').onclick = () => rootDlg.close() @@ -481,7 +493,7 @@ function toggleRootMenu(open = rootMenu.hidden) { async function showRoots(ids, keepOpen = false) { if (!keepOpen) toggleRootMenu(false) ids = roots.map((r) => r.id).filter((id) => ids.includes(id)) - if (!ids.length || ids.join('|') === activeRoots.join('|')) return + if (ids.join('|') === activeRoots.join('|')) return // [] = show no folder (empty dashboard) const prev = activeRoots activeRoots = ids // tick right away; the projects follow when loaded renderRootPicker() @@ -492,7 +504,7 @@ async function showRoots(ids, keepOpen = false) { document.getElementById('search').value = '' await load() await loadBackup() - if (!keepOpen) toast(`Projektordner: ${roots.filter((r) => ids.includes(r.id)).map((r) => r.name).join(' + ')}`, 'folder-open') + if (!keepOpen) toast(ids.length ? t('root.showing', { list: roots.filter((r) => ids.includes(r.id)).map((r) => r.name).join(' + ') }) : t('root.noneShown'), 'folder-open') } catch (e) { activeRoots = prev renderRootPicker() @@ -510,10 +522,10 @@ rootMenu.addEventListener('click', (e) => { if (b.hasAttribute('data-root-import')) { toggleRootMenu(false); openRootImport(); return } if (b.hasAttribute('data-root-nested')) { toggleRootMenu(false); openNested(); return } if (b.hasAttribute('data-root-all')) { showRoots(roots.map((r) => r.id)); return } + if (b.hasAttribute('data-root-none')) { showRoots([]); return } const t = b.dataset.rootToggle if (t) { const next = activeRoots.includes(t) ? activeRoots.filter((x) => x !== t) : [...activeRoots, t] - if (!next.length) return toast('Mindestens ein Ordner bleibt angezeigt', 'info') showRoots(next, true) return } @@ -553,7 +565,7 @@ function showAppSettings(m) { if (appSettingsSent) { const what = appSettingsSent appSettingsSent = null - toast(what === 'tray' ? (m.tray ? 'Läuft beim Schließen im Hintergrund weiter' : 'Schließen beendet das Dashboard') : (m.autostart ? 'Startet mit Windows' : 'Startet nicht mehr mit Windows'), 'app-window') + toast(what === 'tray' ? (m.tray ? t('tray.on') : t('tray.off')) : (m.autostart ? t('autostart.on') : t('autostart.off')), 'app-window') } } if (hasPicker) { @@ -593,7 +605,7 @@ async function openSettings(setup) { document.getElementById('fAutoInt').value = au.interval document.getElementById('fAutoTime').value = au.time document.getElementById('fAutoDay').value = String(au.weekday) - document.getElementById('fAutoTarget').innerHTML = `` + + document.getElementById('fAutoTarget').innerHTML = `` + (s.backup?.targets ?? []).map((t) => ``).join('') document.getElementById('fAutoTarget').value = au.target if (!document.getElementById('fAutoTarget').value) document.getElementById('fAutoTarget').value = 'all' @@ -604,12 +616,12 @@ async function openSettings(setup) { syncFeatures() if (s.features?.itch) loadItchStatus() document.getElementById('spData').innerHTML = s.dataDir - ? `
Einstellungen
${escapeHtml(s.dataDir)}
-
Scan- & Backup-Stand
im selben Ordner (scan.json, backup.json)
-
Darstellung
Hell / System / Dunkel – oben rechts in der Leiste
` + ? `
${t('data.settings')}
${escapeHtml(s.dataDir)}
+
${t('data.scanBackup')}
${t('data.sameFolder')}
+
${t('data.appearance')}
${t('data.appearanceVal')}
` : '' document.getElementById('spWelcome').style.display = setup ? '' : 'none' - document.getElementById('spTitle').textContent = setup ? 'Einrichten' : 'Einstellungen' + document.getElementById('spTitle').textContent = setup ? t('set.setup') : t('set.title') document.getElementById('spError').style.display = 'none' for (const b of document.querySelectorAll('#spTabs button')) b.classList.remove('has-err') setSettingsTab('folders') @@ -626,7 +638,7 @@ async function openSettings(setup) { async function loadItchStatus(refresh = false) { const el = document.getElementById('spItch') el.className = 'spstatus' - el.innerHTML = `${ic('loader')}
itch.io wird gelesen…
` + el.innerHTML = `${ic('loader')}
${t('itch.reading')}
` try { const r = refresh ? await postJson('/api/itch/refresh', {}) : await (await fetch('/api/itch')).json() if (!r.profile) { el.innerHTML = ''; return } @@ -634,8 +646,8 @@ async function loadItchStatus(refresh = false) { el.className = `spstatus ${r.error ? 'err' : 'ok'}` el.innerHTML = r.error ? `${ic('triangle-alert')}
${escapeHtml(r.error)}
` - : `${ic('circle-check')}
${r.games.length} Spiele gefunden.` + - (un.length ? ` Ohne Projekt: ${un.map((g) => `${escapeHtml(g.title)}`).join(', ')} – im Projekt unter „Bearbeiten“ den Link eintragen.` : ' Alle einem Projekt zugeordnet.') + '
' + : `${ic('circle-check')}
${t('itch.found', { n: r.games.length })}` + + (un.length ? ' ' + t('itch.unmatched', { list: un.map((g) => `${escapeHtml(g.title)}`).join(', ') }) : ' ' + t('itch.allMatched')) + '
' } catch (e) { el.className = 'spstatus err'; el.textContent = e.message } } document.getElementById('btnItchRefresh').onclick = async () => { await loadItchStatus(true); load() } @@ -678,7 +690,7 @@ async function saveSettings() { settingsSetup = false document.getElementById('spanel').classList.remove('dirty') closeSettings() - toast('Einstellungen gespeichert', 'save') + toast(t('set.saved'), 'save') await loadBackup() await load() } catch (e) { @@ -704,20 +716,20 @@ document.getElementById('fAutoInt').addEventListener('change', syncAuto) // "heute 20:00", "morgen 20:00", "Fr., 14.11. 20:00" function fmtWhen(iso) { const d = new Date(iso), now = new Date() - const time = d.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }) - if (d - now < 60000) return 'gleich' + const time = d.toLocaleTimeString(I18N.locale(), { hour: '2-digit', minute: '2-digit' }) + if (d - now < 60000) return t('when.soon') const day = (x) => new Date(x.getFullYear(), x.getMonth(), x.getDate()).getTime() const diff = Math.round((day(d) - day(now)) / 86400000) - return diff === 0 ? `heute ${time}` : diff === 1 ? `morgen ${time}` : `${d.toLocaleDateString('de-DE', { weekday: 'short', day: 'numeric', month: 'numeric' })} ${time}` + return diff === 0 ? t('when.today', { time }) : diff === 1 ? t('when.tomorrow', { time }) : `${d.toLocaleDateString(I18N.locale(), { weekday: 'short', day: 'numeric', month: 'numeric' })} ${time}` } function renderAutoStatus() { const el = document.getElementById('spAuto') const sch = backup?.schedule if (!sch || sch.interval === 'off') { el.className = 'spstatus'; el.innerHTML = ''; return } const r = sch.lastResult - const last = r ? (r.ok ? `Zuletzt erfolgreich ${timeAgo(r.at)}.` : `Letzter Versuch ${timeAgo(r.at)} fehlgeschlagen – ${escapeHtml(r.targets.filter((t) => !t.ok).map((t) => `${t.name}: ${t.error ?? 'Fehler'}`).join('; '))}`) : 'Noch nie automatisch gesichert.' + const last = r ? (r.ok ? t('auto.lastOk', { ago: timeAgo(r.at) }) : t('auto.lastFail', { ago: timeAgo(r.at), detail: escapeHtml(r.targets.filter((x) => !x.ok).map((x) => `${x.name}: ${x.error ?? t('auto.error')}`).join('; ')) })) : t('auto.never') el.className = `spstatus ${r && !r.ok ? 'err' : r ? 'ok' : ''}` - el.innerHTML = `${ic(sch.running ? 'loader' : r && !r.ok ? 'triangle-alert' : 'calendar-clock')}
${sch.running ? 'Läuft gerade. ' : sch.next ? `Nächstes automatisches Backup: ${fmtWhen(sch.next)}. ` : ''}${last}
` + el.innerHTML = `${ic(sch.running ? 'loader' : r && !r.ok ? 'triangle-alert' : 'calendar-clock')}
${sch.running ? '' + t('auto.running') + ' ' : sch.next ? t('auto.next', { when: `${fmtWhen(sch.next)}` }) + ' ' : ''}${last}
` } /* settings tabs, dirty marker, Ctrl+S */ @@ -739,7 +751,7 @@ function setSettingsTab(tab) { } for (const b of document.querySelectorAll('#spTabs button')) b.onclick = () => setSettingsTab(b.dataset.stab) const markSettingsDirty = () => document.getElementById('spanel').classList.add('dirty') -document.getElementById('spanel').addEventListener('input', (e) => { if (!e.target.closest('#fImport, #appWin')) markSettingsDirty() }) +document.getElementById('spanel').addEventListener('input', (e) => { if (!e.target.closest('#fImport, #appWin') && e.target.id !== 'fLang') markSettingsDirty() }) document.addEventListener('keydown', (e) => { if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 's' && document.getElementById('spanel').classList.contains('open')) { e.preventDefault() @@ -775,19 +787,19 @@ function settingsItem(kind, x, placeholder) { return `
${ic(isRoot ? 'folder' : 'hard-drive')}
-
- +
+
- - - + + +
` } -const rootRow = (r = { id: '', name: '', path: '' }) => settingsItem('root', r, 'z. B. D:\\Projekte') -const targetRow = (t = { id: '', name: '', path: '' }) => settingsItem('target', t, 'z. B. E:\\Backup\\Projekte oder \\\\NAS\\Freigabe\\Projekte') +const rootRow = (r = { id: '', name: '', path: '' }) => settingsItem('root', r, t('row.phRoot')) +const targetRow = (x = { id: '', name: '', path: '' }) => settingsItem('target', x, t('row.phTarget')) // badges and info lines depend on the order (first = main folder / default target) function refreshSettingsRows() { @@ -797,21 +809,21 @@ function refreshSettingsRows() { const name = row.querySelector('.tname').value.trim() || folderName(row.querySelector('.tpath').value.trim()) const n = id && shownRootIds.includes(id) ? projects.filter((p) => p.root === id).length : null row.querySelector('.sbadges').innerHTML = - (i === 0 ? `${ic('star')}Hauptordner ` : '') + - (id && shownRootIds.includes(id) ? `${ic('eye')}angezeigt` : '') + (i === 0 ? `${ic('star')}${t('row.main')} ` : '') + + (id && shownRootIds.includes(id) ? `${ic('eye')}${t('row.shown')}` : '') row.querySelector('.sstat').innerHTML = row.querySelector('.tpath').value.trim() - ? `${n != null ? `${n} Projekte` : ''}${i === 0 ? 'Backup direkt ins Ziel' : `Backup in Unterordner „${escapeHtml(name)}“`}` - : 'Pfad eintragen oder Ordner wählen' + ? `${n != null ? `${t('row.nProjects', { n })}` : ''}${i === 0 ? t('row.backupDirect') : t('row.backupSub', { name: escapeHtml(name) })}` + : `${t('row.enterPath')}` row.querySelector('[data-up]').disabled = i === 0 }) const trows = [...document.querySelectorAll('#fTargets .trow')] trows.forEach((row, i) => { - const st = backup?.targets?.find((t) => t.id === row.dataset.id) + const st = backup?.targets?.find((x) => x.id === row.dataset.id) const last = st?.last row.querySelector('.sbadges').innerHTML = - (i === 0 ? `Standard ` : '') + - (!row.dataset.id ? '' : last ? `${last.ok ? 'gesichert' : 'unvollständig'} ${timeAgo(last.at)}` : 'noch nie komplett') - row.querySelector('.sstat').innerHTML = row.dataset.id ? '' : 'Neu – wird beim Speichern geprüft' + (i === 0 ? `${t('row.default')} ` : '') + + (!row.dataset.id ? '' : last ? `${last.ok ? t('row.saved') : t('row.incomplete')} ${timeAgo(last.at)}` : `${t('row.neverComplete')}`) + row.querySelector('.sstat').innerHTML = row.dataset.id ? '' : `${t('row.newChecked')}` row.querySelector('[data-up]').disabled = i === 0 }) document.getElementById('spnFolders').textContent = rows.length || '' @@ -854,7 +866,7 @@ const exInput = document.getElementById('fExInput') function addExChip(v) { v = v.trim() if (!v || getExDirs(false).some((x) => x.toLowerCase() === v.toLowerCase())) return - exInput.insertAdjacentHTML('beforebegin', `${escapeHtml(v)}`) + exInput.insertAdjacentHTML('beforebegin', `${escapeHtml(v)}`) } function setExDirs(list) { for (const c of exBox.querySelectorAll('.xchip')) c.remove() @@ -900,7 +912,7 @@ function listImport() { onAdd: (picked) => { for (const p of picked) addRootRow({ id: '', name: folderName(p), path: p }) document.getElementById('fImport').hidden = true - toast(`${picked.length} Projektordner hinzugefügt – Speichern nicht vergessen`, 'folder-plus') + toast(t('import.addedRemember', { n: picked.length }), 'folder-plus') }, }) } @@ -910,7 +922,7 @@ function listImport() { async function importList({ dir, body, have, onAdd }) { dir = (dir ?? '').trim() if (!dir) return - body.innerHTML = `
${ic('loader', 'sm')} wird gelesen…
` + body.innerHTML = `
${ic('loader', 'sm')} ${t('import.reading')}
` try { const res = await fetch(`/api/subfolders?path=${encodeURIComponent(dir)}`) const r = await res.json() @@ -918,14 +930,14 @@ async function importList({ dir, body, have, onAdd }) { const haveSet = new Set(have) const known = (p) => haveSet.has(p.toLowerCase().replace(/[\\/]+$/, '')) const item = (f, label, extra, self = false) => `` + ${ic('folder', 'sm')}${label}${known(f.path) ? t('import.already') : extra}` body.innerHTML = `
- ${item({ path: r.path }, `Diesen Ordner selbst (${escapeHtml(folderName(r.path))})`, `${r.folders.length} Projekte`, true)} - ${r.folders.map((f) => item(f, escapeHtml(f.name), `${f.count} Unterordner`)).join('') || '
Keine Unterordner.
'} + ${item({ path: r.path }, `${t('import.thisFolder')} (${escapeHtml(folderName(r.path))})`, t('import.nProjects', { n: r.folders.length }), true)} + ${r.folders.map((f) => item(f, escapeHtml(f.name), t('import.nSub', { n: f.count }))).join('') || `
${t('import.noSub')}
`}
- - + +
` body.querySelector('[data-imp-all]').onclick = () => { const boxes = [...body.querySelectorAll('input:not(:disabled):not([data-self])')] @@ -934,7 +946,7 @@ async function importList({ dir, body, have, onAdd }) { } body.querySelector('[data-imp-add]').onclick = async (e) => { const picked = [...body.querySelectorAll('input:checked:not(:disabled)')].map((c) => c.dataset.path) - if (!picked.length) return toast('Nichts ausgewählt', 'info') + if (!picked.length) return toast(t('import.nothingSelected'), 'info') const btn = e.currentTarget btn.disabled = true try { await onAdd(picked); body.innerHTML = '' } finally { btn.disabled = false } @@ -967,7 +979,7 @@ async function postJson(url, body) { try { data = await res.json() } catch {} if (!res.ok) { // a route the running server doesn't know yet: it's older than this page - if (res.status === 404 && !data.error) { checkVersion(); throw new Error('Der Server ist veraltet – oben „Neu starten“ klicken.') } + if (res.status === 404 && !data.error) { checkVersion(); throw new Error(t('err.serverStale')) } throw new Error(data.error ?? `HTTP ${res.status}`) } return data @@ -984,16 +996,17 @@ async function checkVersion() { v = res.status === 404 ? { stale: true } : await res.json() } catch { return } if (uiStampAtLoad === null) uiStampAtLoad = v.uiStamp ?? 0 + if (v.version) { const el = document.getElementById('spVersion'); if (el) el.textContent = 'v' + v.version } const banner = document.getElementById('updBanner') const btn = document.getElementById('updBtn') if (v.stale) { - document.getElementById('updText').textContent = 'Das Dashboard wurde aktualisiert – der Server muss neu starten, damit alles funktioniert.' - btn.innerHTML = `${ic('refresh-cw')}Neu starten` + document.getElementById('updText').textContent = t('upd.serverStale') + btn.innerHTML = `${ic('refresh-cw')}${t('upd.restart')}` btn.onclick = restartServer banner.hidden = false } else if (v.uiStamp > uiStampAtLoad) { - document.getElementById('updText').textContent = 'Neue Version der Oberfläche – Seite neu laden.' - btn.innerHTML = `${ic('refresh-cw')}Neu laden` + document.getElementById('updText').textContent = t('upd.uiNew') + btn.innerHTML = `${ic('refresh-cw')}${t('upd.reload')}` btn.onclick = () => location.reload() banner.hidden = false } else banner.hidden = true @@ -1001,14 +1014,14 @@ async function checkVersion() { async function restartServer() { const btn = document.getElementById('updBtn') btn.disabled = true - btn.innerHTML = `${ic('loader')}Startet neu…` + btn.innerHTML = `${ic('loader')}${t('upd.restarting')}` try { let before = null try { before = (await (await fetch('/api/version', { cache: 'no-store' })).json()).pid } catch {} const r = await fetch('/api/restart', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{}' }) if (r.status === 409) throw new Error((await r.json()).error) // a server from before this feature has no restart: it must be closed by hand - if (!r.ok) throw new Error('Dieser Server kann sich noch nicht selbst neu starten – Dashboard einmal schließen und wieder öffnen.') + if (!r.ok) throw new Error(t('upd.noRestart')) const until = Date.now() + 20000 while (Date.now() < until) { await new Promise((ok) => setTimeout(ok, 700)) @@ -1017,11 +1030,11 @@ async function restartServer() { if (v.pid && v.pid !== before) { location.reload(); return } } catch {} } - throw new Error('Server antwortet nicht – Dashboard schließen und wieder öffnen.') + throw new Error(t('upd.noResponse')) } catch (e) { toast(e.message, 'triangle-alert') btn.disabled = false - btn.innerHTML = `${ic('refresh-cw')}Neu starten` + btn.innerHTML = `${ic('refresh-cw')}${t('upd.restart')}` } } checkVersion() @@ -1054,24 +1067,25 @@ function toast(text, icon = 'info', onClick = null) { const runAction = async (name, id) => { try { const r = await postJson(api(name, 'run'), { id }) - toast(`Gestartet: ${r.label}`, 'play') + toast(t('action.started', { label: r.label }), 'play') } catch (e) { toast(e.message, 'triangle-alert') } } /* ── filtering & sorting ──────────────────────────────────────────────── */ +// label is a translation key (resolved with t() at render time) const QUICK = [ - { key: 'all', label: 'Alle', icon: 'layers', test: () => true }, - { key: 'nobackup', label: 'Ohne Remote', icon: 'cloud-off', test: (p) => p.git.level === 'red' }, - { key: 'unsaved', label: 'Ungesichert', icon: 'cloud-upload', test: (p) => p.git.level === 'yellow' }, - { key: 'due', label: 'Backup fällig', icon: 'clock-alert', test: backupDue }, - { key: 'cleanable', label: 'Aufräumbar', icon: 'brush-cleaning', test: (p) => deletableMB(p) >= 100 }, - { key: 'install', label: 'npm install', icon: 'download', test: (p) => p.tech?.needsInstall }, - { key: 'noicon', label: 'Ohne Icon', icon: 'image-off', test: (p) => !p.hasIcon }, - { key: 'gencopy', label: 'Generator-Kopie', icon: 'copy', test: (p) => p.tools?.generators?.some((g) => g.kind === 'copy') }, - { key: 'fav', label: 'Favoriten', icon: 'star', test: (p) => !!p.favorite }, - { key: 'itch', label: 'itch.io', icon: 'rocket', feature: 'itch', test: (p) => !!p.published }, - { key: 'noitch', label: 'Fertig, nicht auf itch', icon: 'circle-off', feature: 'itch', test: (p) => p.status === 'done' && !p.published }, + { key: 'all', label: 'quick.all', icon: 'layers', test: () => true }, + { key: 'nobackup', label: 'quick.nobackup', icon: 'cloud-off', test: (p) => p.git.level === 'red' }, + { key: 'unsaved', label: 'quick.unsaved', icon: 'cloud-upload', test: (p) => p.git.level === 'yellow' }, + { key: 'due', label: 'quick.due', icon: 'clock-alert', test: backupDue }, + { key: 'cleanable', label: 'quick.cleanable', icon: 'brush-cleaning', test: (p) => deletableMB(p) >= 100 }, + { key: 'install', label: 'quick.install', icon: 'download', test: (p) => p.tech?.needsInstall }, + { key: 'noicon', label: 'quick.noicon', icon: 'image-off', test: (p) => !p.hasIcon }, + { key: 'gencopy', label: 'quick.gencopy', icon: 'copy', test: (p) => p.tools?.generators?.some((g) => g.kind === 'copy') }, + { key: 'fav', label: 'quick.fav', icon: 'star', test: (p) => !!p.favorite }, + { key: 'itch', label: 'quick.itch', icon: 'rocket', feature: 'itch', test: (p) => !!p.published }, + { key: 'noitch', label: 'quick.noitch', icon: 'circle-off', feature: 'itch', test: (p) => p.status === 'done' && !p.published }, ] function matchesSearch(p) { @@ -1105,20 +1119,20 @@ function sortProjects(items) { /* ── header: KPIs, quick filters ──────────────────────────────────────── */ function renderKpis() { - const t = totals ?? { sizeMB: 0, cacheMB: 0, allMB: 0, scanned: 0, noBackup: 0 } + const tot = totals ?? { sizeMB: 0, cacheMB: 0, allMB: 0, scanned: 0, noBackup: 0 } const active = projects.filter((p) => p.status === 'active').length const running = scanState?.running const pct = running && scanState.total ? Math.round((scanState.done / scanState.total) * 100) : 0 document.getElementById('kpis').innerHTML = ` -
${ic('layers', 'lg')}
${projects.length}
Projekte · ${active} aktiv
-
${ic('shield-alert', 'lg')}
${t.noBackup}
ohne Git-Remote
-
${ic('hard-drive', 'lg')}
${t.scanned ? fmtMB(t.sizeMB) : '–'}
${t.scanned ? `belegt (${t.scanned} gescannt)` : 'noch nicht gescannt'}
-
${ic('brush-cleaning', 'lg')}
${t.scanned ? fmtMB(t.allMB) : '–'}
${t.scanned ? `aufräumbar · Cache ${fmtMB(t.cacheMB)}` : 'aufräumbar'}
+
${ic('layers', 'lg')}
${projects.length}
${t('kpi.projects', { n: active })}
+
${ic('shield-alert', 'lg')}
${tot.noBackup}
${t('kpi.noRemote')}
+
${ic('hard-drive', 'lg')}
${tot.scanned ? fmtMB(tot.sizeMB) : '–'}
${tot.scanned ? t('kpi.used', { n: tot.scanned }) : t('kpi.notScanned')}
+
${ic('brush-cleaning', 'lg')}
${tot.scanned ? fmtMB(tot.allMB) : '–'}
${tot.scanned ? t('kpi.cleanableCache', { cache: fmtMB(tot.cacheMB) }) : t('kpi.cleanable')}
- + ${running ? `
${escapeHtml(scanState.current.join(', '))}
` - : scanState?.error ? `
${ic('triangle-alert', 'sm')} Scan-Fehler
` - : '
Größe & löschbare Ordner messen
'} + : scanState?.error ? `
${ic('triangle-alert', 'sm')} ${t('kpi.scanError')}
` + : `
${t('kpi.scanHint')}
`}
` document.getElementById('btnScanAll').onclick = () => startScan(null) for (const el of document.querySelectorAll('.kpi[data-quick]')) { @@ -1133,14 +1147,14 @@ function renderQuickFilters() { document.getElementById('chipfilters').innerHTML = QUICK.filter((q) => !q.feature || FEATURES[q.feature]).map((q) => { const n = base.filter(q.test).length if (q.key !== 'all' && n === 0 && quickFilter !== q.key) return '' - return `` + return `` }).join('') for (const b of document.querySelectorAll('.fchip')) b.onclick = () => { quickFilter = b.dataset.q; render() } } function render() { - document.getElementById('count').textContent = !rootDir ? 'Noch kein Projektordner gewählt' - : rootPaths.length > 1 ? `${projects.length} Projekte aus ${rootPaths.length} Ordnern` : `${projects.length} Ordner unter ${rootDir}` + document.getElementById('count').textContent = noneShown ? t('count.none') : !rootDir ? t('count.noFolder') + : rootPaths.length > 1 ? t('count.multi', { n: projects.length, folders: rootPaths.length }) : t('count.single', { n: projects.length, dir: rootDir }) renderKpis() renderQuickFilters() updateToolbarForView() @@ -1171,7 +1185,7 @@ function pollScan() { else { await load() if (editing) loadDetails(editing.name) - toast('Scan fertig', 'circle-check') + toast(t('scan.done'), 'circle-check') } }, 1500) } @@ -1191,7 +1205,7 @@ async function startScan(name) { // p.quickStart comes from the server: own start command, main exe or first start action function quickStartTitle(p) { const q = p.quickStart - return q ? `Starten: ${q.label}${q.detail ? ` (${q.detail})` : ''}` : '' + return q ? t('qs.start', { label: q.label }) + (q.detail ? ` (${q.detail})` : '') : '' } function qsButton(p) { if (!p.quickStart) return '' @@ -1200,8 +1214,8 @@ function qsButton(p) { // Card/row corner: [VS Code] [▶]. placeholder keeps rows aligned when a project has no ▶. // explorer: also an [Explorer] button in front. function qsGroup(p, placeholder = false, explorer = false) { - const ex = explorer ? `` : '' - const vs = `` + const ex = explorer ? `` : '' + const vs = `` return `${ex}${vs}${qsButton(p) || (placeholder ? '' : '')}` } function wireQuickStart(el, p) { @@ -1231,7 +1245,7 @@ function setBoardMode(mode) { function rowHtml(p) { const c = cloudInfo(p) const open = (p.tasks ?? []).filter((t) => !t.done).length - const prioTitle = `Priorität ${PRIO_LABEL[p.priority]}` + const prioTitle = t('prio.titled', { p: t('prio.' + p.priority) }) return `
${avatar(p)} @@ -1243,7 +1257,7 @@ function rowHtml(p) { ${ic('file-pen', 'sm')}${fmtDate(lastActivity(p))}${fmtDate(lastActivity(p), false)} ${ic(GIT_ICON[p.git.level], 'sm')} ${ic('hard-drive', 'sm')} - ${open ? `${ic('list-checks', 'sm')}${open}` : ''} + ${open ? `${ic('list-checks', 'sm')}${open}` : ''} ${p.published ? `${ic('rocket', 'sm')}` : ''}
@@ -1282,7 +1296,7 @@ function renderBoard() { const colEl = document.createElement('div') colEl.className = 'column' - colEl.innerHTML = `

${ic(col.icon, 'sm')}${col.label}${items.length}

` + colEl.innerHTML = `

${ic(col.icon, 'sm')}${t('status.' + col.key)}${items.length}

` colEl.addEventListener('dragover', (e) => { e.preventDefault(); colEl.classList.add('drag-over') }) colEl.addEventListener('dragleave', () => colEl.classList.remove('drag-over')) colEl.addEventListener('drop', async (e) => { @@ -1291,7 +1305,7 @@ function renderBoard() { const name = e.dataTransfer.getData('text/plain') const project = projects.find((p) => p.name === name) if (!project || project.status === col.key) return - if (await patchProject(name, { status: col.key })) { toast(`${name} → ${col.label}`, col.icon); load() } + if (await patchProject(name, { status: col.key })) { toast(`${name} → ${t('status.' + col.key)}`, col.icon); load() } }) // cards live in their own scroll area, so the page never grows const cardsEl = document.createElement('div') @@ -1319,7 +1333,7 @@ function renderBoard() { function renderGallery() { const grid = document.getElementById('galleryGrid') const items = sortProjects(visibleProjects()) - if (!items.length) { grid.innerHTML = `
${ic('search-x', 'xl')}
Keine Projekte gefunden.
`; return } + if (!items.length) { grid.innerHTML = `
${ic('search-x', 'xl')}
${t('empty.noProjects')}
`; return } grid.innerHTML = '' for (const p of items) { const tile = document.createElement('div') @@ -1347,17 +1361,18 @@ function renderGallery() { /* ── list ─────────────────────────────────────────────────────────────── */ // cls: used by CSS container queries to hide columns in narrow windows +// label is a translation key (resolved with t() at render time; '' = no header) const LIST_COLS = [ - { label: 'Projekt', sort: 'name' }, { label: 'Status', cls: 'c-status' }, { label: 'Git' }, { label: 'Backup' }, { label: 'Technik', cls: 'c-tech' }, - { label: 'Größe', sort: 'size', num: true }, { label: 'Aufräumbar', sort: 'clean', num: true, cls: 'c-clean' }, - { label: 'Aktivität', sort: 'mtime', cls: 'c-act' }, { label: '' }, + { label: 'col.project', sort: 'name' }, { label: 'col.status', cls: 'c-status' }, { label: 'col.git' }, { label: 'col.backup' }, { label: 'col.tech', cls: 'c-tech' }, + { label: 'col.size', sort: 'size', num: true }, { label: 'col.cleanable', sort: 'clean', num: true, cls: 'c-clean' }, + { label: 'col.activity', sort: 'mtime', cls: 'c-act' }, { label: '' }, ] function renderList() { const table = document.getElementById('listTable') const items = sortProjects(visibleProjects()) const sort = document.getElementById('fltSort').value - table.innerHTML = `${LIST_COLS.map((c) => `${c.label}${c.sort === sort ? ' ' + ic('arrow-down', 'sm') : ''}`).join('')} + table.innerHTML = `${LIST_COLS.map((c) => `${c.label ? t(c.label) : ''}${c.sort === sort ? ' ' + ic('arrow-down', 'sm') : ''}`).join('')} ${items.map((p) => `
${avatar(p)}${favMark(p)}${escapeHtml(p.name)}${rootTag(p, true)}
${statusHtml(p.status)}${pubChip(p, true)}
@@ -1372,7 +1387,7 @@ function renderList() { -
`).join('') || `Keine Projekte gefunden.`}` + `).join('') || `${t('empty.noProjects')}`}` for (const th of table.querySelectorAll('th[data-sort]')) { th.onclick = () => { document.getElementById('fltSort').value = th.dataset.sort; render() } } @@ -1424,32 +1439,55 @@ for (const b of document.querySelectorAll('#modeSeg button')) b.onclick = () => // "Projekte" page of the simple view: status pills + tiles, newest first let homeStatus = 'all' +// layout: cards (big tiles) · compact (small tiles) · list (one row each); sort: like the toolbar +const HL_STORE = (key, allowed, dflt) => { try { const v = localStorage.getItem(key); return allowed.includes(v) ? v : dflt } catch { return dflt } } +let homeLayout = HL_STORE('dash.homeLayout', ['cards', 'compact', 'list'], 'cards') +let homeSort = HL_STORE('dash.homeSort', ['mtime', 'name', 'size'], 'mtime') +// label is a translation key (resolved with t() at render time) const HOME_PILLS = [ - { key: 'all', label: 'Alle', test: (p) => p.status !== 'archived' }, - { key: 'active', label: 'Aktiv' }, { key: 'idea', label: 'Ideen' }, { key: 'paused', label: 'Pausiert' }, - { key: 'done', label: 'Fertig' }, { key: 'archived', label: 'Archiv' }, + { key: 'all', label: 'home.all', test: (p) => p.status !== 'archived' }, + { key: 'due', label: 'quick.due', test: (p) => backupDue(p), cls: 'due' }, + { key: 'active', label: 'status.active' }, { key: 'idea', label: 'home.ideas' }, { key: 'paused', label: 'status.paused' }, + { key: 'done', label: 'status.done' }, { key: 'archived', label: 'home.archive' }, ] const pillTest = (q) => q.test ?? ((p) => p.status === q.key) +function sortHome(items) { + return [...items].sort((a, b) => { + if (homeSort === 'name') return a.name.localeCompare(b.name, 'de', { sensitivity: 'base' }) + if (homeSort === 'size') return (b.storage?.sizeMB ?? -1) - (a.storage?.sizeMB ?? -1) + return new Date(lastActivity(b)) - new Date(lastActivity(a)) + }) +} +const HL_SEG = [{ k: 'cards', ic: 'layout-grid', key: 'home.cards' }, { k: 'compact', ic: 'grid-2x2', key: 'home.compact' }, { k: 'list', ic: 'list', key: 'home.list' }] +const HL_SORT = [{ k: 'mtime', key: 'flt.sort.mtime' }, { k: 'name', key: 'flt.sort.name' }, { k: 'size', key: 'flt.sort.size' }] function renderHome() { const base = projects.filter(matchesSearch) - document.getElementById('homeBar').innerHTML = HOME_PILLS.map((q) => { + const pills = HOME_PILLS.map((q) => { const n = base.filter(pillTest(q)).length if (q.key !== 'all' && !n && homeStatus !== q.key) return '' - return `` + return `` }).join('') + const ctl = `
+ +
${HL_SEG.map((o) => ``).join('')}
+
` + document.getElementById('homeBar').innerHTML = pills + ctl for (const b of document.querySelectorAll('#homeBar .hpill')) b.onclick = () => { homeStatus = b.dataset.hs; renderHome() } + document.getElementById('homeSortSel').onchange = (e) => { homeSort = e.target.value; try { localStorage.setItem('dash.homeSort', homeSort) } catch {}; renderHome() } + for (const b of document.querySelectorAll('#homeBar .hseg button')) b.onclick = () => { homeLayout = b.dataset.hl; try { localStorage.setItem('dash.homeLayout', homeLayout) } catch {}; renderHome() } const pill = HOME_PILLS.find((q) => q.key === homeStatus) ?? HOME_PILLS[0] - const items = base.filter(pillTest(pill)).sort((a, b) => new Date(lastActivity(b)) - new Date(lastActivity(a))) + const items = sortHome(base.filter(pillTest(pill))) const grid = document.getElementById('homeGrid') - if (!items.length) { grid.innerHTML = `
${ic('search-x', 'xl')}
Keine Projekte gefunden.
`; return } + grid.className = homeLayout === 'cards' ? '' : homeLayout + if (!items.length) { grid.innerHTML = `
${ic('search-x', 'xl')}
${t('empty.noProjects')}
`; return } grid.innerHTML = '' // "Alle": favorites get their own row on top const favs = homeStatus === 'all' ? items.filter((p) => p.favorite) : [] const head = (icon, text) => { const h = document.createElement('div'); h.className = 'hgroup'; h.innerHTML = `${ic(icon, 'sm')}${text}`; grid.appendChild(h) } - if (favs.length) head('star', 'Favoriten') + if (favs.length) head('star', t('home.favorites')) const ordered = favs.length ? [...favs, null, ...items.filter((p) => !p.favorite)] : items for (const p of ordered) { - if (!p) { head('layout-grid', 'Alle Projekte'); continue } + if (!p) { head('layout-grid', t('home.allProjects')); continue } const desc = (p.description || p.notes || '').split(/\r?\n/).map((x) => x.trim()).find(Boolean) ?? '' const due = backupDue(p) const tile = document.createElement('div') @@ -1463,7 +1501,7 @@ function renderHome() {
${statusHtml(p.status)}${rootTag(p, true)}
-
${desc ? escapeHtml(desc) : 'Keine Beschreibung'}
+
${desc ? escapeHtml(desc) : t('home.noDesc')}
${due ? `` : ''} ${timeAgo(lastActivity(p))} @@ -1495,15 +1533,16 @@ function setView(view) { let actData = null let actDay = null let actRange = 7 -const DOW = ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] -const MONTHS = ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'] +// short weekday (0=Mon…6=Sun) and month (0=Jan…) in the current language, via Intl +const dowShort = (i) => new Intl.DateTimeFormat(I18N.locale(), { weekday: 'short', timeZone: 'UTC' }).format(new Date(Date.UTC(2024, 0, 1 + i))) +const monthShort = (m) => new Intl.DateTimeFormat(I18N.locale(), { month: 'short' }).format(new Date(2024, m, 1)) const dayKey = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}` const parseDay = (k) => { const [y, m, d] = k.split('-').map(Number); return new Date(y, m - 1, d) } -const fmtDay = (k) => parseDay(k).toLocaleDateString('de-DE', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }) +const fmtDay = (k) => parseDay(k).toLocaleDateString(I18N.locale(), { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }) const nActive = (k) => actData?.days[k]?.projects.length ?? 0 // 0 · 1 · 2 · 3–4 · 5+ active projects const levelOf = (n) => (n <= 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n <= 4 ? 3 : 4) -const LEVEL_LABEL = ['keins', '1 Projekt', '2 Projekte', '3–4 Projekte', '5+ Projekte'] +const levelLabel = (l) => window.I18N.t('act.level.' + l) async function loadActivity() { try { actData = await (await fetch('/api/activity')).json() } catch { return } @@ -1522,12 +1561,12 @@ function heatGrid(weeks, cell, title) { const today = parseDay(actData?.today ?? dayKey(new Date())) const monday = new Date(today); monday.setDate(today.getDate() - ((today.getDay() + 6) % 7)) const start = new Date(monday); start.setDate(monday.getDate() - (weeks - 1) * 7) - let html = DOW.map((d, i) => (i % 2 === 0 ? `${d}` : '')).join('') + let html = Array.from({ length: 7 }, (_, i) => (i % 2 === 0 ? `${dowShort(i)}` : '')).join('') let lastMonth = -1 for (let w = 0; w < weeks; w++) { const first = new Date(start); first.setDate(start.getDate() + w * 7) if (first.getMonth() !== lastMonth && first.getDate() <= 7) { - html += `${MONTHS[first.getMonth()]}` + html += `${monthShort(first.getMonth())}` lastMonth = first.getMonth() } else if (w === 0) lastMonth = first.getMonth() for (let r = 0; r < 7; r++) { @@ -1555,15 +1594,17 @@ function renderActivity() { if (!nActive(dayKey(d))) d.setDate(d.getDate() - 1) while (nActive(dayKey(d))) { current++; d.setDate(d.getDate() - 1) } const best = keys.reduce((b, k) => (nActive(k) > (b ? nActive(b) : 0) ? k : b), null) + const T = window.I18N.t + const daysWord = (n) => T(n === 1 ? 'act.day1' : 'act.daysN', { n }) document.getElementById('acKpis').innerHTML = ` -
Aktive Tage
${keys.length}
im letzten Jahr
-
Aktuelle Serie
${current} ${current === 1 ? 'Tag' : 'Tage'}
am Stück mit Arbeit
-
Längste Serie
${longest} ${longest === 1 ? 'Tag' : 'Tage'}
im letzten Jahr
-
Vollster Tag
${best ? `${nActive(best)} Projekte` : '–'}
${best ? parseDay(best).toLocaleDateString('de-DE') : ''}
` - document.getElementById('acPending').textContent = actData.pending ? `· ${actData.pending} Projekte werden noch gelesen…` : '' - document.getElementById('acLegend').innerHTML = `weniger${[0, 1, 2, 3, 4].map((l) => ``).join('')}mehr aktive Projekte` +
${T('act.activeDays')}
${keys.length}
${T('act.pastYear')}
+
${T('act.currentStreak')}
${daysWord(current)}
${T('act.streakSub')}
+
${T('act.longestStreak')}
${daysWord(longest)}
${T('act.pastYear')}
+
${T('act.fullestDay')}
${best ? T('act.nProjects', { n: nActive(best) }) : '–'}
${best ? parseDay(best).toLocaleDateString(I18N.locale()) : ''}
` + document.getElementById('acPending').textContent = actData.pending ? '· ' + T('act.pending', { n: actData.pending }) : '' + document.getElementById('acLegend').innerHTML = `${T('act.less')}${[0, 1, 2, 3, 4].map((l) => ``).join('')}${T('act.more')}` const heat = document.getElementById('acHeat') - heat.innerHTML = heatGrid(53, (k) => levelOf(nActive(k)), (k) => `${fmtDay(k)}: ${nActive(k)} Projekte`) + heat.innerHTML = heatGrid(53, (k) => levelOf(nActive(k)), (k) => `${fmtDay(k)}: ${T('act.nProjects', { n: nActive(k) })}`) heat.querySelector(`[data-day="${actDay}"]`)?.classList.add('sel') // start scrolled to the newest weeks on narrow screens heat.parentElement.scrollLeft = heat.parentElement.scrollWidth @@ -1574,14 +1615,14 @@ function renderActivity() { function actRow(p, meta) { return `` } -const actMeta = (files, commits) => [files ? `${files} ${files === 1 ? 'Datei' : 'Dateien'}` : '', commits ? `${commits} ${commits === 1 ? 'Commit' : 'Commits'}` : ''].filter(Boolean).join(' · ') +const actMeta = (files, commits) => [files ? t(files === 1 ? 'act.file1' : 'act.filesN', { n: files }) : '', commits ? t(commits === 1 ? 'act.commit1' : 'act.commitsN', { n: commits }) : ''].filter(Boolean).join(' · ') function renderActDay() { const e = actData.days[actDay] document.getElementById('acDayTitle').textContent = fmtDay(actDay) document.getElementById('acDay').innerHTML = e?.projects.length ? `
${e.projects.map((p) => actRow(p.name, actMeta(p.files, p.commits))).join('')}
` - : '
An diesem Tag wurde nichts geändert.
' + : `
${t('act.nothingDay')}
` } function renderActTop() { @@ -1597,8 +1638,8 @@ function renderActTop() { } const list = [...agg].sort((a, b) => b[1].days - a[1].days || b[1].last.localeCompare(a[1].last)).slice(0, 15) document.getElementById('acTop').innerHTML = list.length - ? `
${list.map(([n, a]) => actRow(n, `${a.days} ${a.days === 1 ? 'Tag' : 'Tage'} · zuletzt ${timeAgo(parseDay(a.last).toISOString())}`)).join('')}
` - : '
In diesem Zeitraum keine Änderungen.
' + ? `
${list.map(([n, a]) => actRow(n, `${t(a.days === 1 ? 'act.day1' : 'act.daysN', { n: a.days })} · ${t('act.lastAgo', { ago: timeAgo(parseDay(a.last).toISOString()) })}`)).join('')}
` + : `
${t('act.noChangesRange')}
` } const acHeat = document.getElementById('acHeat') @@ -1663,9 +1704,9 @@ let storageData = null let stPath = [] // [] = all projects · [project] · [project, folder] let stSelected = new Set() const TIER_KEYS = ['Cache', 'Release', 'Output'] -const TIER_SHORT = { Cache: 'Cache', Release: 'Builds', Output: 'Rohbilder' } +const TIER_SHORT = { get Cache() { return tierShort('Cache') }, get Release() { return tierShort('Release') }, get Output() { return tierShort('Output') } } const tierVar = (t) => `var(--t-${t.toLowerCase()})` -const fmtMB1 = (mb) => (mb >= 1024 ? `${(mb / 1024).toLocaleString('de-DE', { maximumFractionDigits: mb >= 10240 ? 0 : 1 })} GB` : `${Math.round(mb).toLocaleString('de-DE')} MB`) +const fmtMB1 = (mb) => (mb >= 1024 ? `${(mb / 1024).toLocaleString(I18N.locale(), { maximumFractionDigits: mb >= 10240 ? 0 : 1 })} GB` : `${Math.round(mb).toLocaleString(I18N.locale())} MB`) async function loadStorage() { try { storageData = await (await fetch('/api/storage')).json() } catch { return } @@ -1693,15 +1734,16 @@ function renderStorageKpis() { const scan = storageData.scan const bar = TIER_KEYS.filter((t) => del[t] > 0).map((t) => ``).join('') + (total > delAll ? `` : '') + const T = window.I18N.t document.getElementById('stKpis').innerHTML = ` -
Belegt
${fmtMB1(total)}
${scanned.length} Projekte gemessen
-
Aufräumbar
${fmtMB1(delAll)}
+
${T('st.used')}
${fmtMB1(total)}
${T('st.nMeasured', { n: scanned.length })}
+
${T('st.cleanable')}
${fmtMB1(delAll)}
-
${TIER_KEYS.map((t) => `${TIER_SHORT[t]} ${fmtMB1(del[t])}`).join('')}
-
Anteil aufräumbar
${total ? Math.round((delAll / total) * 100) : 0} %
vom belegten Platz
-
Gemessen
${scanned.length} / ${ps.length}
-
${scan?.running ? `${ic('loader', 'sm')} läuft: ${scan.done}/${scan.total}` : oldest ? `ältester Stand ${timeAgo(oldest)}` : 'noch nichts gemessen'}
-
` +
${TIER_KEYS.map((k) => `${TIER_SHORT[k]} ${fmtMB1(del[k])}`).join('')}
+
${T('st.cleanableShare')}
${total ? Math.round((delAll / total) * 100) : 0} %
${T('st.ofUsed')}
+
${T('st.measuredCount')}
${scanned.length} / ${ps.length}
+
${scan?.running ? `${ic('loader', 'sm')} ${T('st.runningN', { done: scan.done, total: scan.total })}` : oldest ? `${T('st.oldest', { ago: timeAgo(oldest) })}` : `${T('st.nothingMeasured')}`}
+
` document.getElementById('stScanAll').onclick = () => startScan() } @@ -1763,12 +1805,12 @@ function renderTreemap() { const W = box.clientWidth, H = box.clientHeight const ps = storageData.projects const proj = stPath.length ? ps.find((p) => p.name === stPath[0]) : null - const crumbs = [``] + const crumbs = [``] if (proj) crumbs.push(`›${stPath.length > 1 ? `` : `${escapeHtml(proj.name)}`}`) if (stPath.length > 1) crumbs.push(`›${escapeHtml(stPath[1])}`) - if (proj) crumbs.push(``) + if (proj) crumbs.push(``) document.getElementById('stCrumbs').innerHTML = crumbs.join('') - document.getElementById('stLegend').innerHTML = TIER_KEYS.map((t) => `${TIER_SHORT[t]}`).join('') + 'Rest' + document.getElementById('stLegend').innerHTML = TIER_KEYS.map((t) => `${TIER_SHORT[t]}`).join('') + `${t('tier.rest')}` let html = '' const tile = (r, cls, label, sub, attrs, extra = '') => { @@ -1779,7 +1821,7 @@ function renderTreemap() { if (!proj) { const items = ps.filter((p) => p.sizeMB > 0).sort((a, b) => b.sizeMB - a.sizeMB).map((p) => ({ value: p.sizeMB, p })) - if (!items.length) { box.innerHTML = `
Noch nichts gemessen – oben „Alle messen“.
`; return } + if (!items.length) { box.innerHTML = `
${t('st.nothingMeasuredHint')}
`; return } const draw = (list, x, y, w, h) => squarify(list, x, y, w, h).map((r) => { const p = r.item.p const inside = { Cache: p.deletable?.Cache ?? 0, Release: p.deletable?.Release ?? 0, Output: p.deletable?.Output ?? 0 } @@ -1796,8 +1838,8 @@ function renderTreemap() { } else { const level = stPath.length > 1 ? proj.tree?.find((c) => c.name === stPath[1])?.children : proj.tree if (!level?.length) { - box.innerHTML = `
${proj.sizeMB == null ? 'Dieses Projekt wurde noch nicht gemessen.' : 'Für die Aufteilung nach Ordnern das Projekt neu messen.'}

-
` + box.innerHTML = `
${proj.sizeMB == null ? t('st.projUnmeasured') : t('st.projRemeasure')}

+
` document.getElementById('stScanOne').onclick = () => startScan(proj.name) return } @@ -1825,19 +1867,21 @@ stTree.addEventListener('mousemove', (e) => { if (t.dataset.proj) { const p = ps.find((x) => x.name === t.dataset.proj) const d = p.deletable ?? {} - html = `${escapeHtml(p.name)}
Größe${fmtMB1(p.sizeMB)}
` + + const T = window.I18N.t + html = `${escapeHtml(p.name)}
${T('st.size')}${fmtMB1(p.sizeMB)}
` + TIER_KEYS.filter((k) => d[k] > 0).map((k) => `
${TIER_SHORT[k]}${fmtMB1(d[k])}
`).join('') + - (multiRoot() ? `
Ordner${escapeHtml(p.rootName)}
` : '') + - `
gemessen${timeAgo(p.at)}
` + (multiRoot() ? `
${T('st.folder')}${escapeHtml(p.rootName)}
` : '') + + `
${T('st.measured')}${timeAgo(p.at)}
` } else { + const T = window.I18N.t const proj = ps.find((x) => x.name === stPath[0]) const level = stPath.length > 1 ? proj.tree.find((c) => c.name === stPath[1]).children : proj.tree const c = level.find((x) => x.name === t.dataset.name) const info = c.files || c.merged ? null : tierInfo(proj, t.dataset.rel) - html = `${escapeHtml(t.dataset.rel)}
Größe${fmtMB1(c.mb)}
` + - (info?.tier ? `
Löschbar${TIER_SHORT[info.tier]}
` : '') + - (info ? TIER_KEYS.filter((k) => info.inside[k] > 0).map((k) => `
darin ${TIER_SHORT[k]}${fmtMB1(info.inside[k])}
`).join('') : '') + - (t.hasAttribute('data-drill') ? '
Klick: Unterordner
' : '') + html = `${escapeHtml(t.dataset.rel)}
${T('st.size')}${fmtMB1(c.mb)}
` + + (info?.tier ? `
${T('st.deletable')}${TIER_SHORT[info.tier]}
` : '') + + (info ? TIER_KEYS.filter((k) => info.inside[k] > 0).map((k) => `
${T('st.inside', { s: TIER_SHORT[k] })}${fmtMB1(info.inside[k])}
`).join('') : '') + + (t.hasAttribute('data-drill') ? `
${T('st.clickSub')}
` : '') } stTip.innerHTML = html stTip.hidden = false @@ -1875,10 +1919,10 @@ function renderStorageTop() { const del = TIER_KEYS.reduce((s, t) => s + (d[t] ?? 0), 0) const segs = TIER_KEYS.filter((t) => d[t] > 0).map((t) => ``).join('') + (p.sizeMB > del ? `` : '') - return `` - }).join('')}
` : '
Noch nichts gemessen.
' + }).join('')}` : `
${t('st.nothingMeasured2')}
` } document.getElementById('stTop').addEventListener('click', (e) => { const b = e.target.closest('[data-proj]') @@ -1898,21 +1942,21 @@ function renderHogs() { if (!renderHogs.done) { for (const r of rows) if (r.tier === 'Cache') stSelected.add(keyOf(r)); renderHogs.done = true } for (const k of [...stSelected]) if (!rows.some((r) => keyOf(r) === k)) stSelected.delete(k) document.getElementById('stHogs').innerHTML = rows.length - ? `${can ? '' : ''}ProjektOrdnerArtGröße + ? `${can ? '' : ''}${t('col.project')}${t('st.folder')}${t('st.kind')}${t('st.size')} ${rows.map((r) => ` - ${can ? `` : ''} + ${can ? `` : ''} ${escapeHtml(r.p.name)} ${escapeHtml(inProject(r.path, r.p.folder))} - ${TIER_SHORT[r.tier]} + ${TIER_SHORT[r.tier]} ${fmtMB1(r.mb)}`).join('')}` - : 'Nichts zum Aufräumen gefunden (oder noch nicht gemessen).' + : `${t('st.nothingToClean')}` updateHogSel(rows) renderHogs.rows = rows } function updateHogSel(rows = renderHogs.rows ?? []) { const sel = rows.filter((r) => stSelected.has(`${r.p.name}|${r.path}`)) const mb = sel.reduce((s, r) => s + r.mb, 0) - document.getElementById('stSel').textContent = sel.length ? `${sel.length} ausgewählt · ${fmtMB1(mb)}` : storageData?.cleanupAvailable ? '' : 'Löschen braucht cleanup.ps1' + document.getElementById('stSel').textContent = sel.length ? t('st.selected', { n: sel.length, size: fmtMB1(mb) }) : storageData?.cleanupAvailable ? '' : t('st.needCleanup') document.getElementById('stDelete').disabled = !sel.length } document.getElementById('stHogs').addEventListener('click', (e) => { @@ -1927,10 +1971,10 @@ document.getElementById('stDelete').onclick = async () => { const sel = (renderHogs.rows ?? []).filter((r) => stSelected.has(`${r.p.name}|${r.path}`)) if (!sel.length) return const mb = sel.reduce((s, r) => s + r.mb, 0) - if (!confirm(`${sel.length} Ordner (${fmtMB1(mb)}) endgültig löschen?\n\n${sel.map((r) => `${r.p.name}: ${inProject(r.path, r.p.folder)}`).join('\n')}\n\nSie lassen sich neu erzeugen (npm install, Build …).`)) return + if (!confirm(t('st.confirmDelete', { n: sel.length, size: fmtMB1(mb) }) + '\n\n' + sel.map((r) => `${r.p.name}: ${inProject(r.path, r.p.folder)}`).join('\n') + '\n\n' + t('st.regenHint'))) return const btn = document.getElementById('stDelete') btn.disabled = true - btn.innerHTML = `${ic('loader')}Lösche…` + btn.innerHTML = `${ic('loader')}${t('st.deleting')}` const byProject = new Map() for (const r of sel) byProject.set(r.p.name, [...(byProject.get(r.p.name) ?? []), r.path]) let failed = 0 @@ -1938,8 +1982,8 @@ document.getElementById('stDelete').onclick = async () => { try { await postJson(api(name, 'clean'), { paths }) } catch (e) { failed++; toast(`${name}: ${e.message}`, 'triangle-alert') } } stSelected.clear() - btn.innerHTML = `${ic('trash')}Ausgewählte löschen` - if (!failed) toast(`${fmtMB1(mb)} freigegeben`, 'brush-cleaning') + btn.innerHTML = `${ic('trash')}${t('st.deleteSelected')}` + if (!failed) toast(t('st.freed', { size: fmtMB1(mb) }), 'brush-cleaning') await loadStorage() load() } @@ -1956,7 +2000,7 @@ async function saveTasks(p, tasks) { p.tasks = tasks renderTasks() updateTaskCount() - if (!(await patchProject(p.name, { tasks }))) { toast('Speichern fehlgeschlagen', 'triangle-alert'); load() } + if (!(await patchProject(p.name, { tasks }))) { toast(t('err.saveFailed'), 'triangle-alert'); load() } } function updateTaskCount() { @@ -1990,20 +2034,20 @@ function renderTasks() { const el = document.getElementById('taskGroups') el.classList.toggle('isEmpty', !groups.length) if (!groups.length) { - el.innerHTML = `
${ic(taskMode === 'done' ? 'inbox' : 'party-popper', 'xl')}
${taskMode === 'open' ? 'Keine offenen Aufgaben.' : 'Keine Aufgaben gefunden.'}
-
Oben ein Projekt wählen und eine Aufgabe eintragen.
` + el.innerHTML = `
${ic(taskMode === 'done' ? 'inbox' : 'party-popper', 'xl')}
${taskMode === 'open' ? t('tasks.noOpen') : t('tasks.noneFound')}
+
${t('tasks.addHint')}
` return } el.innerHTML = groups.map(({ p, tasks }) => { const all = p.tasks ?? [] const done = all.filter((t) => t.done).length return `
-
${avatar(p)}${escapeHtml(p.name)}${statusHtml(p.status)}${done}/${all.length}
+
${avatar(p)}${escapeHtml(p.name)}${statusHtml(p.status)}${done}/${all.length}
- ${tasks.map((t) => `
- ${escapeHtml(t.text)} -
`).join('')} -
+ ${tasks.map((x) => `
+ ${escapeHtml(x.text)} +
`).join('')} +
` }).join('') @@ -2036,7 +2080,7 @@ function addTaskTop() { input.value = '' if (taskMode === 'done') setTaskMode('open') saveTasks(p, [...(p.tasks ?? []), { id: newTaskId(), text, done: false }]) - toast(`Aufgabe zu ${p.name} hinzugefügt`, 'list-checks') + toast(t('tasks.added', { name: p.name }), 'list-checks') input.focus() } @@ -2113,45 +2157,45 @@ function renderInfo(name, d) { const del = s ? s.deletable.Cache + s.deletable.Release + s.deletable.Output : 0 const c = cloudInfo(p) const overview = `
-
Ordner
${escapeHtml(d.path)}
-
Status
${statusHtml(p.status)} · Priorität ${PRIO_LABEL[p.priority] ?? '–'}
-
Geändert
${fmtDate(lastActivity(p))} · ${timeAgo(lastActivity(p))}${p.lastChange?.file ? ` · ${escapeHtml(p.lastChange.file)}` : ''}
-
Backup
${ic('hard-drive', 'sm')}${escapeHtml(c.short)}${backupDue(p) ? ' fällig' : ''}
-
Größe
${s ? `${fmtMB(s.sizeMB)} · gescannt ${timeAgo(s.at)}${del >= 1 ? ` · ${fmtMB(del)} aufräumbar` : ''}` : 'noch nicht gescannt'}
+
${t('info.folder')}
${escapeHtml(d.path)}
+
${t('panel.status')}
${statusHtml(p.status)} · ${t('prio.titled', { p: p.priority ? t('prio.' + p.priority) : '–' })}
+
${t('info.changed')}
${fmtDate(lastActivity(p))} · ${timeAgo(lastActivity(p))}${p.lastChange?.file ? ` · ${escapeHtml(p.lastChange.file)}` : ''}
+
${t('btn.backup')}
${ic('hard-drive', 'sm')}${escapeHtml(c.short)}${backupDue(p) ? ` ${t('info.due')}` : ''}
+
${t('st.size')}
${s ? `${fmtMB(s.sizeMB)} · ${t('info.scannedAgo', { ago: timeAgo(s.at) })}${del >= 1 ? ` · ${fmtMB(del)} ${t('size.cleanableWord')}` : ''}` : `${t('kpi.notScanned')}`}
` const gitBody = g.isRepo ? `
-
Status
${gitHtml(g)}${g.dirty ? ` · ${g.dirty} Änderungen nicht committet` : ''}
-
Branch
${ic('git-branch', 'sm')} ${escapeHtml(g.branch)}${g.upstream ? ` → ${escapeHtml(g.upstream)}` : ''}${g.ahead ? ` · ${g.ahead} nicht gepusht` : ''}
-
Remote
${g.remote ? `${escapeHtml(g.remote)}` : 'keins – liegt nur auf dieser Platte'}
-
Letzter Commit
${g.lastCommit ? `${g.lastCommit.date} · ${escapeHtml(g.lastCommit.message)}` : '–'}
+
${t('panel.status')}
${gitHtml(g)}${g.dirty ? ` · ${t('info.uncommitted', { n: g.dirty })}` : ''}
+
${t('info.branch')}
${ic('git-branch', 'sm')} ${escapeHtml(g.branch)}${g.upstream ? ` → ${escapeHtml(g.upstream)}` : ''}${g.ahead ? ` · ${t('info.notPushed', { n: g.ahead })}` : ''}
+
${t('info.remote')}
${g.remote ? `${escapeHtml(g.remote)}` : `${t('info.noRemoteShort')}`}
+
${t('info.lastCommit')}
${g.lastCommit ? `${g.lastCommit.date} · ${escapeHtml(g.lastCommit.message)}` : '–'}
` - : `
${gitHtml(g)}
Kein Git-Repository – Änderungen sind nirgends gesichert.
` + : `
${gitHtml(g)}
${t('info.noRepo')}
` const ip = d.itchPack ?? { exists: false } const itchBody = `
-
Veröffentlicht
-
Seiten-Paket
${ip.exists ? `${escapeHtml(ip.rel)} · ${timeAgo(ip.at)}` : 'noch keins'}
+
${t('info.published')}
${p.published ? `${escapeHtml(p.published.title || p.published.url)}` : `${t('info.no')}`}
+
${t('info.pagePack')}
${ip.exists ? `${escapeHtml(ip.rel)} · ${timeAgo(ip.at)}` : `${t('info.noneYet')}`}
` const arcs = d.archives ?? [] const arcBody = arcs.length - ? `
${arcs.slice(0, 8).map((a) => `
${new Date(a.at).toLocaleDateString('de-DE')}
${escapeHtml(a.name)} · ${fmtMB(a.mb)}
`).join('')}
${arcs.length > 8 ? `
… und ${arcs.length - 8} ältere
` : ''}` - : '
Noch keine ZIPs in releases\\.
' + ? `
${arcs.slice(0, 8).map((a) => `
${new Date(a.at).toLocaleDateString(I18N.locale())}
${escapeHtml(a.name)} · ${fmtMB(a.mb)}
`).join('')}
${arcs.length > 8 ? `
${t('info.moreOlder', { n: arcs.length - 8 })}
` : ''}` + : `
${t('info.noZips')}
` const gens = d.tools.generators const genBody = gens.length ? `
${gens.map((x) => `
${escapeHtml(x.rel)}
${x.kind === 'comfygen' - ? `${ic('wand-sparkles', 'sm')}nutzt _Tools\\ComfyGen` - : `${ic('copy', 'sm')}eigene Kopie
${escapeHtml(x.scripts.join(', '))}
`}
`).join('')}
` - : '
Kein Generator-Ordner.
' + ? `${ic('wand-sparkles', 'sm')}${t('info.usesComfyGen')}` + : `${ic('copy', 'sm')}${t('info.ownCopy')}
${escapeHtml(x.scripts.join(', '))}
`}`).join('')}` + : `
${t('info.noGenerator')}
` const genDir = gens.find((x) => x.kind === 'comfygen') const iconBody = d.icon ? `
${escapeHtml(d.icon)}
` - : `
${ic('image-off', 'sm')}kein Icon gefunden
-
${genDir ? 'Mit ComfyGen erzeugen (Prompt „icon“ in prompts.py eintragen):' : 'Generator-Vorlage aus _Tools\\ComfyGen\\template kopieren, dann:'}
+ : `
${ic('image-off', 'sm')}${t('info.noIconFound')}
+
${genDir ? t('info.iconComfyGen') : t('info.iconTemplate')}
cd "${escapeHtml(d.path)}\\${escapeHtml(genDir ? genDir.rel : 'sprite-generator')}" && gen generate icon && gen adopt icon` // description: own text (.dashboard.json), else the README's intro as a suggestion @@ -2160,31 +2204,31 @@ function renderInfo(name, d) { ? `
${escapeHtml(desc)}
` : d.readme ? `
${escapeHtml(d.readme)}
-
${ic('file-text', 'sm')} Aus der README – noch keine eigene Beschreibung. -
` - : '
Noch keine Beschreibung. Kurz notieren, was das für ein Projekt ist.
' +
${ic('file-text', 'sm')} ${t('desc.fromReadme')} +
` + : `
${t('desc.none')}
` const descEdit = `` const el = document.getElementById('sec-info') el.innerHTML = - section('notebook-text', 'Beschreibung', `
${descBody}
${descEdit}`, - { id: 'info-desc', right: `${ic('pencil', 'sm')}${desc ? 'Ändern' : 'Schreiben'}` }) + - section('info', 'Übersicht', overview, { right: del >= 1 ? `${jumpLink('act-clean', 'Aufräumen')}` : '' }) + - section('git-branch', 'Git', gitBody, { adv: true, right: jumpLink('act-git', g.isRepo ? 'Push & Remote' : 'Einrichten') }) + - (name === '_Tools' || !itchOn() ? '' : section('rocket', 'itch.io', itchBody, { adv: true, right: jumpLink('act-itch', ip.exists ? 'Ansehen' : 'Erzeugen') })) + - section('cpu', 'Technik', `
${techChips(d.tech.types) || 'nicht erkannt'}${d.tech.needsInstall ? `${ic('download', 'sm')}npm install nötig` : ''}
`, { adv: true }) + - `

${ic('activity')}Aktivität

wird geladen…
` + - section('file-archive', 'Release-Archive', arcBody, { adv: true, right: jumpLink('act-zip', 'ZIP erstellen') }) + - section('wand-sparkles', 'Generator', genBody, { adv: true }) + - section('image', 'App-Icon', iconBody, { adv: true }) + section('notebook-text', t('info.description'), `
${descBody}
${descEdit}`, + { id: 'info-desc', right: `${ic('pencil', 'sm')}${desc ? t('desc.edit') : t('desc.write')}` }) + + section('info', t('info.overview'), overview, { right: del >= 1 ? `${jumpLink('act-clean', t('info.cleanUp'))}` : '' }) + + section('git-branch', 'Git', gitBody, { adv: true, right: jumpLink('act-git', g.isRepo ? t('info.pushRemote') : t('set.setup')) }) + + (name === '_Tools' || !itchOn() ? '' : section('rocket', 'itch.io', itchBody, { adv: true, right: jumpLink('act-itch', ip.exists ? t('info.view') : t('info.generate')) })) + + section('cpu', t('info.tech'), `
${techChips(d.tech.types) || `${t('info.notDetected')}`}${d.tech.needsInstall ? `${ic('download', 'sm')}${t('info.npmNeeded')}` : ''}
`, { adv: true }) + + `

${ic('activity')}${t('tab.activity')}

${t('info.loading')}
` + + section('file-archive', t('info.releaseArchives'), arcBody, { adv: true, right: jumpLink('act-zip', t('info.makeZip')) }) + + section('wand-sparkles', t('info.generator'), genBody, { adv: true }) + + section('image', t('info.appIcon'), iconBody, { adv: true }) bindJumps(el) bindDescription(name, d, el) loadProjectActivity(name) @@ -2211,9 +2255,9 @@ function bindDescription(name, d, el) { body: JSON.stringify({ description: text }), }) const r = await res.json().catch(() => ({})) - if (!res.ok) throw new Error(r.error ?? 'Speichern fehlgeschlagen') + if (!res.ok) throw new Error(r.error ?? t('err.saveFailed')) for (const p of [editing, projects.find((x) => x.name === name)]) if (p) p.description = r.description - toast(r.description ? 'Beschreibung gespeichert' : 'Beschreibung entfernt', 'notebook-text') + toast(r.description ? t('desc.saved') : t('desc.removed'), 'notebook-text') if (editing?.name === name) renderInfo(name, d) } catch (e) { toast(e.message, 'triangle-alert') } } @@ -2232,29 +2276,29 @@ function bindDescription(name, d, el) { function gitActionsHtml(name, d) { const g = d.git if (!g.isRepo) { - return `
Kein Git-Repository – Änderungen sind nirgends gesichert.
-
` + return `
${t('info.noRepo')}
+
` } const key = d.sshKey const keyHint = key - ? `
${ic('key-round', 'sm')} SSH-Schlüssel: ${escapeHtml(key.file)}
` - : `
${ic('key-round', 'sm')} Kein SSH-Schlüssel gefunden. Anlegen mit ssh-keygen -t ed25519, dann den Inhalt von .ssh\\id_ed25519.pub bei GitHub/GitLab eintragen.
` + ? `
${ic('key-round', 'sm')} ${t('git.sshKey')}: ${escapeHtml(key.file)}
` + : `
${ic('key-round', 'sm')} ${t('git.noSshKey')}
` const pushBox = !g.remote ? '' : g.dirty ? `
- - - + + +
` - : `
${g.ahead ? '' : 'nichts Neues zu pushen'}
` + : `
${g.ahead ? '' : t('git.nothingNew')}
` return `${pushBox} - +
- +
- ${g.remote ? '' : '
Noch kein Remote – erst eintragen, dann erscheint hier „Push“.
'} + ${g.remote ? '' : `
${t('git.noRemoteYet')}
`} ${keyHint} -
Push läuft in einem eigenen Konsolenfenster (dort erscheinen SSH-Passphrase und Fehler).
` +
${t('git.pushConsole')}
` } function archiveHtml(name, d) { @@ -2264,52 +2308,52 @@ function archiveHtml(name, d) { const rd = d.releaseDirs ?? [] return `
- - - + + +
- -
Landet in ${escapeHtml(folder)}\\releases\\ mit Datum im Namen${rd.length ? '' : ' – kein Build-Ordner gefunden (dist, builds, release, publish …)'}.
` + +
${t('arc.lands', { folder: escapeHtml(folder) })}${rd.length ? '' : t('arc.noBuild')}.
` } function itchActionHtml(name, d) { const ip = d.itchPack ?? { exists: false } const p = projects.find((x) => x.name === name) ?? editing if (!ip.exists) { - return `
-
Startet Claude Code mit dem Skill itchiocreater in einer Konsole: Titel, Tagline, Beschreibung, alle Felder, Cover/Banner (ComfyUI) und Screenshots landen in docs\\itchio\\. Rückfragen dort beantworten.
` + return `
+
${t('itchA.generateHint')}
` } return `
- - - - ${p?.published ? `${ic('external-link')}` : ''} + + + + ${p?.published ? `${ic('external-link')}` : ''}
-
${escapeHtml(ip.rel)} · zuletzt geändert ${timeAgo(ip.at)}
` +
${escapeHtml(ip.rel)} · ${t('itchA.lastChanged', { ago: timeAgo(ip.at) })}
` } function cleanHtml(d) { const s = d.storage let body - if (!s) body = '
Noch nicht gescannt – erst scannen, dann zeigt sich, was weg kann.
' + if (!s) body = `
${t('clean.unscanned')}
` else { const rows = s.candidates.filter((c) => c.MB >= 1 || c.Skip) - body = `
Größe
${fmtMB(s.sizeMB)} · gescannt ${timeAgo(s.at)}
-
Löschbar
Cache ${fmtMB(s.deletable.Cache)} · Builds ${fmtMB(s.deletable.Release)} · Rohbilder ${fmtMB(s.deletable.Output)}
` + body = `
${t('st.size')}
${fmtMB(s.sizeMB)} · ${t('info.scannedAgo', { ago: timeAgo(s.at) })}
+
${t('st.deletable')}
Cache ${fmtMB(s.deletable.Cache)} · Builds ${fmtMB(s.deletable.Release)} · ${tierShort('Output')} ${fmtMB(s.deletable.Output)}
` body += rows.length ? `${rows.map((c) => ` - + `).join('')}
${escapeHtml(inProject(c.Path, editing?.folder))}${ic(TIER[c.Tier].icon, 'sm')}${TIER[c.Tier].label}${c.Skip ? ` ${ic('lock', 'sm')}in git` : ''}${ic(TIER[c.Tier].icon, 'sm')}${tierLabel(c.Tier)}${c.Skip ? ` ${ic('lock', 'sm')}${t('clean.inGit')}` : ''} ${fmtMB(c.MB)}
-
Cache ist vorausgewählt (immer neu erzeugbar). Fertige Builds und Rohbilder nur bewusst anhaken.
` - : `
${ic('sparkles', 'sm')} Nichts zum Aufräumen.
` +
${t('clean.cacheHint')}
` + : `
${ic('sparkles', 'sm')} ${t('clean.nothing')}
` } const hasRows = s && s.candidates.some((c) => c.MB >= 1 && !c.Skip) body += `
- ${hasRows ? `` : ''} - + ${hasRows ? `` : ''} +
` return body } @@ -2334,24 +2378,26 @@ function renderActions(name, d) { ${ic(a.id.startsWith('html:') || /\.html?$/i.test(a.rel ?? '') ? 'globe' : 'play', 'lg')} ${escapeHtml(a.label)}${escapeHtml(a.detail ?? '')} - ${a.rel ? `` : ''} + ${a.rel ? `` : ''} ` }).join('')}` - : `
Keine fertige exe oder HTML-Seite im Projekt gefunden.${hasBuild ? ' Unter „Bauen“ erzeugen, dann hier starten.' : ''}
`) - + (prog?.missing ? `
${ic('triangle-alert', 'sm')} Festgelegte Datei fehlt: ${escapeHtml(prog.rel)} – neu wählen oder zurücksetzen.
` : '') + : `
${t('prog.noneFound')}${hasBuild ? ' ' + t('prog.buildFirst') : ''}
`) + + (prog?.missing ? `
${ic('triangle-alert', 'sm')} ${t('prog.missing', { rel: escapeHtml(prog.rel) })}
` : '') + `
- ${ic('pin', 'sm')}Für ▶ starten festlegen${prog ? `: ${escapeHtml(prog.rel)}` : ' (automatisch)'} + ${ic('pin', 'sm')}${t('prog.setForPlay')}${prog ? `: ${escapeHtml(prog.rel)}` : ' ' + t('prog.automatic')}
- - ${hasPicker ? `` : ''} - - ${prog ? `` : ''} + + ${hasPicker ? `` : ''} + + ${prog ? `` : ''}
-
exe, html, bat oder lnk – Pfad im Projekt.
+
${t('prog.pathHint')}
` + // server group names (keys) → display labels + const actGroupLabel = (g) => ({ Programm: t('act.g.program'), Starten: t('act.g.start'), Einrichten: t('set.setup'), Bauen: t('act.g.build'), Werkzeuge: t('act.g.tools'), 'Öffnen': t('act.g.open') }[g] ?? g) const btnGroup = (g) => groups[g] - ? section(ACTION_ICON[g], g, `
${groups[g].map((a) => + ? section(ACTION_ICON[g], actGroupLabel(g), `
${groups[g].map((a) => ``).join('')}
`, { adv: !['Starten', 'Öffnen'].includes(g) }) : '' const head = (icon, title) => `
${ic(icon, 'sm')}${title}
` @@ -2361,20 +2407,24 @@ function renderActions(name, d) { projectTargets = d.backupTargets ?? [] const el = document.getElementById('sec-actions') el.innerHTML = - head('play', 'Starten') - + section('app-window', 'Programm', progHtml) + head('play', t('act.g.start')) + + section('app-window', t('act.g.program'), progHtml) + btnGroup('Starten') + btnGroup('Einrichten') + btnGroup('Bauen') - + head('shield-check', 'Sichern & Versionieren') + + head('shield-check', t('act.h.save')) + section('git-branch', 'Git', gitActionsHtml(name, d), { id: 'act-git', adv: true }) - + (tools ? '' : section('hard-drive-upload', 'Backup', '
', { id: 'act-backup' })) - + head('rocket', 'Veröffentlichen') - + section('file-archive', 'Release-ZIP', archiveHtml(name, d), { id: 'act-zip', adv: true }) - + (tools || !itchOn() ? '' : section('rocket', 'itch.io-Seite', itchActionHtml(name, d), { id: 'act-itch', adv: true })) - + head('brush-cleaning', 'Aufräumen') - + section('hard-drive', 'Speicher', cleanHtml(d), { id: 'act-clean', adv: true }) - + (groups['Werkzeuge'] || groups['Öffnen'] ? head('wrench', 'Werkzeuge') + btnGroup('Werkzeuge') + btnGroup('Öffnen') : '') - + `
${ic('shield-check', 'sm')} Programme starten direkt, Befehle und .bat laufen sichtbar in einem eigenen Konsolenfenster. Eigenen Start-Befehl unter „Bearbeiten“ festlegen.
` + + (tools ? '' : section('hard-drive-upload', t('btn.backup'), '
', { id: 'act-backup' })) + + head('rocket', t('act.h.publish')) + + section('file-archive', t('act.releaseZip'), archiveHtml(name, d), { id: 'act-zip', adv: true }) + + (tools || !itchOn() ? '' : section('rocket', t('dlg.itch.title'), itchActionHtml(name, d), { id: 'act-itch', adv: true })) + + head('brush-cleaning', t('info.cleanUp')) + + section('hard-drive', t('tab.storage'), cleanHtml(d), { id: 'act-clean', adv: true }) + + (groups['Werkzeuge'] || groups['Öffnen'] ? head('wrench', t('act.g.tools')) + btnGroup('Werkzeuge') + btnGroup('Öffnen') : '') + + `
${ic('shield-check', 'sm')} ${t('act.consoleHint')}
` + + (tools ? '' : head('triangle-alert', t('danger.title')) + + `
${t('danger.hint')}
+
`) + document.getElementById('btnDeleteProject')?.addEventListener('click', () => deleteProject(name, d)) for (const btn of el.querySelectorAll('.act')) btn.onclick = () => runAction(name, btn.dataset.id) for (const btn of el.querySelectorAll('.pin')) btn.onclick = () => setProgram(name, btn.dataset.rel) const input = document.getElementById('fProgram') @@ -2382,7 +2432,7 @@ function renderActions(name, d) { input.onkeydown = (e) => { if (e.key === 'Enter') setProgram(name, input.value) } document.getElementById('btnClearProgram')?.addEventListener('click', () => setProgram(name, '')) document.getElementById('btnPickProgram')?.addEventListener('click', async () => { - const file = await pickFile(`Programm für ${name} wählen`, d.path) + const file = await pickFile(t('prog.pickFor', { name }), d.path) if (file) setProgram(name, file) }) bindGit(name, d) @@ -2397,23 +2447,23 @@ function bindGit(name, d) { const on = (id, fn) => { const el = document.getElementById(id); if (el) el.onclick = fn } const refreshInfo = () => { load(); loadDetails(name) } on('btnPush', async () => { - try { await postJson(api(name, 'push')); toast('Push läuft in eigener Konsole', 'cloud-upload') } catch (e) { toast(e.message, 'triangle-alert') } + try { await postJson(api(name, 'push')); toast(t('git.pushRunning'), 'cloud-upload') } catch (e) { toast(e.message, 'triangle-alert') } }) on('btnCommitPush', async () => { const msg = document.getElementById('gMsg').value.trim() - if (!msg) { document.getElementById('gMsg').focus(); return toast('Bitte eine Commit-Nachricht eingeben', 'info') } - try { await postJson(api(name, 'push'), { message: msg }); toast('Commit & Push läuft in eigener Konsole', 'cloud-upload') } catch (e) { toast(e.message, 'triangle-alert') } + if (!msg) { document.getElementById('gMsg').focus(); return toast(t('git.enterMsg'), 'info') } + try { await postJson(api(name, 'push'), { message: msg }); toast(t('git.commitPushRunning'), 'cloud-upload') } catch (e) { toast(e.message, 'triangle-alert') } }) on('btnRemote', async () => { - try { await postJson(api(name, 'remote'), { url: document.getElementById('gRemote').value }); toast('Remote gespeichert', 'link'); refreshInfo() } catch (e) { toast(e.message, 'triangle-alert') } + try { await postJson(api(name, 'remote'), { url: document.getElementById('gRemote').value }); toast(t('git.remoteSaved'), 'link'); refreshInfo() } catch (e) { toast(e.message, 'triangle-alert') } }) const rem = document.getElementById('gRemote') if (rem) rem.onkeydown = (e) => { if (e.key === 'Enter') document.getElementById('btnRemote').click() } on('btnGitInit', async () => { - try { await postJson(api(name, 'git-init')); toast('Git eingerichtet (Branch main)', 'git-branch'); refreshInfo() } catch (e) { toast(e.message, 'triangle-alert') } + try { await postJson(api(name, 'git-init')); toast(t('git.initDone'), 'git-branch'); refreshInfo() } catch (e) { toast(e.message, 'triangle-alert') } }) on('btnCopyKey', async () => { - try { await navigator.clipboard.writeText(d.sshKey.key); toast('SSH-Schlüssel kopiert', 'copy') } catch { toast('Kopieren nicht möglich', 'triangle-alert') } + try { await navigator.clipboard.writeText(d.sshKey.key); toast(t('git.keyCopied'), 'copy') } catch { toast(t('err.copyFailed'), 'triangle-alert') } }) } @@ -2426,18 +2476,18 @@ function bindArchive(name) { const btn = e.currentTarget const what = arcSel.value const del = document.getElementById('arcDel').checked && !!arcSel.selectedOptions[0]?.dataset.del - if (del && !confirm(`ZIP von „${what}“ erstellen und den Ordner danach löschen?`)) return + if (del && !confirm(t('arc.confirmDel', { what }))) return btn.disabled = true - btn.innerHTML = `${ic('loader')}Packe…` + btn.innerHTML = `${ic('loader')}${t('arc.packing')}` try { const r = await postJson(api(name, 'archive'), { what, deleteAfter: del }) - toast(`${r.name} (${fmtMB(r.mb)})${r.deleted ? ' – Build-Ordner gelöscht' : ''}`, 'file-archive') + toast(`${r.name} (${fmtMB(r.mb)})${r.deleted ? ' – ' + t('arc.buildDeleted') : ''}`, 'file-archive') loadDetails(name) if (r.deleted) load() } catch (ex) { toast(ex.message, 'triangle-alert') btn.disabled = false - btn.innerHTML = `${ic('file-archive')}ZIP erstellen` + btn.innerHTML = `${ic('file-archive')}${t('info.makeZip')}` } } document.getElementById('btnArcOpen').onclick = () => postJson(api(name, 'archive/open')).catch((ex) => toast(ex.message, 'triangle-alert')) @@ -2447,7 +2497,7 @@ function bindItch(name) { document.getElementById('btnItchGen')?.addEventListener('click', async () => { try { const r = await postJson(api(name, 'itch/generate')) - toast(r.update ? 'Claude Code prüft das itch.io-Paket – siehe Konsole' : 'Claude Code erstellt das itch.io-Paket – siehe Konsole', 'sparkles') + toast(r.update ? t('itchA.checking') : t('itchA.creating'), 'sparkles') } catch (e) { toast(e.message, 'triangle-alert') } }) document.getElementById('btnItchView')?.addEventListener('click', () => openItch(name)) @@ -2460,17 +2510,17 @@ function bindClean(name, d) { const clean = document.getElementById('btnClean') if (clean) clean.onclick = async () => { const paths = [...document.querySelectorAll('.candcb:checked')].map((cb) => cb.dataset.path) - if (!paths.length) return toast('Nichts ausgewählt') + if (!paths.length) return toast(t('import.nothingSelected')) const mb = s.candidates.filter((c) => paths.includes(c.Path)).reduce((a, c) => a + c.MB, 0) - if (!confirm(`${paths.length} Ordner (${fmtMB(mb)}) in „${name}“ endgültig löschen?\n\n${paths.map((x) => inProject(x, editing?.folder)).join('\n')}`)) return + if (!confirm(t('clean.confirmDel', { n: paths.length, size: fmtMB(mb), name }) + '\n\n' + paths.map((x) => inProject(x, editing?.folder)).join('\n'))) return clean.disabled = true - clean.innerHTML = `${ic('loader')}Lösche…` + clean.innerHTML = `${ic('loader')}${t('st.deleting')}` try { const r = await postJson(api(name, 'clean'), { paths }) - toast(`${r.deleted.length} gelöscht, ${String(r.freedGB).replace('.', ',')} GB frei${r.failed.length ? ` · ${r.failed.length} gesperrt (Programm offen?)` : ''}`, 'brush-cleaning') + toast(t('clean.result', { n: r.deleted.length, gb: String(r.freedGB).replace('.', ',') }) + (r.failed.length ? ' · ' + t('clean.locked', { n: r.failed.length }) : ''), 'brush-cleaning') await load() loadDetails(name) - } catch (e) { toast(e.message, 'triangle-alert'); clean.disabled = false; clean.innerHTML = `${ic('trash')}Ausgewählte löschen` } + } catch (e) { toast(e.message, 'triangle-alert'); clean.disabled = false; clean.innerHTML = `${ic('trash')}${t('st.deleteSelected')}` } } } @@ -2484,7 +2534,7 @@ async function openNested(deep = false) { nestDeep = deep // keep what was ticked before a re-scan (deep) const prev = new Map([...document.querySelectorAll('#nestBody input[data-rel]')].map((cb) => [`${cb.dataset.root}|${cb.dataset.rel}`, cb.checked])) - document.getElementById('nestBody').innerHTML = `
${ic('loader', 'sm')} Suche…
` + document.getElementById('nestBody').innerHTML = `
${ic('loader', 'sm')} ${t('nest.searching')}
` document.getElementById('nestDeep').hidden = deep if (!dlg.open) dlg.showModal() try { @@ -2493,7 +2543,7 @@ async function openNested(deep = false) { if (!r.ok) throw new Error(nestData.error) renderNested(dlg.open && deep ? prev : new Map()) } catch (e) { - document.getElementById('nestBody').innerHTML = `
Fehler: ${escapeHtml(e.message)}
` + document.getElementById('nestBody').innerHTML = `
${t('nest.error')}: ${escapeHtml(e.message)}
` } } @@ -2506,26 +2556,26 @@ function renderNested(prev) { ${escapeHtml(parts.slice(0, -1).join('\\'))}\\${escapeHtml(parts.at(-1))} ${x.markers.slice(0, 4).map((m) => `${escapeHtml(m === '.NET-sln' ? '.NET' : m === 'dashboard' ? 'Dashboard' : m)}`).join('')} - ${x.chosen ? 'übernommen' : x.ignored ? 'ausgelassen' : 'neu'} + ${x.chosen ? `${t('nest.chosen')}` : x.ignored ? `${t('nest.ignored')}` : `${t('nest.new')}`} ` } const roots = nestData.roots ?? [] const html = roots.map((r) => { const groups = r.containers.map((c) => `
-
${ic('folder', 'sm')}${escapeHtml(c.rel)}Sammelordner · wird ausgeblendet, wenn etwas übernommen ist
+
${ic('folder', 'sm')}${escapeHtml(c.rel)}${t('nest.collection')}
${c.projects.map((x) => item(r, x, x.chosen || !x.ignored)).join('')}
`).join('') const inner = r.inProjects.length ? `
-
${ic('folder-git-2', 'sm')}In Projektenmeist Teil des Projekts – nur bei Bedarf ankreuzen
+
${ic('folder-git-2', 'sm')}${t('nest.inProjects')}${t('nest.inProjectsHint')}
${r.inProjects.map((x) => item(r, x, x.chosen)).join('')}
` : '' const n = r.containers.reduce((a, c) => a + c.projects.length, 0) + r.inProjects.length - return `

${ic('folders')}${escapeHtml(r.name)} ${escapeHtml(r.path)} · ${n} gefunden

- ${groups + inner || `
Keine Projekte in Unterordnern${nestDeep ? '' : ' (Sammelordner)'}.
`}
` + return `

${ic('folders')}${escapeHtml(r.name)} ${escapeHtml(r.path)} · ${t('nest.nFound', { n })}

+ ${groups + inner || `
${nestDeep ? t('nest.noneDeep') : t('nest.none')}
`}
` }).join('') document.getElementById('nestBody').innerHTML = ` -
Angekreuzte Ordner erscheinen als eigene Projekte. Ein Sammelordner ohne eigenes Projekt (kein git, README, package.json …) wird dann ausgeblendet. Auf der Platte ändert sich nichts.
- ${html || '
Keine Projektordner eingerichtet.
'}` +
${t('nest.explain')}
+ ${html || `
${t('nest.noFolders')}
`}` } async function saveNested() { @@ -2538,7 +2588,7 @@ async function saveNested() { const r = await postJson('/api/nested', { roots: out }) document.getElementById('nestDlg').close() await load() - toast(r.chosen ? `${r.chosen} ${r.chosen === 1 ? 'Projekt' : 'Projekte'} aus Unterordnern übernommen` : 'Keine Projekte aus Unterordnern', 'folder-tree') + toast(r.chosen ? t(r.chosen === 1 ? 'nest.adopted1' : 'nest.adoptedN', { n: r.chosen }) : t('nest.adoptedNone'), 'folder-tree') } catch (e) { toast(e.message, 'triangle-alert') } finally { btn.disabled = false } } @@ -2548,7 +2598,7 @@ let itchName = null let itchData = null async function copyText(text, what) { - try { await navigator.clipboard.writeText(text); toast(`${what} kopiert`, 'copy') } catch { toast('Kopieren nicht möglich', 'triangle-alert') } + try { await navigator.clipboard.writeText(text); toast(t('copy.ok', { what }), 'copy') } catch { toast(t('err.copyFailed'), 'triangle-alert') } } // formatted: pastes as rich text into itch.io's description editor async function copyHtml(html, what) { @@ -2559,15 +2609,15 @@ async function copyHtml(html, what) { 'text/html': new Blob([html], { type: 'text/html' }), 'text/plain': new Blob([tmp.innerText], { type: 'text/plain' }), })]) - toast(`${what} formatiert kopiert`, 'copy') + toast(t('copy.okFormatted', { what }), 'copy') } catch { copyText(html, `${what} (HTML)`) } } async function openItch(name) { itchName = name const dlg = document.getElementById('itchDlg') - document.getElementById('itchTitle').textContent = `itch.io-Seite · ${name}` - document.getElementById('itchBody').innerHTML = `
${ic('loader', 'sm')} Lädt…
` + document.getElementById('itchTitle').textContent = `${t('dlg.itch.title')} · ${name}` + document.getElementById('itchBody').innerHTML = `
${ic('loader', 'sm')} ${t('itch.loading')}
` if (!dlg.open) dlg.showModal() try { const r = await fetch(api(name, 'itch')) @@ -2575,7 +2625,7 @@ async function openItch(name) { if (!r.ok) throw new Error(itchData.error) renderItch() } catch (e) { - document.getElementById('itchBody').innerHTML = `
Fehler: ${escapeHtml(e.message)}
` + document.getElementById('itchBody').innerHTML = `
${t('nest.error')}: ${escapeHtml(e.message)}
` } } @@ -2641,9 +2691,10 @@ function suggestTags(text, techTypes) { return out.slice(0, 16) } +// second element is a translation key (resolved at render time) const ITCH_KINDS = [ - ['cover', 'Cover (Cover image)'], ['theme', 'Banner & Hintergrund (Edit theme)'], - ['promo', 'Promo-Bilder'], ['screenshot', 'Screenshots'], ['other', 'Weitere Bilder'], + ['cover', 'itch.kind.cover'], ['theme', 'itch.kind.theme'], + ['promo', 'itch.kind.promo'], ['screenshot', 'itch.kind.screenshot'], ['other', 'itch.kind.other'], ] function renderItch() { @@ -2651,15 +2702,15 @@ function renderItch() { const name = itchName const body = document.getElementById('itchBody') if (!d.exists) { - body.innerHTML = `
Noch kein itch.io-Paket im Projekt. „itch.io-Seite erzeugen“ in Aktionen startet Claude Code.
` + body.innerHTML = `
${t('itch.noPackage')}
` return } const row = (label, f, extra = '') => { const v = f?.copy ?? '' return `
${label}
-
${v ? escapeHtml(v) : `${f?.placeholder ? 'noch offen' : 'nicht gefunden'}`}${extra}
- +
${v ? escapeHtml(v) : `${f?.placeholder ? t('itch.openField') : t('itch.notFound')}`}${extra}
+
` } // short description: itch.io allows 120 characters; a longer one gets a shortened suggestion @@ -2668,12 +2719,12 @@ function renderItch() { const tlCount = tl ? ` ${tl.length} / ${ITCH_SHORT_MAX}` : '' const shortSugg = tl.length > ITCH_SHORT_MAX ? shorten(tl) : !tl ? shorten(firstParagraph(d.descriptionHtml ?? '')) : '' const shortRow = shortSugg - ? row(tl ? 'Kürzer (Vorschlag)' : 'Short description (Vorschlag)', { copy: shortSugg }, ` ${shortSugg.length} / ${ITCH_SHORT_MAX}`) + ? row(tl ? t('itch.shorter') : t('itch.shortSugg'), { copy: shortSugg }, ` ${shortSugg.length} / ${ITCH_SHORT_MAX}`) : '' const words = descText ? descText.split(/\s+/).filter(Boolean).length : 0 const htmlBlock = (key, title, html, info = '') => html == null ? '' : `

${ic('file-code')}${title}${info ? ` ${info}` : ''} - +

` @@ -2683,52 +2734,52 @@ function renderItch() { const ownTags = (tagField?.copy ?? '').split(/,\s*/).map((t) => t.trim().toLowerCase()).filter(Boolean) const genre = d.fields.find((f) => /^genre/i.test(f.key))?.text ?? '' const sugg = suggestTags(`${d.title?.copy ?? ''} ${tl} ${genre} ${descText}`, editing?.tech?.types ?? []).filter((t) => !ownTags.includes(t)) - const tagChips = (list, cls) => list.map((t) => ``).join('') - const tagsBlock = `

${ic('tags')}Tags itch erlaubt 10 · Klick kopiert einen Tag - ${ownTags.length ? `` : ''}

- ${ownTags.length ? `
Im Paket (${ownTags.length})${tagChips(ownTags, 'own')}
` : '
Im Paket stehen noch keine Tags.
'} - ${sugg.length ? `
Beispiele / Ideen${tagChips(sugg, 'sugg')}
` : ''} + const tagChips = (list, cls) => list.map((x) => ``).join('') + const tagsBlock = `

${ic('tags')}Tags ${t('itch.tagsHint')} + ${ownTags.length ? `` : ''}

+ ${ownTags.length ? `
${t('itch.inPackage', { n: ownTags.length })}${tagChips(ownTags, 'own')}
` : `
${t('itch.noTags')}
`} + ${sugg.length ? `
${t('itch.examples')}${tagChips(sugg, 'sugg')}
` : ''}
` const imgs = d.images ?? [] const imgUrl = (rel) => `${api(name, 'itch/file')}?f=${encodeURIComponent(rel)}` const gallery = ITCH_KINDS.map(([k, label]) => { const list = imgs.filter((i) => i.kind === k) if (!list.length) return '' - return `
${label} · ${list.length}
${list.map((i) => - ``).join('')}
` }).join('') body.innerHTML = ` -

${ic('type')}Texte

+

${ic('type')}${t('itch.texts')}

${row('Title', d.title)} ${row('Short description', d.tagline, tlCount)} ${shortRow}
- ${d.descriptionHtml == null ? `

${ic('file-code')}Description

Keine description.html im Paket – „Ergänzen mit Claude“ in Aktionen erzeugt sie.
` : ''} - ${htmlBlock('desc', 'Description', d.descriptionHtml, `${words} Wörter`)} + ${d.descriptionHtml == null ? `

${ic('file-code')}Description

${t('itch.noDescHtml')}
` : ''} + ${htmlBlock('desc', 'Description', d.descriptionHtml, t('itch.nWords', { n: words }))} ${tagsBlock} ${htmlBlock('install', 'Install instructions', d.installHtml)} -

${ic('images')}Bilder Klick zeigt die Datei im Explorer – von dort in itch.io ziehen

- ${gallery || '
Keine Bilder im Paket.
'} - ${d.media?.length ? `
${ic('film', 'sm')} Weitere Dateien: ${d.media.map(escapeHtml).join(', ')}
` : ''} +

${ic('images')}${t('itch.images')} ${t('itch.imagesHint')}

+ ${gallery || `
${t('itch.noImages')}
`} + ${d.media?.length ? `
${ic('film', 'sm')} ${t('itch.moreFiles')}: ${d.media.map(escapeHtml).join(', ')}
` : ''}
- ${otherFields.length ? `

${ic('list')}Weitere Felder („Edit game“)

+ ${otherFields.length ? `

${ic('list')}${t('itch.moreFields')}

${otherFields.map((f) => `
${escapeHtml(f.key)}
-
${f.placeholder ? 'noch offen' : escapeHtml(f.text)}
- +
${f.placeholder ? `${t('itch.openField')}` : escapeHtml(f.text)}
+
`).join('')}
` : ''} -
${ic('shield-check', 'sm')} Nichts wird automatisch hochgeladen – Texte kopieren, Bilder aus dem Ordner auf itch.io ziehen.
` +
${ic('shield-check', 'sm')} ${t('itch.nothingUploaded')}
` const html = { desc: d.descriptionHtml, install: d.installHtml } for (const f of body.querySelectorAll('iframe[data-html]')) { f.srcdoc = `${html[f.dataset.html]}` } for (const b of body.querySelectorAll('[data-copy]')) b.onclick = () => copyText(b.dataset.copy, b.dataset.what) - for (const b of body.querySelectorAll('[data-rich]')) b.onclick = () => copyHtml(html[b.dataset.rich], b.dataset.rich === 'desc' ? 'Description' : 'Install-Text') + for (const b of body.querySelectorAll('[data-rich]')) b.onclick = () => copyHtml(html[b.dataset.rich], b.dataset.rich === 'desc' ? 'Description' : t('itch.installText')) for (const b of body.querySelectorAll('[data-raw]')) b.onclick = () => copyText(html[b.dataset.raw], 'HTML') for (const b of body.querySelectorAll('.ishot')) b.onclick = () => postJson(api(name, 'itch/open'), { f: b.dataset.file }).catch((e) => toast(e.message, 'triangle-alert')) } @@ -2742,13 +2793,26 @@ async function setProgram(name, program) { body: JSON.stringify({ program }), }) const r = await res.json().catch(() => ({})) - if (!res.ok) throw new Error(r.error ?? 'Speichern fehlgeschlagen') - toast(r.program ? `▶ startet jetzt: ${r.program}` : '▶ wählt wieder automatisch', 'pin') + if (!res.ok) throw new Error(r.error ?? t('err.saveFailed')) + toast(r.program ? t('prog.nowStarts', { prog: r.program }) : t('prog.autoAgain'), 'pin') if (editing?.name === name) { editing.program = r.program; loadDetails(name) } load() } catch (e) { toast(e.message, 'triangle-alert') } } +// Permanently deletes the whole project folder (server: /delete). Two confirms. +async function deleteProject(name, d) { + if (!confirm(t('danger.confirm1', { name, path: d?.path ?? name }))) return + if (!confirm(t('danger.confirm2', { name }))) return + try { + await postJson(api(name, 'delete')) + toast(t('danger.deleted', { name }), 'trash') + closeEditor() + await load() + await loadBackup() + } catch (e) { toast(e.message, 'triangle-alert') } +} + /* ── per-project backup ("Sichern" in Aktionen) ─────────────────────── */ let projectLastBackup = null @@ -2758,53 +2822,54 @@ function renderProjectBackup(name) { const el = document.getElementById('pbackupBody') if (!el || editing?.name !== name) return const b = backup + const T = window.I18N.t const t = curTarget() const busy = backupBusy() // the job belongs to this project; while it runs it also decides the shown target const mine = b && b.scope === name && (busy || b.target === t?.id) const last = projectLastBackup if (b?.notConfigured) { - el.innerHTML = `
${ic('hard-drive-upload')}
Noch kein Backup-Ziel festgelegt (z. B. externe Platte oder NAS).
-
` + el.innerHTML = `
${ic('hard-drive-upload')}
${T('pbackup.noTarget')}
+
` document.getElementById('pbSetup').onclick = () => openSettings(false) return } const shownT = busy && mine ? (b.targets.find((x) => x.id === b.target) ?? t) : t - let html = targetTabs(busy ? b.target : null) + `
Zuletzt gesichert
${last - ? `${new Date(last.at).toLocaleString('de-DE', { dateStyle: 'medium', timeStyle: 'short' })} (${timeAgo(last.at)}) · ${last.how}` - : 'noch nie'}
-
Ziel
${escapeHtml(shownT ? `${shownT.path}\\${name}` : '…')}
- ${projectTargets.length > 1 ? `
Alle Ziele
${projectTargets.map((x) => { + let html = targetTabs(busy ? b.target : null) + `
${T('pbackup.lastSaved')}
${last + ? `${new Date(last.at).toLocaleString(I18N.locale(), { dateStyle: 'medium', timeStyle: 'short' })} (${timeAgo(last.at)}) · ${last.how}` + : `${T('cloud.never')}`}
+
${T('pbackup.target')}
${escapeHtml(shownT ? `${shownT.path}\\${name}` : '…')}
+ ${projectTargets.length > 1 ? `
${T('pbackup.allTargets')}
${projectTargets.map((x) => { const lv = !x.last ? 'red' : (Date.now() - new Date(x.last.at)) / 86400000 > BACKUP_FRESH_DAYS ? 'yellow' : 'green' - return `${ic('hard-drive', 'sm')}${escapeHtml(x.name)} · ${x.last ? timeAgo(x.last.at) : 'nie'}` + return `${ic('hard-drive', 'sm')}${escapeHtml(x.name)} · ${x.last ? timeAgo(x.last.at) : T('cloud.never')}` }).join('')}
` : ''}
` if (busy && mine && b.phase === 'checking') { - html += `
${ic('loader')}
Prüfe, was im Backup fehlt…
` + html += `
${ic('loader')}
${T('pbackup.checking')}
` } else if (busy && mine && b.phase === 'copying') { const pr = b.progress const pct = pr.bytesTotal ? Math.min(100, Math.round((pr.bytes / pr.bytesTotal) * 100)) : 0 - html += `
Kopiere… ${pct} %${fmtBytes(pr.bytes)} / ${fmtBytes(pr.bytesTotal)}
+ html += `
${T('pbackup.copyingPct', { pct })}${fmtBytes(pr.bytes)} / ${fmtBytes(pr.bytesTotal)}
-
${pr.files.toLocaleString('de-DE')} / ${pr.filesTotal.toLocaleString('de-DE')} Dateien
+
${T('pbackup.nFiles', { done: pr.files.toLocaleString(I18N.locale()), total: pr.filesTotal.toLocaleString(I18N.locale()) })}
${escapeHtml(pr.current)}
` } else if (busy) { - html += `
${ic('hourglass')}
Es läuft gerade ein anderes Backup (${b.scope ? escapeHtml(b.scope) : 'alle Projekte'}). Danach geht es hier.
` + html += `
${ic('hourglass')}
${T('pbackup.otherRunning', { scope: b.scope ? escapeHtml(b.scope) : T('pbackup.allProjects') })}
` } else if (mine && b.phase === 'done') { const l = shownT?.lastByProject?.[name] html += l && l.files - ? `
${ic('circle-check')}
Gesichert. ${l.files.toLocaleString('de-DE')} Dateien (${fmtBytes(l.bytes)}) neu ins Backup kopiert.
` - : `
${ic('circle-check')}
Alles aktuell. Im Backup fehlte nichts.
` + ? `
${ic('circle-check')}
${T('pbackup.savedBold')} ${T('pbackup.copiedN', { n: l.files.toLocaleString(I18N.locale()), size: fmtBytes(l.bytes) })}
` + : `
${ic('circle-check')}
${T('pbackup.upToDate')} ${T('pbackup.nothingMissing')}
` } else if (mine && b.phase === 'error') { html += `
${ic('triangle-alert')}
${escapeHtml(b.error)}
` } else if (mine && b.phase === 'cancelled') { - html += `
${ic('circle-x')}
Abgebrochen. Bereits kopierte Dateien bleiben im Backup.
` + html += `
${ic('circle-x')}
${T('pbackup.cancelled')}
` } html += `
${busy && mine - ? `` - : ``}
-
Prüft das Projekt im Backup und kopiert nur fehlende und geänderte Dateien. Gelöscht wird dort nichts.
` + ? `` + : ``}
+
${T('pbackup.hint')}
` el.innerHTML = html const save = document.getElementById('pbSave') @@ -2828,7 +2893,7 @@ async function loadDetails(name) { renderInfo(name, d) renderActions(name, d) } catch (e) { - document.getElementById('sec-info').innerHTML = `
Fehler: ${escapeHtml(e.message)}
` + document.getElementById('sec-info').innerHTML = `
${t('nest.error')}: ${escapeHtml(e.message)}
` } } @@ -2848,13 +2913,13 @@ function openEditor(p) { document.getElementById('fStart').value = p.start ?? '' document.getElementById('fItch').value = p.itch ?? '' document.getElementById('fItchHint').innerHTML = p.itch === '-' - ? `${ic('circle-off', 'sm')} als „nicht veröffentlicht“ markiert` + ? `${ic('circle-off', 'sm')} ${t('edit.itchNot')}` : p.published?.source === 'auto' - ? `${ic('sparkles', 'sm')} automatisch erkannt: ${escapeHtml(p.published.title)} – ${escapeHtml(p.published.url)}` - : p.published ? '' : `${ic('info', 'sm')} nicht auf dem itch.io-Profil gefunden` + ? `${ic('sparkles', 'sm')} ${t('edit.itchAuto', { title: escapeHtml(p.published.title) })} – ${escapeHtml(p.published.url)}` + : p.published ? '' : `${ic('info', 'sm')} ${t('edit.itchNotFound')}` document.getElementById('fNotes').value = p.notes renderTaskList() - const loading = `
${ic('loader', 'sm')} Lädt…
` + const loading = `
${ic('loader', 'sm')} ${t('itch.loading')}
` document.getElementById('sec-info').innerHTML = loading document.getElementById('sec-actions').innerHTML = loading document.getElementById('overlay').classList.add('open') @@ -2884,10 +2949,10 @@ async function saveEditor() { tasks: editingTasks, } if (await patchProject(editing.name, body)) { - toast('Gespeichert', 'save') + toast(t('edit.saved'), 'save') closeEditor() load() - } else toast(patchProject.error || 'Speichern fehlgeschlagen', 'triangle-alert') + } else toast(patchProject.error || t('err.saveFailed'), 'triangle-alert') } /* ── backup (NAS) ─────────────────────────────────────────────────────── */ @@ -2919,7 +2984,7 @@ function targetTabs(busyId) { const list = backup?.targets ?? [] if (list.length < 2) return '' const cur = curTargetId() - return `
${list.map((t) => ``).join('')}
` + return `
${list.map((x) => ``).join('')}
` } document.addEventListener('click', (e) => { const b = e.target.closest('.ttabs [data-target]') @@ -2932,8 +2997,8 @@ async function loadBackup() { try { backup = await (await fetch('/api/backup')).json() } catch { return } if (wasBusy && !backupBusy()) { load() // refresh the backup badges on cards/tiles/list - if (wasAuto) toast(backup.phase === 'done' ? 'Automatisches Backup fertig' : `Automatisches Backup: ${backup.error ?? 'abgebrochen'}`, backup.phase === 'done' ? 'circle-check' : 'triangle-alert') - } else if (!wasBusy && backupBusy() && backup.auto) toast('Automatisches Backup läuft …', 'hard-drive-upload') + if (wasAuto) toast(backup.phase === 'done' ? t('backup.autoDone') : t('backup.autoFail', { err: backup.error ?? t('backup.cancelledWord') }), backup.phase === 'done' ? 'circle-check' : 'triangle-alert') + } else if (!wasBusy && backupBusy() && backup.auto) toast(t('backup.autoRunning'), 'hard-drive-upload') renderBackupButton() if (document.getElementById('spanel').classList.contains('open')) renderAutoStatus() if (document.getElementById('bpanel').classList.contains('open')) renderBackup() @@ -2950,21 +3015,23 @@ function renderBackupButton() { const sub = document.getElementById('backupSub') if (!backup) return const btn = document.getElementById('btnBackup') - btn.title = (backup.targets ?? []).map((t) => `${t.name}: ${t.last ? 'zuletzt ' + timeAgo(t.last.at) : 'noch nie komplett gesichert'}`).join('\n') || 'Backup-Ziel einrichten' - if (backup.notConfigured) { sub.textContent = '· einrichten'; sub.classList.add('warn'); return } + const T = window.I18N.t + btn.title = (backup.targets ?? []).map((x) => `${x.name}: ${x.last ? T('backup.lastAgo', { ago: timeAgo(x.last.at) }) : T('backup.neverComplete')}`).join('\n') || T('pbackup.setupTarget') + if (backup.notConfigured) { sub.textContent = '· ' + T('backup.setup'); sub.classList.add('warn'); return } const t = curTarget() const last = t?.last const prefix = backup.targets.length > 1 ? `· ${t.name} ` : '· ' - if (backup.phase === 'checking') sub.textContent = backup.auto ? '· auto: prüft…' : '· prüft…' + if (backup.phase === 'checking') sub.textContent = backup.auto ? '· ' + T('backup.autoChecking') : '· ' + T('backup.checkingShort') else if (backup.phase === 'copying') { const pr = backup.progress sub.textContent = `· ${backup.auto ? 'auto ' : ''}${pr.bytesTotal ? Math.round((pr.bytes / pr.bytesTotal) * 100) : 0} %` - } else if (dueCount()) sub.textContent = `· ${dueCount()} fällig` + } else if (dueCount()) sub.textContent = `· ${T('backup.nDue', { n: dueCount() })}` else if (last) sub.textContent = `${prefix}${timeAgo(last.at)}` - else sub.textContent = `${prefix}noch nie` + else sub.textContent = `${prefix}${T('cloud.never')}` const old = last && (Date.now() - new Date(last.at)) > BACKUP_FRESH_DAYS * 86400000 sub.classList.toggle('warn', !last || old || last.ok === false || dueCount() > 0) - if (dueCount()) btn.title += `\n\n${dueCount()} Projekte seit dem letzten Backup geändert (älter als ${BACKUP_FRESH_DAYS} Tage) – Filter „Backup fällig“` + if (dueCount()) btn.title += `\n\n${T('backup.dueTitle', { n: dueCount(), days: BACKUP_FRESH_DAYS })}` + fitHeader() } const dueCount = () => projects.filter(backupDue).length @@ -2974,7 +3041,7 @@ function remindBackup() { if (!n || backup?.notConfigured || backupBusy()) return const today = new Date().toISOString().slice(0, 10) try { if (localStorage.getItem('dash.backupReminded') === today) return; localStorage.setItem('dash.backupReminded', today) } catch {} - toast(`Backup fällig: ${n} ${n === 1 ? 'Projekt wurde' : 'Projekte wurden'} seit dem letzten Backup geändert – oben auf „Backup“ klicken`, 'clock-alert') + toast(t(n === 1 ? 'backup.remind1' : 'backup.remindN', { n }), 'clock-alert') } async function backupAction(what) { @@ -2986,12 +3053,13 @@ async function backupAction(what) { } function renderBackup() { + const T = window.I18N.t let b = backup if (!b) return if (b.notConfigured) { - document.getElementById('bpTarget').textContent = 'kein Ziel festgelegt' - document.getElementById('bpBody').innerHTML = `
${ic('hard-drive-upload')}
Noch kein Backup-Ziel festgelegt. Wähle einen Ordner auf einer externen Platte, einem NAS oder einem anderen Laufwerk.
-
` + document.getElementById('bpTarget').textContent = T('backup.noTargetShort') + document.getElementById('bpBody').innerHTML = `
${ic('hard-drive-upload')}
${T('backup.noTargetLong')}
+
` document.getElementById('bpSetup').onclick = () => openSettings(false) return } @@ -3003,57 +3071,55 @@ function renderBackup() { document.getElementById('bpTarget').innerHTML = `${ic('folder', 'sm')} ${escapeHtml(b.source)} ${ic('arrow-right', 'sm')} ${escapeHtml(t.path)}` const tl = t.last const last = tl - ? `
Letztes Backup
${new Date(tl.at).toLocaleString('de-DE', { dateStyle: 'medium', timeStyle: 'short' })} (${timeAgo(tl.at)})
-
Kopiert
${tl.files.toLocaleString('de-DE')} Dateien · ${fmtBytes(tl.bytes)}${tl.ok === false ? ' · unvollständig' : ''}
` - : `
Auf „${escapeHtml(t.name)}“ wurde über das Dashboard noch kein Komplett-Backup gemacht.
` + ? `
${T('backup.lastBackup')}
${new Date(tl.at).toLocaleString(I18N.locale(), { dateStyle: 'medium', timeStyle: 'short' })} (${timeAgo(tl.at)})
+
${T('backup.copied')}
${T('backup.nFilesCell', { n: tl.files.toLocaleString(I18N.locale()) })} · ${fmtBytes(tl.bytes)}${tl.ok === false ? ` · ${T('cloud.incomplete')}` : ''}
` + : `
${T('backup.noneOnTarget', { name: escapeHtml(t.name) })}
` - let body = targetTabs(busy ? b.target : null) + section('clock-3', `Status – ${escapeHtml(t.name)}`, last) + let body = targetTabs(busy ? b.target : null) + section('clock-3', T('backup.statusOf', { name: escapeHtml(t.name) }), last) b = { ...b, phase } if (b.scope && b.phase !== 'idle') { - body += `
${ic('folder')}
Der aktuelle Lauf betrifft nur das Projekt ${escapeHtml(b.scope)} (gestartet über „Sichern“ im Projekt).
` + body += `
${ic('folder')}
${T('backup.scopeNote', { scope: escapeHtml(b.scope) })}
` } if (b.phase === 'checking') { - body += `
${ic('loader')}
Prüfe, was neu ist und im Backup fehlt…
Dauert über das Netzwerk etwa 1–2 Minuten.
-
` + body += `
${ic('loader')}
${T('backup.checkingLong')}
${T('backup.checkingTime')}
+
` } else if (b.phase === 'copying') { const pr = b.progress const pct = pr.bytesTotal ? Math.min(100, Math.round((pr.bytes / pr.bytesTotal) * 100)) : 0 - body += section('hard-drive-upload', 'Kopiere…', ` + body += section('hard-drive-upload', T('backup.copyingTitle'), `
${pct} %${fmtBytes(pr.bytes)} / ${fmtBytes(pr.bytesTotal)}
-
${pr.files.toLocaleString('de-DE')} / ${pr.filesTotal.toLocaleString('de-DE')} Dateien
+
${T('pbackup.nFiles', { done: pr.files.toLocaleString(I18N.locale()), total: pr.filesTotal.toLocaleString(I18N.locale()) })}
${escapeHtml(pr.current)}
`) - + `
-
Das Fenster bitte offen lassen, bis das Backup fertig ist.
` + + `
+
${T('backup.keepOpen')}
` } else if (b.phase === 'ready' && b.check) { const c = b.check if (!c.files) { - body += `
${ic('circle-check')}
Alles aktuell. Im Backup fehlt nichts.
` + body += `
${ic('circle-check')}
${T('pbackup.upToDate')} ${T('backup.nothingMissing')}
` } else { - body += section('scan-search', `Ergebnis der Prüfung ${timeAgo(c.at)}`, ` + body += section('scan-search', `${T('backup.checkResult')} ${timeAgo(c.at)}`, `
-
${ic('file-plus', 'sm')}Neu
${c.newFiles.toLocaleString('de-DE')}
${fmtBytes(c.newBytes)}
-
${ic('file-pen', 'sm')}Geändert
${c.changedFiles.toLocaleString('de-DE')}
${fmtBytes(c.changedBytes)}
-
${ic('archive', 'sm')}Nur im Backup
${c.extraFiles.toLocaleString('de-DE')}
bleiben erhalten
+
${ic('file-plus', 'sm')}${T('backup.new')}
${c.newFiles.toLocaleString(I18N.locale())}
${fmtBytes(c.newBytes)}
+
${ic('file-pen', 'sm')}${T('backup.changed')}
${c.changedFiles.toLocaleString(I18N.locale())}
${fmtBytes(c.changedBytes)}
+
${ic('archive', 'sm')}${T('backup.onlyInBackup')}
${c.extraFiles.toLocaleString(I18N.locale())}
${T('backup.kept')}
- ${c.projects.slice(0, 15).map((p) => ``).join('')}
${escapeHtml(p.name)}${p.files.toLocaleString('de-DE')} Dateien${fmtBytes(p.bytes)}
- ${c.projects.length > 15 ? `
+ ${c.projects.length - 15} weitere Projekte
` : ''}`) + ${c.projects.slice(0, 15).map((p) => ``).join('')}
${escapeHtml(p.name)}${T('backup.nFilesCell', { n: p.files.toLocaleString(I18N.locale()) })}${fmtBytes(p.bytes)}
+ ${c.projects.length > 15 ? `
${T('backup.moreProjects', { n: c.projects.length - 15 })}
` : ''}`) } body += `
- - ${c.files ? `` : ''} + + ${c.files ? `` : ''}
` } else { - if (b.phase === 'done') body += `
${ic('circle-check')}
Backup fertig. ${tl && !b.scope ? `${tl.files.toLocaleString('de-DE')} Dateien, ${fmtBytes(tl.bytes)} kopiert.` : ''}
` - if (b.phase === 'cancelled') body += `
${ic('circle-x')}
Abgebrochen. Bereits kopierte Dateien bleiben im Backup.
` + if (b.phase === 'done') body += `
${ic('circle-check')}
${T('backup.done')} ${tl && !b.scope ? T('backup.doneN', { n: tl.files.toLocaleString(I18N.locale()), size: fmtBytes(tl.bytes) }) : ''}
` + if (b.phase === 'cancelled') body += `
${ic('circle-x')}
${T('pbackup.cancelled')}
` if (b.phase === 'error') body += `
${ic('triangle-alert')}
${escapeHtml(b.error)}
` - body += `
` + body += `
` } - body += `
${ic('shield-check', 'sm')} Im Backup wird nie etwas gelöscht – nur neue und geänderte Dateien kommen dazu. - Nicht gesichert (wird neu erzeugt): ${escapeHtml((settingsCache?.backup?.excludeDirs ?? ['node_modules', '__pycache__', '.gradle', '.venv']).join(', '))}. - Ziel und Ausnahmen: Einstellungen (Zahnrad oben).
` + body += `
${ic('shield-check', 'sm')} ${T('backup.footerHint', { exclude: escapeHtml((settingsCache?.backup?.excludeDirs ?? ['node_modules', '__pycache__', '.gradle', '.venv']).join(', ')) })}
` document.getElementById('bpBody').innerHTML = body const on = (id, fn) => { const el = document.getElementById(id); if (el) el.onclick = fn } @@ -3103,6 +3169,96 @@ function initTheme() { systemDark.addEventListener('change', () => { if (themeMode === 'system') applyTheme() }) for (const b of document.querySelectorAll('#themeSeg button')) b.onclick = () => setThemeMode(b.dataset.mode) +/* ── language (Einstellungen → Allgemein) ─────────────────────────────── */ +// Static text is swapped by I18N via data-i18n attributes; dynamic parts are +// re-rendered here after a switch. English is the default (see i18n.js). +function initLang() { + const sel = document.getElementById('fLang') + if (sel) { + sel.innerHTML = Object.entries(I18N.langs).map(([code, name]) => ``).join('') + sel.value = I18N.get() + sel.addEventListener('change', () => I18N.set(sel.value)) + } + I18N.onChange(() => { + const sl = document.getElementById('fLang'); if (sl) sl.value = I18N.get() + try { render() } catch {} + try { renderBackupButton() } catch {} + try { renderRootPicker() } catch {} + if (editing) try { openEditor(editing) } catch {} + const sp = document.getElementById('spanel') + if (sp.classList.contains('open')) { I18N.apply(sp); try { renderAutoStatus() } catch {} } + }) +} + +/* ── start screen: progress while the projects are read ───────────────── */ + +// 1/2 projects (git, sizes, tech - the first /api/projects), 2/2 "last change" of +// every project (lib/activity.js, background). Shows count, bar and time left. +let boot = null +function startBoot() { + const el = document.getElementById('boot') + boot = { step: 1, t0: Date.now(), timer: null, loaded: false } + el.hidden = false + document.getElementById('bootSkip').onclick = endBoot + const tick = async () => { + if (!boot) return + try { + const r = await (await fetch('/api/progress')).json() + if (!boot) return + if (boot.step === 1) { + const pj = r.projects + showBoot(1, pj.phase === 'itch' ? t('boot.itch') : t('boot.reading2'), pj.done, pj.total) + } else { + const total = r.activity.total || 1 + const done = Math.max(0, total - r.activity.pending) + if (!r.activity.pending) return endBoot() + showBoot(2, t('boot.changes'), done, total) + } + } catch {} + if (boot) boot.timer = setTimeout(tick, 300) + } + // only worth a screen when it takes a moment + boot.timer = setTimeout(tick, 150) +} +function showBoot(step, label, done, total) { + if (boot.shownStep !== step) { boot.shownStep = step; boot.t0 = Date.now(); boot.d0 = done } + const pct = total ? Math.min(100, Math.round((done / total) * 100)) : 0 + document.getElementById('bootStep').textContent = t('boot.step', { step }) + document.getElementById('bootLabel').textContent = label + document.getElementById('bootBar').style.width = `${pct}%` + document.getElementById('bootCount').textContent = total ? `${done} / ${total}` : '' + // time left from the speed of this step so far + const secs = (Date.now() - boot.t0) / 1000 + const rate = (done - (boot.d0 ?? 0)) / Math.max(secs, 0.1) + const left = rate > 0 && total > done ? Math.ceil((total - done) / rate) : null + document.getElementById('bootEta').textContent = left == null ? t('boot.estimating') : left < 2 ? t('boot.almost') : left < 60 ? t('boot.etaS', { s: left }) : t('boot.etaMin', { m: Math.ceil(left / 60) }) +} +// the projects are there: step 2 only while "last change" is still being collected +function bootLoaded() { + if (!boot) return + if (noneShown || !projects.length || document.getElementById('spanel').classList.contains('open')) return endBoot() + boot.step = 2 +} +function endBoot() { + if (!boot) return + clearTimeout(boot.timer) + boot = null + const el = document.getElementById('boot') + el.classList.add('done') + setTimeout(() => { el.hidden = true }, 250) +} + +/* ── header: gets more compact step by step when it does not fit ──────── */ + +function fitHeader() { + const bar = document.querySelector('.topbar') + const levels = 4 + for (let i = 1; i <= levels; i++) document.body.classList.remove(`hc${i}`) + for (let i = 1; i <= levels && bar.scrollWidth > bar.clientWidth + 1; i++) document.body.classList.add(`hc${i}`) +} +new ResizeObserver(fitHeader).observe(document.querySelector('.topbar')) +window.addEventListener('resize', fitHeader) + /* ── wiring ───────────────────────────────────────────────────────────── */ document.getElementById('btnCancel').onclick = closeEditor @@ -3141,6 +3297,7 @@ document.addEventListener('keydown', (e) => { const [hashView, hashProject, hashSec] = decodeURIComponent(location.hash.slice(1)).split('/') const VIEWS = ['home', 'board', 'gallery', 'list', 'tasks', 'storage', 'activity'] initTheme() +initLang() initUiMode() if (VIEWS.includes(hashView)) setView(hashView) else try { const v = localStorage.getItem('dash.view'); if (VIEWS.includes(v)) setView(v) } catch {} @@ -3150,7 +3307,9 @@ function openFromHash(project, sec) { const p = project && projects.find((x) => x.name === project) if (p) { openEditor(p); if (sec) setSection(sec) } } -load().then(() => { openFromHash(hashProject, hashSec); if (hashView === 'backup') openBackup() }) +document.getElementById('noneOpen').onclick = (e) => { e.stopPropagation(); toggleRootMenu(true) } +startBoot() +load().then(() => { bootLoaded(); openFromHash(hashProject, hashSec); if (hashView === 'backup') openBackup() }) loadBackup() // an automatic backup can start any time: look once a minute (while busy, loadBackup polls every second) setInterval(() => { if (!backupBusy()) loadBackup() }, 60000) diff --git a/public/i18n.js b/public/i18n.js new file mode 100644 index 0000000..b2832ad --- /dev/null +++ b/public/i18n.js @@ -0,0 +1,55 @@ +/* Dashboard i18n. Dictionaries live in lang.js (window.LANG = { en: {...}, de: {...} }). + Loaded before app.js, so app.js can use the global t(). Default language: English. + + t(key, vars) -> translated string; {name} placeholders filled from vars + I18N.apply(root) fills [data-i18n] (text), [data-i18n-html], [data-i18n-title], [data-i18n-placeholder] + I18N.set(code) switch language, remember it, re-apply, notify listeners + I18N.get() current language code + I18N.langs { code: 'Native name' } for the picker + I18N.locale() matching BCP-47 locale for Date/number formatting + I18N.onChange(fn) run fn(code) after every switch (used to re-render dynamic parts) + + Add a language: add its dictionary in lang.js and a row in LANGS below. */ +(function () { + 'use strict'; + const LANGS = { en: 'English', de: 'Deutsch' }; + const LOCALE = { en: 'en-US', de: 'de-DE' }; + const DEFAULT = 'en'; + const dict = () => (typeof window !== 'undefined' && window.LANG) || {}; + const saved = (() => { try { return localStorage.getItem('dash.lang'); } catch { return null; } })(); + let lang = saved && dict()[saved] ? saved : DEFAULT; + const listeners = []; + + function t(key, vars) { + let s = dict()[lang]?.[key] ?? dict()[DEFAULT]?.[key] ?? key; + if (vars) for (const [k, v] of Object.entries(vars)) s = s.split('{' + k + '}').join(String(v)); + return s; + } + function apply(root) { + root = root || document; + for (const el of root.querySelectorAll('[data-i18n]')) el.textContent = t(el.dataset.i18n); + for (const el of root.querySelectorAll('[data-i18n-html]')) el.innerHTML = t(el.dataset.i18nHtml); + for (const el of root.querySelectorAll('[data-i18n-title]')) el.title = t(el.dataset.i18nTitle); + for (const el of root.querySelectorAll('[data-i18n-placeholder]')) el.placeholder = t(el.dataset.i18nPlaceholder); + document.documentElement.lang = lang; + } + function set(code) { + if (!dict()[code] || code === lang) return; + lang = code; + try { localStorage.setItem('dash.lang', code); } catch {} + apply(); + for (const fn of listeners) { try { fn(code); } catch (e) { console.error(e); } } + } + + window.I18N = { + t, apply, set, + get: () => lang, + langs: LANGS, + locale: () => LOCALE[lang] || 'en-US', + onChange: (fn) => listeners.push(fn), + }; + window.t = t; + + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => apply()); + else apply(); +})(); diff --git a/public/index.html b/public/index.html index 24d5690..9b722d6 100644 --- a/public/index.html +++ b/public/index.html @@ -85,7 +85,6 @@ #search { padding: 8px 12px 8px 32px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; width: 240px; background: var(--surface); outline: none; } #search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .seg.theme button { padding: 6px 10px; } - @media (max-width: 1600px) { .seg.theme button span { display: none; } } .iconbtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--muted); } .iconbtn:hover { color: var(--text); border-color: var(--border-strong); } @@ -251,6 +250,8 @@ .card-sec { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 14px; } .card-sec h4 { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; gap: 7px; } .card-sec h4 .i { color: var(--accent); } + .dangerzone { border-color: var(--red); background: var(--red-soft); } + .dangerzone .hint { color: var(--red); opacity: .95; } .kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; } .kv > div:nth-child(odd) { color: var(--muted); } .kv > div { word-break: break-word; } @@ -284,6 +285,10 @@ .toolbar { padding: 10px 22px 0; } main { flex: 1 1 auto; min-height: 0; padding: 10px 22px 14px; overflow: hidden; container-type: inline-size; container-name: main; } .view.active { height: 100%; } + /* simple/home page: fixed bar on top, only the grid scrolls */ + #home.active { display: flex; flex-direction: column; } + #home .homebar { flex: 0 0 auto; } + #home #homeGrid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; } /* activity page */ #activity.active { overflow-y: auto; overflow-x: hidden; padding-right: 4px; } .heatscroll { overflow-x: auto; padding-bottom: 4px; } @@ -583,7 +588,28 @@ .hpill:hover { color: var(--text); border-color: var(--accent); } .hpill.active { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 600; } .hpill .n { font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; } + .hpill.due { color: var(--yellow, #f59e0b); } + .hpill.due.active { background: color-mix(in srgb, var(--yellow, #f59e0b) 18%, transparent); color: var(--yellow, #f59e0b); } + .homebar .hctl { margin-left: auto; display: flex; gap: 8px; align-items: center; } + .homebar .hctl select { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; } + .hseg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; } + .hseg button { font: inherit; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; padding: 6px 10px; display: inline-flex; align-items: center; } + .hseg button:hover { color: var(--text); } + .hseg button.active { background: var(--accent-soft); color: var(--accent-text); } + .hseg button + button { border-left: 1px solid var(--border); } #homeGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; } + #homeGrid.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; } + #homeGrid.compact .htile { padding: 12px; gap: 7px; } + #homeGrid.compact .htile .hicon { width: 40px; height: 40px; flex-basis: 40px; font-size: 15px; } + #homeGrid.compact .htile .hdesc { -webkit-line-clamp: 1; min-height: 0; } + #homeGrid.list { grid-template-columns: 1fr; gap: 8px; } + #homeGrid.list .htile { flex-direction: row; align-items: center; padding: 10px 16px; gap: 16px; } + #homeGrid.list .htile .hhead { flex: 1 1 40%; min-width: 0; } + #homeGrid.list .htile .hicon { width: 38px; height: 38px; flex-basis: 38px; font-size: 14px; border-radius: 10px; } + #homeGrid.list .htile .hdesc { flex: 2 1 0; min-height: 0; margin: 0; -webkit-line-clamp: 2; } + #homeGrid.list .htile .hfoot { flex: 0 0 auto; margin: 0; padding: 0; border: 0; } + #homeGrid.list .hgroup { padding: 2px 0; } + @container main (max-width: 680px) { #homeGrid.list .htile .hdesc { display: none; } } .htile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s, box-shadow .12s; min-width: 0; } .htile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); } .htile .hhead { display: flex; gap: 12px; align-items: center; min-width: 0; } @@ -598,7 +624,10 @@ .htile .hfoot .when { font-size: 12px; color: var(--muted); } .htile .hfoot .qsg { margin-left: auto; } .htile .hdue { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow, #f59e0b); flex: 0 0 8px; } - .featrow { display: flex !important; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); cursor: pointer; } + .appwin { display: flex; flex-direction: column; gap: 10px; } + .featrow { display: flex !important; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; } + .featrow:hover { border-color: var(--border-strong); } + .featrow:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .featrow input { margin-top: 3px; } .featrow b { display: inline-flex; gap: 5px; align-items: center; } /* favorites */ @@ -615,6 +644,33 @@ .htile:hover .favbtn.ontile, .favbtn.ontile.on { opacity: 1; } .hgroup { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 6px; } .hgroup:first-child { margin-top: 0; } + .nonebox { display: flex; gap: 16px; align-items: center; margin: 12vh auto 0; max-width: 560px; padding: 22px 24px; border: 1px dashed var(--border); border-radius: 16px; background: var(--surface); color: var(--text); } + .nonebox[hidden] { display: none; } + .nonebox > .i { color: var(--muted); flex: 0 0 auto; } + .nonebox .btn { margin-left: auto; flex: 0 0 auto; } + body:has(#noneBox:not([hidden])) main > .view { display: none !important; } + /* start screen with progress */ + .boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); transition: opacity .25s; } + .boot[hidden] { display: none; } + .boot.done { opacity: 0; } + .bootcard { width: min(440px, calc(100vw - 32px)); padding: 28px 28px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; } + .bootcard .logo { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-bottom: 6px; } + .bootstep { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } + .bootlabel { font-size: 15px; font-weight: 600; } + .bootbar { width: 100%; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; } + .bootbar > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; } + .bootmeta { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } + .bootcard .btn { margin-top: 8px; font-size: 12px; } + /* header compaction levels (set by fitHeader when it does not fit) */ + body.hc1 .seg#tabs button .tl { display: none; } + body.hc1 .seg#tabs button { padding: 6px 10px; } + body.hc1 .seg.theme button span { display: none; } + body.hc2 .brand .count, body.hc2 #btnBackup .bsub { display: none; } + body.hc2 .searchbox { max-width: 170px; min-width: 90px; } + body.hc3 #btnNew > span, body.hc3 #btnBackup > span:not(.bsub) { display: none; } + body.hc3 .topbar { gap: 8px; } + body.hc4 #themeSeg { display: none; } + body.hc4 .brand h1 { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pdesc { font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; } .pdesc.muted { color: var(--muted); font-style: italic; } .pdesc-edit textarea { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.5; } @@ -663,11 +719,20 @@ .sptabs button.active .tabn { background: var(--accent-soft); color: var(--accent-text); } .sptabs button.has-err { color: var(--red); } .sptabs button.has-err::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); } - #spanel .pbody { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; } - .spane { display: flex; flex-direction: column; gap: 12px; } + #spanel .pbody { display: flex; flex-direction: column; gap: 15px; padding-top: 14px; } + .spane { display: flex; flex-direction: column; gap: 11px; } .spane[hidden] { display: none; } - .sphead h4 { margin: 0; font-size: 14px; } - .sphead p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; } + .sphead h4 { margin: 0; font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; } + /* accent icon chip makes each section instantly recognizable */ + .sphead h4 .i { width: 22px; height: 22px; padding: 4px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); box-sizing: border-box; flex: 0 0 auto; } + .sphead p { margin: 3px 0 0 30px; font-size: 12px; color: var(--muted); line-height: 1.5; } + /* a sub-section inside a pane: hairline divider + a quiet uppercase label (subordinate to the main header) */ + .sphead.sep { margin-top: 2px; padding-top: 13px; border-top: 1px solid var(--border); } + .sphead.sep h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); gap: 7px; } + .sphead.sep h4 .i { width: 14px; height: 14px; padding: 0; background: transparent; color: var(--muted); border-radius: 0; } + .sphead.sep p { margin-left: 21px; } + /* separate stacked field groups (backup pane) with the same hairline */ + .spane > .spfield + .spfield { margin-top: 1px; padding-top: 13px; border-top: 1px solid var(--border); } .slist { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; } .slist:empty { display: none; } .sitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 10px 10px 12px; background: var(--surface); } @@ -698,7 +763,7 @@ .ibtn:disabled { opacity: .35; cursor: default; border-color: var(--border); color: var(--muted); } body.no-picker .ibtn.pickbtn { display: none; } .spfield { display: flex; flex-direction: column; gap: 6px; } - .spfield > label { font-size: 12px; font-weight: 600; color: var(--muted); } + .spfield > label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .remindrow { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .remindrow input { width: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 13px; outline: none; } .remindrow input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } @@ -724,6 +789,10 @@ .spstatus a { color: inherit; font-weight: 600; } #spanel .kv { grid-template-columns: 150px minmax(0, 1fr); } #spError { margin: 0 20px 10px; } + .about { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); } + .about .anm { color: var(--text); font-weight: 600; } + .about .ver { font-size: 11px; background: var(--surface-3); color: var(--muted); padding: 1px 7px; border-radius: 9px; } + .about a.btn { margin-left: auto; } #spanel .pfoot { align-items: center; } #spanel .pfoot .btn { flex: 0 0 auto; padding: 8px 14px; } .spdirty { font-size: 12px; color: var(--yellow); display: flex; align-items: center; gap: 6px; visibility: hidden; } @@ -782,42 +851,53 @@ + +
-
- - - - - - - + + + + + + +
- - - -
- - + + + +
+ +
-
- - - +
+ + +
@@ -1020,210 +1105,223 @@
-

Einstellungen

-
Gilt für das ganze Dashboard
+

Settings

+
Applies to the whole dashboard
- +
- - + + - +
-

Projektordner

Ordner, deren Unterordner als Projekte erscheinen. Mindestens einer.

+

Project folders

Folders whose subfolders appear as projects. At least one.

- - - + + +
-
Wie funktioniert das?
Jeder Unterordner eines Projektordners ist ein Projekt. Welche Ordner gerade angezeigt werden, wählst du oben links neben dem Logo. Der erste Ordner ist der Hauptordner: er wird direkt ins Backup-Ziel gesichert, jeder weitere in einen Unterordner mit seinem Namen. Entfernen nimmt den Ordner nur aus der Liste – auf der Platte wird nichts gelöscht.
+
How does this work?
Every subfolder of a project folder is a project. You choose which folders are shown at the top left next to the logo. The first folder is the main folder: it is backed up straight into the backup target, each further one into a subfolder named after it. Removing takes the folder out of the list only – nothing is deleted on disk.
- Ungespeicherte Änderungen + Unsaved changes - Strg+S - - + Ctrl+S + +
-

Projektordner einlesen

-
Übergeordneten Ordner wählen und ankreuzen, was als Projektordner dazukommen soll – der Ordner selbst und/oder seine Unterordner.
+

Import project folders

+
Choose a parent folder and tick what should be added as a project folder – the folder itself and/or its subfolders.
- - - + + +
- + -
+
-

Umbenennen / verschieben

+

Rename / move

- + - + -
Das bisherige Backup bleibt unter dem alten Namen liegen; beim nächsten Backup entsteht der neue Ordner. VS Code, Konsolen und Programme aus dem Projekt vorher schließen.
+
The previous backup stays under the old name; the new folder appears on the next backup. Close VS Code, consoles and programs from the project first.
- - + +
-

Neues Projekt

- +

New project

+ - + - +
- - -
Nie kopiert: . Der Klon startet als „Idee“, ohne itch.io-Link und nur mit offenen Aufgaben.
+ + +
Never copied: . The clone starts as an “idea”, without an itch.io link and with open tasks only.
-
Legt einen leeren Ordner mit README.md an. Für ein Spiel/eine App aus den Library-Vorlagen: Skill neues-projekt in Claude Code.
+
Creates an empty folder with a README.md. For a game/app from the library templates: skill neues-projekt in Claude Code.
- - + +
-

itch.io-Seite

+

itch.io page

- - - + + +
-

Projekte in Unterordnern

+

Projects in subfolders

- +
- + - - + +
+ + diff --git a/public/lang.js b/public/lang.js new file mode 100644 index 0000000..51a513e --- /dev/null +++ b/public/lang.js @@ -0,0 +1,1438 @@ +/* Translations for the dashboard. window.LANG = { : { : } }. + English (en) is the default and the fallback for any missing key. + Placeholders: {name} in a string is replaced by t(key, { name: ... }). + To add a language: copy the `de` block, translate the values, and add the code + to LANGS in i18n.js. Static HTML uses these via data-i18n* attributes. */ +window.LANG = { + en: { + /* shared */ + 'common.cancel': 'Cancel', + 'common.save': 'Save', + 'common.close': 'Close', + 'common.closeEsc': 'Close (Esc)', + 'common.apply': 'Apply', + 'common.show': 'Show', + 'common.browse': 'Browse…', + 'status.idea': 'Idea', + 'status.active': 'Active', + 'status.paused': 'Paused', + 'status.done': 'Done', + 'status.archived': 'Archived', + 'prio.low': 'Low', + 'prio.medium': 'Medium', + 'prio.high': 'High', + 'day.0': 'Sunday', + 'day.1': 'Monday', + 'day.2': 'Tuesday', + 'day.3': 'Wednesday', + 'day.4': 'Thursday', + 'day.5': 'Friday', + 'day.6': 'Saturday', + + /* boot */ + 'boot.start': 'Starting …', + 'boot.reading': 'Reading projects', + 'boot.skip': 'Get started now', + + /* header */ + 'root.projects': 'Projects', + 'root.switch': 'Switch project folder', + 'tab.home': 'Projects', + 'tab.home.title': 'All projects as tiles', + 'tab.board': 'Board', + 'tab.board.title': 'Board', + 'tab.gallery': 'Gallery', + 'tab.gallery.title': 'Gallery', + 'tab.list': 'List', + 'tab.list.title': 'List', + 'tab.tasks': 'Tasks', + 'tab.tasks.title': 'Tasks', + 'tab.activity': 'Activity', + 'tab.activity.title': 'What was worked on, and when', + 'tab.storage': 'Storage', + 'tab.storage.title': 'Storage: who uses how much', + 'search.placeholder': 'Projects, tags, notes…', + 'btn.new': 'New', + 'btn.new.title': 'Create a new project or clone an existing one', + 'btn.backup': 'Backup', + 'btn.backup.title': 'Back up all projects to MyCloud', + 'btn.settings.title': 'Settings: project folders and backup target', + 'mode.title': 'View: simple (calm, the essentials) or advanced (everything)', + 'mode.simple': 'Simple', + 'mode.simple.title': 'Simple view – only the essentials', + 'mode.advanced': 'Advanced', + 'mode.advanced.title': 'Advanced view – all features', + 'theme.title': 'Appearance', + 'theme.light': 'Light', + 'theme.system': 'System', + 'theme.system.title': 'Match Windows', + 'theme.dark': 'Dark', + + /* toolbar */ + 'board.layout.title': 'Board layout', + 'board.cards': 'Cards', + 'board.cards.title': 'Cards with details', + 'board.rows': 'List', + 'board.rows.title': 'Compact list – one row per project', + 'flt.status.all': 'All statuses', + 'flt.sort.mtime': 'Last changed', + 'flt.sort.name': 'Name (A–Z)', + 'flt.sort.priority': 'Priority', + 'flt.sort.size': 'Size', + 'flt.sort.clean': 'Cleanable', + + /* none box */ + 'none.title': 'No project folder shown', + 'none.hint': 'Choose one or more folders at the top left, next to the logo.', + 'none.choose': 'Choose folder', + + /* activity */ + 'act.year': 'Activity over the past year', + 'act.perDay': 'Active projects per day', + 'act.hint': 'A day counts when files were last changed or commits were made on it. Files show only their last change – commits fill in the history.', + 'act.day': 'Day', + 'act.recent': 'Recently active', + 'act.range7': '7 days', + 'act.range30': '30 days', + 'act.range90': '90 days', + + /* storage */ + 'st.level': 'Level', + 'st.treemap': 'Treemap of project sizes', + 'st.largest': 'Largest projects', + 'st.hogs': 'Biggest space hogs', + 'st.hogs.hint': '– folders that can be regenerated', + 'st.deleteSelected': 'Delete selected', + + /* tasks view */ + 'task.open': 'Open', + 'task.done': 'Done', + 'task.all': 'All', + 'task.project': 'Project', + 'task.newEnter': 'New task… (Enter)', + 'task.add': 'Add', + + /* project panel */ + 'panel.explorer': 'Explorer', + 'panel.vscode': 'VS Code', + 'panel.clone': 'Clone', + 'panel.clone.title': 'Create a copy of this project as a new project', + 'panel.rename': 'Rename…', + 'panel.rename.title': 'Rename the project folder or move it to another project folder', + 'panel.edit': 'Edit', + 'panel.info': 'Info', + 'panel.actions': 'Actions', + 'panel.status': 'Status', + 'panel.priority': 'Priority', + 'panel.tags': 'Tags (comma-separated)', + 'panel.tags.ph': 'game, android, tool…', + 'panel.image': 'Image / icon (path in the project, optional)', + 'panel.start': 'Custom start command (runs visibly in a console)', + 'panel.itch': 'itch.io page (empty = detect automatically, "-" = not published)', + 'panel.notes': 'Notes', + 'panel.notes.ph': "What's still missing, next steps…", + 'panel.tasks': 'Tasks', + 'panel.task.ph': 'New task…', + + /* settings */ + 'set.title': 'Settings', + 'set.setup': 'Set up', + 'set.sub': 'Applies to the whole dashboard', + 'set.tab.folders': 'Project folders', + 'set.tab.backup': 'Backup', + 'set.tab.general': 'General', + 'set.welcome': 'Welcome! Choose the folder that holds all your projects – every subfolder becomes a project. You can set a backup target now or later on the “Backup” tab.', + 'set.folders.h': 'Project folders', + 'set.folders.p': 'Folders whose subfolders appear as projects. At least one.', + 'set.addFolder': 'Add folder', + 'set.importSeveral': 'Import several…', + 'set.nested': 'Projects in subfolders…', + 'set.nested.title': 'Find projects one level deeper (e.g. in a collection folder)', + 'set.import.hint': 'Choose a parent folder – its subfolders are offered as project folders.', + 'set.path.ph': 'e.g. D:\\Work', + 'set.folders.help.q': 'How does this work?', + 'set.folders.help.a': 'Every subfolder of a project folder is a project. You choose which folders are shown at the top left next to the logo. The first folder is the main folder: it is backed up straight into the backup target, each further one into a subfolder named after it. Removing takes the folder out of the list only – nothing is deleted on disk.', + 'set.targets.h': 'Backup targets', + 'set.targets.p': 'External disk, NAS or another drive – optional, several possible.', + 'set.addTarget': 'Add target', + 'set.exclude': "Don't back up", + 'set.exclude.ph': 'Folder name + Enter', + 'set.exclude.hint': 'Skipped everywhere, because they can be regenerated.', + 'set.remind': 'Reminder', + 'set.remind.pre': 'Backup due when a project changed and the last backup is older than', + 'set.remind.days': 'days', + 'set.remind.hint': 'The “Backup due” filter shows such projects; a notice appears once a day.', + 'set.auto': 'Automatic backup', + 'set.auto.off': 'Off', + 'set.auto.start': 'On every start', + 'set.auto.hourly': 'Hourly', + 'set.auto.daily': 'Daily', + 'set.auto.weekly': 'Weekly', + 'set.auto.on': 'on', + 'set.auto.at': 'at', + 'set.auto.oclock': '', + 'set.auto.to': 'to', + 'set.auto.allTargets': 'all targets', + 'set.auto.hint': 'Backs up all project folders – while the dashboard runs, including in the background (icon next to the clock, see General → Window). A missed slot (PC off) is caught up on the next start; if the target is unreachable, a new attempt follows after 30 minutes.', + 'set.targets.help.q': 'Where does it back up to?', + 'set.targets.help.a': 'Each project lands in the target in a subfolder of the same name. The main folder goes straight into the target, each further project folder into a subfolder named after it. Each target has its own backup state; backup-projekte.bat backs up to the first. Nothing is ever deleted in the backup.', + 'set.itch.p': 'For the “published” badge on the cards. Leave empty = no itch.io display.', + 'set.itch.profile': 'Public profile', + 'set.itch.reload': 'Reload', + 'set.itch.reload.title': 'Reload the profile now', + 'set.general.h': 'General', + 'set.general.p': 'Language, data location, window and features.', + 'set.data.h': 'Data', + 'set.language': 'Language', + 'set.openData': 'Open data folder', + 'set.window.h': 'Window', + 'set.window.p': 'Applies immediately, without saving.', + 'set.tray': 'Keep running in the background when closed', + 'set.tray.hint': 'The dashboard stays as an icon next to the clock. Needed so the automatic backup also runs without an open window – with a Windows notice when it finishes or fails. Right-click the icon → Quit.', + 'set.autostart': 'Start with Windows', + 'set.autostart.hint': 'Starts invisibly in the background (only the icon next to the clock).', + 'set.features.h': 'Features', + 'set.features.p': "Extras not everyone needs. When off, none of it is shown.", + 'set.feat.itch.hint': 'The “published” badge on the cards, filter, itch.io link per project, generate an itch.io page (Claude Code) and the copy view. Off = none of it visible, no profile fetch.', + 'set.about': 'About', + 'set.product': 'Project Dashboard', + 'set.dirty': 'Unsaved changes', + 'set.shortcut': 'Shortcut', + + /* data labels (General → data dir) */ + 'data.settings': 'Settings', + 'data.scanBackup': 'Scan & backup state', + 'data.sameFolder': 'in the same folder (scan.json, backup.json)', + 'data.appearance': 'Appearance', + 'data.appearanceVal': 'Light / System / Dark – top right in the bar', + + /* dialogs */ + 'dlg.root.title': 'Import project folders', + 'dlg.root.hint': 'Choose a parent folder and tick what should be added as a project folder – the folder itself and/or its subfolders.', + 'dlg.root.activate': 'Then switch to the first new folder', + 'dlg.move.title': 'Rename / move', + 'dlg.move.name': 'New name (folder name)', + 'dlg.move.folder': 'Project folder', + 'dlg.move.copyWarn': 'The target is on another drive: the folder is copied in full, verified and only then deleted at the old location. For large projects this takes a while.', + 'dlg.move.copyOk': 'Understood – copy and delete the original afterwards', + 'dlg.move.hint': 'The previous backup stays under the old name; the new folder appears on the next backup. Close VS Code, consoles and programs from the project first.', + 'dlg.new.title': 'New project', + 'dlg.new.titleClone': 'Clone project', + 'dlg.new.create': 'Create', + 'dlg.new.clone': 'Clone', + 'dlg.new.template': 'Template', + 'dlg.new.name': 'Name (becomes the folder name)', + 'dlg.new.createIn': 'Create in', + 'dlg.new.skipBuild': 'Leave out build folders and caches (dist, build, bin, obj, Library …)', + 'dlg.new.withGit': 'Copy git history too (note: same remote as the original)', + 'dlg.new.neverCopied': 'Never copied:', + 'dlg.new.cloneStarts': 'The clone starts as an “idea”, without an itch.io link and with open tasks only.', + 'dlg.new.emptyHint': 'Creates an empty folder with a README.md. For a game/app from the library templates: skill neues-projekt in Claude Code.', + 'dlg.itch.title': 'itch.io page', + 'dlg.itch.openDir': 'Open folder', + 'dlg.itch.reload': 'Reload', + 'dlg.nest.title': 'Projects in subfolders', + 'dlg.nest.deep': 'Also search inside projects', + 'dlg.nest.deep.title': 'Also search inside real projects, e.g. PowerBackupPro_Clean\\Tools…', + + /* ── dynamic (app.js) ── */ + 'time.today': 'today', + 'time.yesterday': 'yesterday', + 'time.daysAgo': '{n} d ago', + 'time.monthsAgo': '{n} mo ago', + 'time.yearsAgo': '{n} y ago', + 'change.last': 'Last change: {when}', + 'change.partial': '(large project – only partly scanned)', + 'change.detecting': 'Detecting … (so far: {when})', + 'size.unscanned': 'Folder size: not scanned yet (“Scan all” above)', + 'size.scanned': 'Folder size: {size} (scanned {ago})', + 'size.cleanable': '{size} of it cleanable', + 'git.green': 'Backed up', + 'git.yellow': 'Not backed up', + 'git.red': 'No remote', + 'cloud.never': 'never', + 'cloud.neverLong': 'Backup: never backed up', + 'cloud.incomplete': 'incomplete', + 'cloud.olderThan': 'older than {n} days', + 'cloud.dueSince': 'changed since: backup due', + 'cloud.savedAt': 'Backup: saved {when} ({how})', + 'pub.title': 'Published on itch.io{title} ({src}) – click opens the page', + 'pub.manual': 'entered manually', + 'pub.auto': 'detected automatically', + 'fav.is': 'Favorite', + 'fav.remove': 'Remove favorite', + 'fav.add': 'Mark as favorite', + 'prio.titled': 'Priority {p}', + 'rtag.sub': 'In the subfolder: {f}', + 'rtag.folder': 'Project folder: {f}', + 'warn.cleanTitle': 'Cache {cache} · Builds {builds} · Raw images {raw}', + 'warn.genCopy': 'Generator copy', + 'warn.noIcon': 'no icon', + 'err.saveFailed': 'Saving failed', + 'fav.now': '{name} is now a favorite', + 'fav.not': '{name} is no longer a favorite', + 'nested.found1': '1 project found in subfolders – click to view', + 'nested.foundN': '{n} projects found in subfolders – click to view', + 'new.empty': 'Empty project', + 'new.cloneOf': 'Clone of: {name}', + 'new.copySuffix': ' - Copy', + 'new.creating': 'Creating…', + 'new.clonedOk': 'Clone “{name}” created', + 'new.createdOk': 'Project “{name}” created', + 'move.now': 'Now: {path}', + 'move.confirmCopy': 'Please confirm that it will be copied and the original deleted afterwards.', + 'move.renaming': 'Renaming…', + 'move.copying': 'Copying…', + 'move.okShown': 'Now: “{name}” in “{root}”', + 'move.okHidden': '“{name}” moved to “{root}” (not currently shown)', + 'root.none': 'No folder', + 'root.allN': 'All folders ({n})', + 'root.shown': 'Project folders – shown:\n{list}', + 'root.hide': 'Remove from the view', + 'root.add': 'Add to the view', + 'root.only': 'Show only this folder', + 'root.showAll': 'Show all folders', + 'root.showNone': 'Show none (empty)', + 'root.addFolder': 'Add folder…', + 'root.import': 'Import several folders…', + 'root.nested': 'Find projects in subfolders…', + 'root.manage': 'Manage project folders…', + 'root.already': 'Already in the list', + 'root.added1': 'Project folder “{name}” added', + 'root.addedN': '{n} project folders added', + 'root.showing': 'Project folders: {list}', + 'root.noneShown': 'No project folder shown', + 'pick.projectsFolder': 'Choose folder with projects', + 'pick.parentFolder': 'Choose parent folder', + 'pick.backupFolder': 'Choose folder for the backup', + 'common.remove': 'Remove', + 'common.delete': 'Delete', + 'tasks.noOpen': 'No open tasks.', + 'tasks.noneFound': 'No tasks found.', + 'tasks.addHint': 'Choose a project above and enter a task.', + 'tasks.openProject': 'Open project', + 'tasks.addFor': '+ task for {name}', + 'tasks.added': 'Task added to {name}', + 'size.cleanableWord': 'cleanable', + 'info.folder': 'Folder', + 'info.changed': 'Changed', + 'info.due': 'due', + 'info.scannedAgo': 'scanned {ago}', + 'info.uncommitted': '{n} changes not committed', + 'info.branch': 'Branch', + 'info.notPushed': '{n} not pushed', + 'info.remote': 'Remote', + 'info.noRemoteShort': 'none – only on this disk', + 'info.lastCommit': 'Last commit', + 'info.noRepo': "No Git repository – changes aren't saved anywhere.", + 'info.published': 'Published', + 'info.no': 'no', + 'info.pagePack': 'Page package', + 'info.noneYet': 'none yet', + 'info.moreOlder': '… and {n} older', + 'info.noZips': 'No ZIPs in releases\\ yet.', + 'info.usesComfyGen': 'uses _Tools\\ComfyGen', + 'info.ownCopy': 'own copy', + 'info.noGenerator': 'No generator folder.', + 'info.noIconFound': 'no icon found', + 'info.iconComfyGen': 'Generate with ComfyGen (add the “icon” prompt in prompts.py):', + 'info.iconTemplate': 'Copy the generator template from _Tools\\ComfyGen\\template, then:', + 'info.description': 'Description', + 'info.overview': 'Overview', + 'info.cleanUp': 'Clean up', + 'info.pushRemote': 'Push & Remote', + 'info.view': 'View', + 'info.generate': 'Generate', + 'info.tech': 'Technology', + 'info.notDetected': 'not detected', + 'info.npmNeeded': 'npm install needed', + 'info.loading': 'loading…', + 'info.releaseArchives': 'Release archives', + 'info.makeZip': 'Create ZIP', + 'info.generator': 'Generator', + 'info.appIcon': 'App icon', + 'desc.fromReadme': 'From the README – no description of your own yet.', + 'desc.none': 'No description yet. Note briefly what kind of project this is.', + 'desc.placeholder': 'What kind of project is this? Idea, status, specifics …', + 'desc.insertReadme': 'Insert text from the README', + 'desc.fromReadmeBtn': 'from README', + 'desc.ctrlEnter': 'Ctrl+Enter saves', + 'desc.edit': 'Edit', + 'desc.write': 'Write', + 'desc.saved': 'Description saved', + 'desc.removed': 'Description removed', + 'git.setup': 'Set up Git', + 'git.sshKey': 'SSH key', + 'git.copyKeyTitle': 'Copy the public key – paste it under “SSH keys” at GitHub/GitLab', + 'git.copy': 'copy', + 'git.noSshKey': 'No SSH key found. Create one with ssh-keygen -t ed25519, then enter the contents of .ssh\\id_ed25519.pub at GitHub/GitLab.', + 'git.commitMsg': 'Commit message ({n} changes)', + 'git.commitPush': 'Commit & Push', + 'git.pushOnly': 'Push only existing commits', + 'git.nothingNew': 'nothing new to push', + 'git.remoteLabel': 'Remote (origin) – SSH or https', + 'git.noRemoteYet': 'No remote yet – enter one, then “Push” appears here.', + 'git.pushConsole': 'Push runs in its own console window (SSH passphrase and errors appear there).', + 'arc.whole': 'Whole project (without node_modules, builds, .git)', + 'arc.openDir': 'Open releases folder', + 'arc.delAfter': 'Delete build folder afterwards (save space – the ZIP stays)', + 'arc.lands': 'Lands in {folder}\\releases\\ with the date in the name', + 'arc.noBuild': ' – no build folder found (dist, builds, release, publish …)', + 'act.g.program': 'Program', + 'act.g.start': 'Start', + 'act.g.build': 'Build', + 'act.g.tools': 'Tools', + 'act.g.open': 'Open', + 'act.h.save': 'Save & version', + 'act.h.publish': 'Publish', + 'act.releaseZip': 'Release ZIP', + 'act.consoleHint': 'Programs start directly; commands and .bat run visibly in their own console window. Set a custom start command under “Edit”.', + 'itchA.generate': 'Generate itch.io page', + 'itchA.generateHint': 'Starts Claude Code with the itchiocreater skill in a console: title, tagline, description, all fields, cover/banner (ComfyUI) and screenshots land in docs\\itchio\\. Answer any questions there.', + 'itchA.viewCopy': 'View & copy', + 'itchA.complete': 'Complete with Claude', + 'itchA.completeTitle': 'Claude Code checks and completes the package', + 'itchA.openPublished': 'Open the published page', + 'itchA.lastChanged': 'last changed {ago}', + 'clean.unscanned': 'Not scanned yet – scan first, then it shows what can go.', + 'clean.inGit': 'in git', + 'clean.cacheHint': 'Cache is preselected (always regenerable). Tick finished builds and raw images deliberately only.', + 'clean.nothing': 'Nothing to clean up.', + 'clean.rescan': 'Rescan', + 'clean.scan': 'Scan', + 'prog.unpin': 'No longer use for ▶', + 'prog.pin': 'Use for ▶ on the card', + 'prog.noneFound': 'No finished exe or HTML page found in the project.', + 'prog.buildFirst': 'Create it under “Build”, then start it here.', + 'prog.missing': 'Set file missing: {rel} – choose again or reset.', + 'prog.setForPlay': 'Set which file ▶ starts', + 'prog.automatic': '(automatic)', + 'prog.placeholder': 'e.g. release\\Game.exe or game\\index.html', + 'prog.set': 'Set', + 'prog.auto': 'Choose automatically', + 'prog.pathHint': 'exe, html, bat or lnk – path in the project.', + 'prog.pickFor': 'Choose program for {name}', + 'err.copyFailed': 'Copy not possible', + 'git.pushRunning': 'Push running in its own console', + 'git.enterMsg': 'Please enter a commit message', + 'git.commitPushRunning': 'Commit & Push running in its own console', + 'git.remoteSaved': 'Remote saved', + 'git.initDone': 'Git set up (branch main)', + 'git.keyCopied': 'SSH key copied', + 'arc.confirmDel': 'Create a ZIP of “{what}” and delete the folder afterwards?', + 'arc.packing': 'Packing…', + 'arc.buildDeleted': 'build folder deleted', + 'itchA.checking': 'Claude Code is checking the itch.io package – see console', + 'itchA.creating': 'Claude Code is creating the itch.io package – see console', + 'clean.confirmDel': 'Permanently delete {n} folders ({size}) in “{name}”?', + 'clean.result': '{n} deleted, {gb} GB free', + 'clean.locked': '{n} locked (program open?)', + 'nest.searching': 'Searching…', + 'nest.error': 'Error', + 'nest.chosen': 'adopted', + 'nest.ignored': 'skipped', + 'nest.new': 'new', + 'nest.collection': 'Collection folder · hidden once something is adopted', + 'nest.inProjects': 'Inside projects', + 'nest.inProjectsHint': 'usually part of the project – tick only if needed', + 'nest.nFound': '{n} found', + 'nest.noneDeep': 'No projects in subfolders.', + 'nest.none': 'No projects in subfolders (collection folder).', + 'nest.explain': 'Ticked folders appear as their own projects. A collection folder without its own project (no git, README, package.json …) is then hidden. Nothing changes on disk.', + 'nest.noFolders': 'No project folders set up.', + 'nest.adopted1': '1 project adopted from subfolders', + 'nest.adoptedN': '{n} projects adopted from subfolders', + 'nest.adoptedNone': 'No projects from subfolders', + 'copy.ok': '{what} copied', + 'copy.okFormatted': '{what} copied as formatted', + 'copy.title': 'Copy', + 'prog.nowStarts': '▶ now starts: {prog}', + 'prog.autoAgain': '▶ chooses automatically again', + 'itch.loading': 'Loading…', + 'itch.noPackage': 'No itch.io package in the project yet. “Generate itch.io page” in Actions starts Claude Code.', + 'itch.openField': 'still open', + 'itch.notFound': 'not found', + 'itch.shorter': 'Shorter (suggestion)', + 'itch.shortSugg': 'Short description (suggestion)', + 'itch.copyFormatted': 'Copy formatted', + 'itch.tagWhat': 'Tag “{t}”', + 'itch.tagsHint': 'itch allows 10 · click copies one tag', + 'itch.all': 'All', + 'itch.inPackage': 'In the package ({n})', + 'itch.noTags': 'No tags in the package yet.', + 'itch.examples': 'Examples / ideas', + 'itch.showInExplorer': 'show in Explorer', + 'itch.texts': 'Texts', + 'itch.noDescHtml': 'No description.html in the package – “Complete with Claude” in Actions creates it.', + 'itch.nWords': '{n} words', + 'itch.images': 'Images', + 'itch.imagesHint': 'Click shows the file in Explorer – drag it into itch.io from there', + 'itch.noImages': 'No images in the package.', + 'itch.moreFiles': 'More files', + 'itch.moreFields': 'More fields (“Edit game”)', + 'itch.copiedVal': 'Copied: {v}', + 'itch.nothingUploaded': 'Nothing is uploaded automatically – copy the texts, drag images from the folder into itch.io.', + 'itch.installText': 'Install text', + 'itch.kind.cover': 'Cover (Cover image)', + 'itch.kind.theme': 'Banner & background (Edit theme)', + 'itch.kind.promo': 'Promo images', + 'itch.kind.screenshot': 'Screenshots', + 'itch.kind.other': 'Other images', + 'pbackup.noTarget': 'No backup target set yet (e.g. external disk or NAS).', + 'pbackup.setupTarget': 'Set up backup target', + 'pbackup.lastSaved': 'Last saved', + 'pbackup.target': 'Target', + 'pbackup.allTargets': 'All targets', + 'pbackup.checking': 'Checking what is missing in the backup…', + 'pbackup.copyingPct': 'Copying… {pct} %', + 'pbackup.nFiles': '{done} / {total} files', + 'pbackup.otherRunning': 'Another backup is running ({scope}). It continues here afterwards.', + 'pbackup.allProjects': 'all projects', + 'pbackup.savedBold': 'Backed up.', + 'pbackup.copiedN': '{n} files ({size}) newly copied to the backup.', + 'pbackup.upToDate': 'Up to date.', + 'pbackup.nothingMissing': 'Nothing was missing in the backup.', + 'pbackup.cancelled': 'Cancelled. Files already copied stay in the backup.', + 'pbackup.saveNow': 'Back up now', + 'pbackup.hint': 'Checks the project in the backup and copies only missing and changed files. Nothing is deleted there.', + 'edit.itchNot': 'marked as “not published”', + 'edit.itchAuto': 'detected automatically: {title}', + 'edit.itchNotFound': 'not found on the itch.io profile', + 'edit.saved': 'Saved', + 'tray.on': 'Keeps running in the background when closed', + 'tray.off': 'Closing quits the dashboard', + 'autostart.on': 'Starts with Windows', + 'autostart.off': 'No longer starts with Windows', + 'itch.reading': 'Reading itch.io…', + 'itch.found': '{n} games found.', + 'itch.unmatched': 'Without a project: {list} – enter the link in the project under “Edit”.', + 'itch.allMatched': 'All matched to a project.', + 'when.soon': 'shortly', + 'when.today': 'today {time}', + 'when.tomorrow': 'tomorrow {time}', + 'auto.lastOk': 'Last successful {ago}.', + 'auto.lastFail': 'Last attempt {ago} failed – {detail}', + 'auto.error': 'error', + 'auto.never': 'Never backed up automatically.', + 'auto.running': 'Running now.', + 'auto.next': 'Next automatic backup: {when}.', + 'set.saved': 'Settings saved', + 'row.name': 'Name', + 'row.nameTarget': 'Name, e.g. USB', + 'row.path': 'Path', + 'row.chooseFolder': 'Choose folder…', + 'row.upRoot': 'Move up (the first is the main folder)', + 'row.upTarget': 'Move up (the first is the default target)', + 'row.rmRoot': 'Remove from the list (nothing is deleted on disk)', + 'row.rmTarget': 'Remove target (nothing is deleted in the backup itself)', + 'row.phRoot': 'e.g. D:\\Projects', + 'row.phTarget': 'e.g. E:\\Backup\\Projects or \\\\NAS\\Share\\Projects', + 'row.main': 'Main folder', + 'row.shown': 'shown', + 'row.nProjects': '{n} projects', + 'row.backupDirect': 'Backup straight into the target', + 'row.backupSub': 'Backup into subfolder “{name}”', + 'row.enterPath': 'Enter a path or choose a folder', + 'row.default': 'Default', + 'row.saved': 'saved', + 'row.incomplete': 'incomplete', + 'row.neverComplete': 'never fully', + 'row.newChecked': 'New – checked on save', + 'import.addedRemember': '{n} project folders added – don\'t forget to save', + 'import.reading': 'reading…', + 'import.already': 'already in the list', + 'import.thisFolder': 'This folder itself', + 'import.nProjects': '{n} projects', + 'import.nSub': '{n} subfolders', + 'import.noSub': 'No subfolders.', + 'import.allSub': 'All subfolders', + 'import.addSelected': 'Add selected', + 'import.nothingSelected': 'Nothing selected', + 'err.serverStale': 'The server is out of date – click “Restart” above.', + 'upd.serverStale': 'The dashboard was updated – the server must restart for everything to work.', + 'upd.restart': 'Restart', + 'upd.uiNew': 'New version of the interface – reload the page.', + 'upd.reload': 'Reload', + 'upd.restarting': 'Restarting…', + 'upd.noRestart': 'This server cannot restart itself yet – close the dashboard once and reopen it.', + 'upd.noResponse': 'Server not responding – close the dashboard and reopen it.', + 'kpi.projects': 'Projects · {n} active', + 'kpi.noRemote.title': 'Show projects without Git or remote', + 'kpi.noRemote': 'without Git remote', + 'kpi.used': 'used ({n} scanned)', + 'kpi.notScanned': 'not scanned yet', + 'kpi.cleanable.title': 'Show cleanable projects', + 'kpi.cleanableCache': 'cleanable · cache {cache}', + 'kpi.cleanable': 'cleanable', + 'kpi.scanN': 'Scan {done}/{total}', + 'kpi.scanAll': 'Scan all', + 'kpi.scanError': 'Scan error', + 'kpi.scanHint': 'Measure size & deletable folders', + 'quick.all': 'All', + 'quick.nobackup': 'No remote', + 'quick.unsaved': 'Not backed up', + 'quick.due': 'Backup due', + 'quick.cleanable': 'Cleanable', + 'quick.install': 'npm install', + 'quick.noicon': 'No icon', + 'quick.gencopy': 'Generator copy', + 'quick.fav': 'Favorites', + 'quick.itch': 'itch.io', + 'quick.noitch': 'Done, not on itch', + 'action.started': 'Started: {label}', + 'count.none': 'No project folder shown – choose above', + 'count.noFolder': 'No project folder chosen yet', + 'count.multi': '{n} projects from {folders} folders', + 'count.single': '{n} folders under {dir}', + 'scan.done': 'Scan finished', + 'qs.start': 'Start: {label}', + 'qs.explorer': 'Open folder in Explorer', + 'qs.vscode': 'Open in VS Code', + 'tasks.openN': '{n} open tasks', + 'empty.noProjects': 'No projects found.', + 'home.noDesc': 'No description', + 'home.favorites': 'Favorites', + 'home.allProjects': 'All projects', + 'home.all': 'All', + 'home.ideas': 'Ideas', + 'home.archive': 'Archive', + 'home.sort': 'Sorting', + 'home.view': 'View', + 'home.cards': 'Cards', + 'home.compact': 'Compact', + 'home.list': 'List', + 'col.project': 'Project', + 'col.status': 'Status', + 'col.git': 'Git', + 'col.backup': 'Backup', + 'col.tech': 'Technology', + 'col.size': 'Size', + 'col.cleanable': 'Cleanable', + 'col.activity': 'Activity', + 'tier.Cache.label': 'Cache', 'tier.Cache.hint': 'always regenerable', 'tier.Cache.short': 'Cache', + 'tier.Release.label': 'Finished build', 'tier.Release.hint': 'version – delete deliberately', 'tier.Release.short': 'Builds', + 'tier.Output.label': 'Raw images', 'tier.Output.hint': 'generator output', 'tier.Output.short': 'Raw images', + 'tier.rest': 'Rest', + 'st.size': 'Size', + 'st.folder': 'Folder', + 'st.measured': 'measured', + 'st.deletable': 'Deletable', + 'st.inside': 'of it {s}', + 'st.clickSub': 'Click: subfolders', + 'st.used': 'Used', + 'st.nMeasured': '{n} projects measured', + 'st.cleanableShare': 'Cleanable share', + 'st.ofUsed': 'of the used space', + 'st.measuredCount': 'Measured', + 'st.runningN': 'running: {done}/{total}', + 'st.oldest': 'oldest state {ago}', + 'st.nothingMeasured': 'nothing measured yet', + 'st.measureAll': 'Measure all', + 'st.openPanel': 'Open project panel', + 'st.nothingMeasuredHint': 'Nothing measured yet – “Measure all” above.', + 'st.projUnmeasured': 'This project has not been measured yet.', + 'st.projRemeasure': 'Re-measure the project to break it down by folder.', + 'st.measure': 'Measure', + 'st.remeasure': 'Re-measure', + 'st.ofCleanable': ', of which {size} cleanable', + 'st.nothingMeasured2': 'Nothing measured yet.', + 'st.kind': 'Kind', + 'st.select': 'Select', + 'st.nothingToClean': 'Nothing to clean up found (or not measured yet).', + 'st.selected': '{n} selected · {size}', + 'st.needCleanup': 'Deleting needs cleanup.ps1', + 'st.confirmDelete': 'Permanently delete {n} folders ({size})?', + 'st.regenHint': 'They can be regenerated (npm install, build …).', + 'st.deleting': 'Deleting…', + 'st.freed': '{size} freed', + 'act.level.0': 'none', 'act.level.1': '1 project', 'act.level.2': '2 projects', 'act.level.3': '3–4 projects', 'act.level.4': '5+ projects', + 'act.activeDays': 'Active days', + 'act.pastYear': 'over the past year', + 'act.currentStreak': 'Current streak', + 'act.streakSub': 'days worked in a row', + 'act.longestStreak': 'Longest streak', + 'act.fullestDay': 'Fullest day', + 'act.day1': '{n} day', + 'act.daysN': '{n} days', + 'act.nProjects': '{n} projects', + 'act.pending': '{n} projects still being read…', + 'act.less': 'less', + 'act.more': 'more active projects', + 'act.file1': '{n} file', + 'act.filesN': '{n} files', + 'act.commit1': '{n} commit', + 'act.commitsN': '{n} commits', + 'act.nothingDay': 'Nothing was changed on this day.', + 'act.lastAgo': 'last {ago}', + 'act.noChangesRange': 'No changes in this range.', + 'backup.otherRunning': 'A backup is running', + 'backup.autoDone': 'Automatic backup finished', + 'backup.autoFail': 'Automatic backup: {err}', + 'backup.cancelledWord': 'cancelled', + 'backup.autoRunning': 'Automatic backup running …', + 'backup.lastAgo': 'last {ago}', + 'backup.neverComplete': 'never fully backed up', + 'backup.setup': 'set up', + 'backup.autoChecking': 'auto: checking…', + 'backup.checkingShort': 'checking…', + 'backup.nDue': '{n} due', + 'backup.dueTitle': '{n} projects changed since the last backup (older than {days} days) – filter “Backup due”', + 'backup.remind1': 'Backup due: 1 project changed since the last backup – click “Backup” above', + 'backup.remindN': 'Backup due: {n} projects changed since the last backup – click “Backup” above', + 'backup.noTargetShort': 'no target set', + 'backup.noTargetLong': 'No backup target set yet. Choose a folder on an external disk, a NAS or another drive.', + 'backup.lastBackup': 'Last backup', + 'backup.copied': 'Copied', + 'backup.noneOnTarget': 'No full backup to “{name}” has been made via the dashboard yet.', + 'backup.statusOf': 'Status – {name}', + 'backup.scopeNote': 'The current run only affects the project {scope} (started via “Back up” in the project).', + 'backup.checkingLong': 'Checking what is new and missing in the backup…', + 'backup.checkingTime': 'Takes about 1–2 minutes over the network.', + 'backup.copyingTitle': 'Copying…', + 'backup.keepOpen': 'Please keep the window open until the backup is finished.', + 'backup.nothingMissing': 'Nothing is missing in the backup.', + 'backup.checkResult': 'Check result', + 'backup.new': 'New', + 'backup.changed': 'Changed', + 'backup.onlyInBackup': 'Only in backup', + 'backup.kept': 'kept', + 'backup.nFilesCell': '{n} files', + 'backup.moreProjects': '+ {n} more projects', + 'backup.recheck': 'Check again', + 'backup.copyNow': 'Copy now ({size})', + 'backup.done': 'Backup finished.', + 'backup.doneN': '{n} files, {size} copied.', + 'backup.checkWhatsNew': 'Check what is new', + 'backup.footerHint': 'Nothing is ever deleted in the backup – only new and changed files are added. Not backed up (regenerated): {exclude}. Target and exceptions: Settings (gear at the top).', + 'boot.itch': 'Reading itch.io profile …', + 'boot.reading2': 'Reading projects (Git, tech, sizes)', + 'boot.changes': 'Determining last changes', + 'boot.step': 'Step {step} of 2', + 'boot.estimating': 'estimating …', + 'boot.almost': 'almost done', + 'boot.etaS': 'about {s} s left', + 'boot.etaMin': 'about {m} min left', + 'danger.title': 'Danger zone', + 'danger.hint': 'Permanently deletes the entire project folder from the disk. The backup is not touched. This cannot be undone.', + 'danger.deleteFolder': 'Delete project folder…', + 'danger.confirm1': 'Permanently delete the project folder “{name}”?\n\n{path}\n\nEverything in it is removed from the disk. The backup is NOT deleted. This cannot be undone.', + 'danger.confirm2': 'Really delete “{name}”? Last chance.', + 'danger.deleted': 'Project folder “{name}” deleted', + }, + + de: { + /* shared */ + 'common.cancel': 'Abbrechen', + 'common.save': 'Speichern', + 'common.close': 'Schließen', + 'common.closeEsc': 'Schließen (Esc)', + 'common.apply': 'Übernehmen', + 'common.show': 'Anzeigen', + 'common.browse': 'Durchsuchen…', + 'status.idea': 'Idee', + 'status.active': 'Aktiv', + 'status.paused': 'Pausiert', + 'status.done': 'Fertig', + 'status.archived': 'Archiviert', + 'prio.low': 'Niedrig', + 'prio.medium': 'Mittel', + 'prio.high': 'Hoch', + 'day.0': 'Sonntag', + 'day.1': 'Montag', + 'day.2': 'Dienstag', + 'day.3': 'Mittwoch', + 'day.4': 'Donnerstag', + 'day.5': 'Freitag', + 'day.6': 'Samstag', + + /* boot */ + 'boot.start': 'Starte …', + 'boot.reading': 'Projekte werden eingelesen', + 'boot.skip': 'Schon mal loslegen', + + /* header */ + 'root.projects': 'Projekte', + 'root.switch': 'Projektordner wechseln', + 'tab.home': 'Projekte', + 'tab.home.title': 'Alle Projekte als Kacheln', + 'tab.board': 'Board', + 'tab.board.title': 'Board', + 'tab.gallery': 'Galerie', + 'tab.gallery.title': 'Galerie', + 'tab.list': 'Liste', + 'tab.list.title': 'Liste', + 'tab.tasks': 'Aufgaben', + 'tab.tasks.title': 'Aufgaben', + 'tab.activity': 'Aktivität', + 'tab.activity.title': 'Woran wurde wann gearbeitet', + 'tab.storage': 'Speicher', + 'tab.storage.title': 'Speicherplatz: wer belegt wie viel', + 'search.placeholder': 'Projekte, Tags, Notizen…', + 'btn.new': 'Neu', + 'btn.new.title': 'Neues Projekt anlegen oder ein vorhandenes klonen', + 'btn.backup': 'Backup', + 'btn.backup.title': 'Alle Projekte auf die MyCloud sichern', + 'btn.settings.title': 'Einstellungen: Projektordner und Backup-Ziel', + 'mode.title': 'Ansicht: einfach (ruhig, das Wichtigste) oder erweitert (alles)', + 'mode.simple': 'Einfach', + 'mode.simple.title': 'Einfache Ansicht – nur das Wichtigste', + 'mode.advanced': 'Erweitert', + 'mode.advanced.title': 'Erweiterte Ansicht – alle Funktionen', + 'theme.title': 'Darstellung', + 'theme.light': 'Hell', + 'theme.system': 'System', + 'theme.system.title': 'Wie Windows', + 'theme.dark': 'Dunkel', + + /* toolbar */ + 'board.layout.title': 'Darstellung im Board', + 'board.cards': 'Karten', + 'board.cards.title': 'Karten mit Details', + 'board.rows': 'Liste', + 'board.rows.title': 'Kompakte Liste – eine Zeile pro Projekt', + 'flt.status.all': 'Alle Status', + 'flt.sort.mtime': 'Zuletzt geändert', + 'flt.sort.name': 'Name (A–Z)', + 'flt.sort.priority': 'Priorität', + 'flt.sort.size': 'Größe', + 'flt.sort.clean': 'Aufräumbar', + + /* none box */ + 'none.title': 'Kein Projektordner angezeigt', + 'none.hint': 'Oben links neben dem Logo einen oder mehrere Ordner auswählen.', + 'none.choose': 'Ordner wählen', + + /* activity */ + 'act.year': 'Aktivität im letzten Jahr', + 'act.perDay': 'Aktive Projekte pro Tag', + 'act.hint': 'Ein Tag zählt, wenn an ihm Dateien zuletzt geändert oder Commits gemacht wurden. Dateien zeigen nur ihre letzte Änderung – Commits ergänzen die Geschichte.', + 'act.day': 'Tag', + 'act.recent': 'Zuletzt aktiv', + 'act.range7': '7 Tage', + 'act.range30': '30 Tage', + 'act.range90': '90 Tage', + + /* storage */ + 'st.level': 'Ebene', + 'st.treemap': 'Treemap der Projektgrößen', + 'st.largest': 'Größte Projekte', + 'st.hogs': 'Größte Speicherfresser', + 'st.hogs.hint': '– Ordner, die sich neu erzeugen lassen', + 'st.deleteSelected': 'Ausgewählte löschen', + + /* tasks view */ + 'task.open': 'Offen', + 'task.done': 'Erledigt', + 'task.all': 'Alle', + 'task.project': 'Projekt', + 'task.newEnter': 'Neue Aufgabe… (Enter)', + 'task.add': 'Hinzufügen', + + /* project panel */ + 'panel.explorer': 'Explorer', + 'panel.vscode': 'VS Code', + 'panel.clone': 'Klonen', + 'panel.clone.title': 'Kopie dieses Projekts als neues Projekt anlegen', + 'panel.rename': 'Umbenennen…', + 'panel.rename.title': 'Projektordner umbenennen oder in einen anderen Projektordner verschieben', + 'panel.edit': 'Bearbeiten', + 'panel.info': 'Info', + 'panel.actions': 'Aktionen', + 'panel.status': 'Status', + 'panel.priority': 'Priorität', + 'panel.tags': 'Tags (mit Komma getrennt)', + 'panel.tags.ph': 'spiel, android, tool…', + 'panel.image': 'Bild / Icon (Pfad im Projekt, optional)', + 'panel.start': 'Eigener Start-Befehl (läuft sichtbar in einer Konsole)', + 'panel.itch': 'itch.io-Seite (leer = automatisch erkennen, „-“ = nicht veröffentlicht)', + 'panel.notes': 'Notizen', + 'panel.notes.ph': 'Was fehlt noch, nächste Schritte…', + 'panel.tasks': 'Aufgaben', + 'panel.task.ph': 'Neue Aufgabe…', + + /* settings */ + 'set.title': 'Einstellungen', + 'set.setup': 'Einrichten', + 'set.sub': 'Gilt für das ganze Dashboard', + 'set.tab.folders': 'Projektordner', + 'set.tab.backup': 'Backup', + 'set.tab.general': 'Allgemein', + 'set.welcome': 'Willkommen! Wähle den Ordner, in dem alle deine Projekte liegen – jeder Unterordner wird ein Projekt. Ein Backup-Ziel kannst du jetzt oder später im Reiter „Backup“ festlegen.', + 'set.folders.h': 'Projektordner', + 'set.folders.p': 'Ordner, deren Unterordner als Projekte erscheinen. Mindestens einer.', + 'set.addFolder': 'Ordner hinzufügen', + 'set.importSeveral': 'Mehrere einlesen…', + 'set.nested': 'Projekte in Unterordnern…', + 'set.nested.title': 'Projekte suchen, die eine Ebene tiefer liegen (z. B. in einem Sammelordner)', + 'set.import.hint': 'Übergeordneten Ordner wählen – seine Unterordner werden als Projektordner angeboten.', + 'set.path.ph': 'z. B. D:\\Arbeit', + 'set.folders.help.q': 'Wie funktioniert das?', + 'set.folders.help.a': 'Jeder Unterordner eines Projektordners ist ein Projekt. Welche Ordner gerade angezeigt werden, wählst du oben links neben dem Logo. Der erste Ordner ist der Hauptordner: er wird direkt ins Backup-Ziel gesichert, jeder weitere in einen Unterordner mit seinem Namen. Entfernen nimmt den Ordner nur aus der Liste – auf der Platte wird nichts gelöscht.', + 'set.targets.h': 'Backup-Ziele', + 'set.targets.p': 'Externe Platte, NAS oder anderes Laufwerk – optional, mehrere möglich.', + 'set.addTarget': 'Ziel hinzufügen', + 'set.exclude': 'Nicht sichern', + 'set.exclude.ph': 'Ordnername + Enter', + 'set.exclude.hint': 'Werden überall übersprungen, weil sie sich neu erzeugen lassen.', + 'set.remind': 'Erinnerung', + 'set.remind.pre': 'Backup fällig, wenn ein Projekt geändert wurde und das letzte Backup älter ist als', + 'set.remind.days': 'Tage', + 'set.remind.hint': 'Solche Projekte zeigt der Filter „Backup fällig“; einmal am Tag erscheint ein Hinweis.', + 'set.auto': 'Automatisch sichern', + 'set.auto.off': 'Aus', + 'set.auto.start': 'Bei jedem Start', + 'set.auto.hourly': 'Stündlich', + 'set.auto.daily': 'Täglich', + 'set.auto.weekly': 'Wöchentlich', + 'set.auto.on': 'am', + 'set.auto.at': 'um', + 'set.auto.oclock': 'Uhr', + 'set.auto.to': 'auf', + 'set.auto.allTargets': 'allen Zielen', + 'set.auto.hint': 'Sichert alle Projektordner – solange das Dashboard läuft, auch im Hintergrund (Symbol neben der Uhr, siehe Allgemein → Fenster). Ein verpasster Termin (PC aus) wird beim nächsten Start nachgeholt; ist das Ziel nicht erreichbar, folgt nach 30 Minuten ein neuer Versuch.', + 'set.targets.help.q': 'Wohin wird gesichert?', + 'set.targets.help.a': 'Jedes Projekt landet im Ziel in einem gleichnamigen Unterordner. Der Hauptordner geht direkt ins Ziel, jeder weitere Projektordner in einen Unterordner mit seinem Namen. Jedes Ziel hat seinen eigenen Backup-Stand; backup-projekte.bat sichert auf das erste. Im Backup wird nie etwas gelöscht.', + 'set.itch.p': 'Für die Anzeige „veröffentlicht“ auf den Karten. Leer lassen = keine itch.io-Anzeige.', + 'set.itch.profile': 'Öffentliches Profil', + 'set.itch.reload': 'Neu lesen', + 'set.itch.reload.title': 'Profil jetzt neu lesen', + 'set.general.h': 'Allgemein', + 'set.general.p': 'Sprache, Datenablage, Fenster und Funktionen.', + 'set.data.h': 'Daten', + 'set.language': 'Sprache', + 'set.openData': 'Datenordner öffnen', + 'set.window.h': 'Fenster', + 'set.window.p': 'Gilt sofort, ohne Speichern.', + 'set.tray': 'Beim Schließen im Hintergrund weiterlaufen', + 'set.tray.hint': 'Das Dashboard bleibt als Symbol neben der Uhr. Nötig, damit das automatische Backup auch ohne offenes Fenster läuft – mit Windows-Hinweis, wenn es fertig ist oder fehlschlägt. Rechtsklick auf das Symbol → Beenden.', + 'set.autostart': 'Mit Windows starten', + 'set.autostart.hint': 'Startet unsichtbar im Hintergrund (nur das Symbol neben der Uhr).', + 'set.features.h': 'Funktionen', + 'set.features.p': 'Zusätzliches, das nicht jeder braucht. Ausgeschaltet ist davon nichts zu sehen.', + 'set.feat.itch.hint': '„Veröffentlicht“-Anzeige auf den Karten, Filter, itch.io-Link je Projekt, itch.io-Seite erzeugen (Claude Code) und Kopier-Ansicht. Aus = nichts davon sichtbar, kein Abruf des Profils.', + 'set.about': 'Über', + 'set.product': 'Projekt-Dashboard', + 'set.dirty': 'Ungespeicherte Änderungen', + 'set.shortcut': 'Tastenkürzel', + + /* data labels (General → data dir) */ + 'data.settings': 'Einstellungen', + 'data.scanBackup': 'Scan- & Backup-Stand', + 'data.sameFolder': 'im selben Ordner (scan.json, backup.json)', + 'data.appearance': 'Darstellung', + 'data.appearanceVal': 'Hell / System / Dunkel – oben rechts in der Leiste', + + /* dialogs */ + 'dlg.root.title': 'Projektordner einlesen', + 'dlg.root.hint': 'Übergeordneten Ordner wählen und ankreuzen, was als Projektordner dazukommen soll – der Ordner selbst und/oder seine Unterordner.', + 'dlg.root.activate': 'Danach zum ersten neuen Ordner wechseln', + 'dlg.move.title': 'Umbenennen / verschieben', + 'dlg.move.name': 'Neuer Name (Ordnername)', + 'dlg.move.folder': 'Projektordner', + 'dlg.move.copyWarn': 'Das Ziel liegt auf einem anderen Laufwerk: Der Ordner wird komplett kopiert, geprüft und erst danach am alten Ort gelöscht. Bei großen Projekten dauert das.', + 'dlg.move.copyOk': 'Verstanden – kopieren und Original danach löschen', + 'dlg.move.hint': 'Das bisherige Backup bleibt unter dem alten Namen liegen; beim nächsten Backup entsteht der neue Ordner. VS Code, Konsolen und Programme aus dem Projekt vorher schließen.', + 'dlg.new.title': 'Neues Projekt', + 'dlg.new.titleClone': 'Projekt klonen', + 'dlg.new.create': 'Anlegen', + 'dlg.new.clone': 'Klonen', + 'dlg.new.template': 'Vorlage', + 'dlg.new.name': 'Name (wird der Ordnername)', + 'dlg.new.createIn': 'Anlegen in', + 'dlg.new.skipBuild': 'Build-Ordner und Caches weglassen (dist, build, bin, obj, Library …)', + 'dlg.new.withGit': 'git-Verlauf mitkopieren (Achtung: gleicher Remote wie das Original)', + 'dlg.new.neverCopied': 'Nie kopiert:', + 'dlg.new.cloneStarts': 'Der Klon startet als „Idee“, ohne itch.io-Link und nur mit offenen Aufgaben.', + 'dlg.new.emptyHint': 'Legt einen leeren Ordner mit README.md an. Für ein Spiel/eine App aus den Library-Vorlagen: Skill neues-projekt in Claude Code.', + 'dlg.itch.title': 'itch.io-Seite', + 'dlg.itch.openDir': 'Ordner öffnen', + 'dlg.itch.reload': 'Neu laden', + 'dlg.nest.title': 'Projekte in Unterordnern', + 'dlg.nest.deep': 'Auch in Projekten suchen', + 'dlg.nest.deep.title': 'Auch in echten Projekten suchen, z. B. PowerBackupPro_Clean\\Tools…', + + /* ── dynamic (app.js) ── */ + 'time.today': 'heute', + 'time.yesterday': 'gestern', + 'time.daysAgo': 'vor {n} T.', + 'time.monthsAgo': 'vor {n} Mon.', + 'time.yearsAgo': 'vor {n} J.', + 'change.last': 'Letzte Änderung: {when}', + 'change.partial': '(großes Projekt – nur teilweise durchsucht)', + 'change.detecting': 'Wird ermittelt … (bisher: {when})', + 'size.unscanned': 'Ordnergröße: noch nicht gescannt („Alle scannen“ oben)', + 'size.scanned': 'Ordnergröße: {size} (gescannt {ago})', + 'size.cleanable': 'davon {size} aufräumbar', + 'git.green': 'Gesichert', + 'git.yellow': 'Ungesichert', + 'git.red': 'Kein Remote', + 'cloud.never': 'nie', + 'cloud.neverLong': 'Backup: noch nie gesichert', + 'cloud.incomplete': 'unvollständig', + 'cloud.olderThan': 'älter als {n} Tage', + 'cloud.dueSince': 'seitdem geändert: Backup fällig', + 'cloud.savedAt': 'Backup: gesichert {when} ({how})', + 'pub.title': 'Auf itch.io veröffentlicht{title} ({src}) – Klick öffnet die Seite', + 'pub.manual': 'manuell eingetragen', + 'pub.auto': 'automatisch erkannt', + 'fav.is': 'Favorit', + 'fav.remove': 'Kein Favorit mehr', + 'fav.add': 'Als Favorit markieren', + 'prio.titled': 'Priorität {p}', + 'rtag.sub': 'Liegt im Unterordner: {f}', + 'rtag.folder': 'Projektordner: {f}', + 'warn.cleanTitle': 'Cache {cache} · Builds {builds} · Rohbilder {raw}', + 'warn.genCopy': 'Generator-Kopie', + 'warn.noIcon': 'kein Icon', + 'err.saveFailed': 'Speichern fehlgeschlagen', + 'fav.now': '{name} ist jetzt Favorit', + 'fav.not': '{name} ist kein Favorit mehr', + 'nested.found1': '1 Projekt in Unterordnern gefunden – Klick zum Ansehen', + 'nested.foundN': '{n} Projekte in Unterordnern gefunden – Klick zum Ansehen', + 'new.empty': 'Leeres Projekt', + 'new.cloneOf': 'Klon von: {name}', + 'new.copySuffix': ' - Kopie', + 'new.creating': 'Wird angelegt…', + 'new.clonedOk': 'Klon „{name}“ angelegt', + 'new.createdOk': 'Projekt „{name}“ angelegt', + 'move.now': 'Jetzt: {path}', + 'move.confirmCopy': 'Bitte bestätigen, dass kopiert und das Original danach gelöscht wird.', + 'move.renaming': 'Wird umbenannt…', + 'move.copying': 'Wird kopiert…', + 'move.okShown': 'Jetzt: „{name}“ in „{root}“', + 'move.okHidden': '„{name}“ nach „{root}“ verschoben (wird gerade nicht angezeigt)', + 'root.none': 'Kein Ordner', + 'root.allN': 'Alle Ordner ({n})', + 'root.shown': 'Projektordner – angezeigt:\n{list}', + 'root.hide': 'Aus der Ansicht nehmen', + 'root.add': 'Zur Ansicht dazunehmen', + 'root.only': 'Nur diesen Ordner anzeigen', + 'root.showAll': 'Alle Ordner anzeigen', + 'root.showNone': 'Keinen anzeigen (leer)', + 'root.addFolder': 'Ordner hinzufügen…', + 'root.import': 'Mehrere Ordner einlesen…', + 'root.nested': 'Projekte in Unterordnern suchen…', + 'root.manage': 'Projektordner verwalten…', + 'root.already': 'Schon in der Liste', + 'root.added1': 'Projektordner „{name}“ hinzugefügt', + 'root.addedN': '{n} Projektordner hinzugefügt', + 'root.showing': 'Projektordner: {list}', + 'root.noneShown': 'Kein Projektordner angezeigt', + 'pick.projectsFolder': 'Ordner mit Projekten wählen', + 'pick.parentFolder': 'Übergeordneten Ordner wählen', + 'pick.backupFolder': 'Ordner für das Backup wählen', + 'common.remove': 'Entfernen', + 'common.delete': 'Löschen', + 'tasks.noOpen': 'Keine offenen Aufgaben.', + 'tasks.noneFound': 'Keine Aufgaben gefunden.', + 'tasks.addHint': 'Oben ein Projekt wählen und eine Aufgabe eintragen.', + 'tasks.openProject': 'Projekt öffnen', + 'tasks.addFor': '+ Aufgabe für {name}', + 'tasks.added': 'Aufgabe zu {name} hinzugefügt', + 'size.cleanableWord': 'aufräumbar', + 'info.folder': 'Ordner', + 'info.changed': 'Geändert', + 'info.due': 'fällig', + 'info.scannedAgo': 'gescannt {ago}', + 'info.uncommitted': '{n} Änderungen nicht committet', + 'info.branch': 'Branch', + 'info.notPushed': '{n} nicht gepusht', + 'info.remote': 'Remote', + 'info.noRemoteShort': 'keins – liegt nur auf dieser Platte', + 'info.lastCommit': 'Letzter Commit', + 'info.noRepo': 'Kein Git-Repository – Änderungen sind nirgends gesichert.', + 'info.published': 'Veröffentlicht', + 'info.no': 'nein', + 'info.pagePack': 'Seiten-Paket', + 'info.noneYet': 'noch keins', + 'info.moreOlder': '… und {n} ältere', + 'info.noZips': 'Noch keine ZIPs in releases\\.', + 'info.usesComfyGen': 'nutzt _Tools\\ComfyGen', + 'info.ownCopy': 'eigene Kopie', + 'info.noGenerator': 'Kein Generator-Ordner.', + 'info.noIconFound': 'kein Icon gefunden', + 'info.iconComfyGen': 'Mit ComfyGen erzeugen (Prompt „icon“ in prompts.py eintragen):', + 'info.iconTemplate': 'Generator-Vorlage aus _Tools\\ComfyGen\\template kopieren, dann:', + 'info.description': 'Beschreibung', + 'info.overview': 'Übersicht', + 'info.cleanUp': 'Aufräumen', + 'info.pushRemote': 'Push & Remote', + 'info.view': 'Ansehen', + 'info.generate': 'Erzeugen', + 'info.tech': 'Technik', + 'info.notDetected': 'nicht erkannt', + 'info.npmNeeded': 'npm install nötig', + 'info.loading': 'wird geladen…', + 'info.releaseArchives': 'Release-Archive', + 'info.makeZip': 'ZIP erstellen', + 'info.generator': 'Generator', + 'info.appIcon': 'App-Icon', + 'desc.fromReadme': 'Aus der README – noch keine eigene Beschreibung.', + 'desc.none': 'Noch keine Beschreibung. Kurz notieren, was das für ein Projekt ist.', + 'desc.placeholder': 'Was ist das für ein Projekt? Idee, Stand, Besonderheiten …', + 'desc.insertReadme': 'Text aus der README einsetzen', + 'desc.fromReadmeBtn': 'aus README', + 'desc.ctrlEnter': 'Strg+Enter speichert', + 'desc.edit': 'Ändern', + 'desc.write': 'Schreiben', + 'desc.saved': 'Beschreibung gespeichert', + 'desc.removed': 'Beschreibung entfernt', + 'git.setup': 'Git einrichten', + 'git.sshKey': 'SSH-Schlüssel', + 'git.copyKeyTitle': 'Öffentlichen Schlüssel kopieren – bei GitHub/GitLab unter „SSH keys“ einfügen', + 'git.copy': 'kopieren', + 'git.noSshKey': 'Kein SSH-Schlüssel gefunden. Anlegen mit ssh-keygen -t ed25519, dann den Inhalt von .ssh\\id_ed25519.pub bei GitHub/GitLab eintragen.', + 'git.commitMsg': 'Commit-Nachricht ({n} Änderungen)', + 'git.commitPush': 'Commit & Push', + 'git.pushOnly': 'Nur bestehende Commits pushen', + 'git.nothingNew': 'nichts Neues zu pushen', + 'git.remoteLabel': 'Remote (origin) – SSH oder https', + 'git.noRemoteYet': 'Noch kein Remote – erst eintragen, dann erscheint hier „Push“.', + 'git.pushConsole': 'Push läuft in einem eigenen Konsolenfenster (dort erscheinen SSH-Passphrase und Fehler).', + 'arc.whole': 'Ganzes Projekt (ohne node_modules, Builds, .git)', + 'arc.openDir': 'releases-Ordner öffnen', + 'arc.delAfter': 'Build-Ordner danach löschen (Platz sparen – das ZIP bleibt)', + 'arc.lands': 'Landet in {folder}\\releases\\ mit Datum im Namen', + 'arc.noBuild': ' – kein Build-Ordner gefunden (dist, builds, release, publish …)', + 'act.g.program': 'Programm', + 'act.g.start': 'Starten', + 'act.g.build': 'Bauen', + 'act.g.tools': 'Werkzeuge', + 'act.g.open': 'Öffnen', + 'act.h.save': 'Sichern & Versionieren', + 'act.h.publish': 'Veröffentlichen', + 'act.releaseZip': 'Release-ZIP', + 'act.consoleHint': 'Programme starten direkt, Befehle und .bat laufen sichtbar in einem eigenen Konsolenfenster. Eigenen Start-Befehl unter „Bearbeiten“ festlegen.', + 'itchA.generate': 'itch.io-Seite erzeugen', + 'itchA.generateHint': 'Startet Claude Code mit dem Skill itchiocreater in einer Konsole: Titel, Tagline, Beschreibung, alle Felder, Cover/Banner (ComfyUI) und Screenshots landen in docs\\itchio\\. Rückfragen dort beantworten.', + 'itchA.viewCopy': 'Ansehen & kopieren', + 'itchA.complete': 'Ergänzen mit Claude', + 'itchA.completeTitle': 'Claude Code prüft und ergänzt das Paket', + 'itchA.openPublished': 'Veröffentlichte Seite öffnen', + 'itchA.lastChanged': 'zuletzt geändert {ago}', + 'clean.unscanned': 'Noch nicht gescannt – erst scannen, dann zeigt sich, was weg kann.', + 'clean.inGit': 'in git', + 'clean.cacheHint': 'Cache ist vorausgewählt (immer neu erzeugbar). Fertige Builds und Rohbilder nur bewusst anhaken.', + 'clean.nothing': 'Nichts zum Aufräumen.', + 'clean.rescan': 'Neu scannen', + 'clean.scan': 'Scannen', + 'prog.unpin': 'Nicht mehr für ▶ verwenden', + 'prog.pin': 'Für ▶ auf der Karte verwenden', + 'prog.noneFound': 'Keine fertige exe oder HTML-Seite im Projekt gefunden.', + 'prog.buildFirst': 'Unter „Bauen“ erzeugen, dann hier starten.', + 'prog.missing': 'Festgelegte Datei fehlt: {rel} – neu wählen oder zurücksetzen.', + 'prog.setForPlay': 'Für ▶ starten festlegen', + 'prog.automatic': '(automatisch)', + 'prog.placeholder': 'z. B. release\\Spiel.exe oder game\\index.html', + 'prog.set': 'Festlegen', + 'prog.auto': 'Automatisch wählen', + 'prog.pathHint': 'exe, html, bat oder lnk – Pfad im Projekt.', + 'prog.pickFor': 'Programm für {name} wählen', + 'err.copyFailed': 'Kopieren nicht möglich', + 'git.pushRunning': 'Push läuft in eigener Konsole', + 'git.enterMsg': 'Bitte eine Commit-Nachricht eingeben', + 'git.commitPushRunning': 'Commit & Push läuft in eigener Konsole', + 'git.remoteSaved': 'Remote gespeichert', + 'git.initDone': 'Git eingerichtet (Branch main)', + 'git.keyCopied': 'SSH-Schlüssel kopiert', + 'arc.confirmDel': 'ZIP von „{what}“ erstellen und den Ordner danach löschen?', + 'arc.packing': 'Packe…', + 'arc.buildDeleted': 'Build-Ordner gelöscht', + 'itchA.checking': 'Claude Code prüft das itch.io-Paket – siehe Konsole', + 'itchA.creating': 'Claude Code erstellt das itch.io-Paket – siehe Konsole', + 'clean.confirmDel': '{n} Ordner ({size}) in „{name}“ endgültig löschen?', + 'clean.result': '{n} gelöscht, {gb} GB frei', + 'clean.locked': '{n} gesperrt (Programm offen?)', + 'nest.searching': 'Suche…', + 'nest.error': 'Fehler', + 'nest.chosen': 'übernommen', + 'nest.ignored': 'ausgelassen', + 'nest.new': 'neu', + 'nest.collection': 'Sammelordner · wird ausgeblendet, wenn etwas übernommen ist', + 'nest.inProjects': 'In Projekten', + 'nest.inProjectsHint': 'meist Teil des Projekts – nur bei Bedarf ankreuzen', + 'nest.nFound': '{n} gefunden', + 'nest.noneDeep': 'Keine Projekte in Unterordnern.', + 'nest.none': 'Keine Projekte in Unterordnern (Sammelordner).', + 'nest.explain': 'Angekreuzte Ordner erscheinen als eigene Projekte. Ein Sammelordner ohne eigenes Projekt (kein git, README, package.json …) wird dann ausgeblendet. Auf der Platte ändert sich nichts.', + 'nest.noFolders': 'Keine Projektordner eingerichtet.', + 'nest.adopted1': '1 Projekt aus Unterordnern übernommen', + 'nest.adoptedN': '{n} Projekte aus Unterordnern übernommen', + 'nest.adoptedNone': 'Keine Projekte aus Unterordnern', + 'copy.ok': '{what} kopiert', + 'copy.okFormatted': '{what} formatiert kopiert', + 'copy.title': 'Kopieren', + 'prog.nowStarts': '▶ startet jetzt: {prog}', + 'prog.autoAgain': '▶ wählt wieder automatisch', + 'itch.loading': 'Lädt…', + 'itch.noPackage': 'Noch kein itch.io-Paket im Projekt. „itch.io-Seite erzeugen“ in Aktionen startet Claude Code.', + 'itch.openField': 'noch offen', + 'itch.notFound': 'nicht gefunden', + 'itch.shorter': 'Kürzer (Vorschlag)', + 'itch.shortSugg': 'Short description (Vorschlag)', + 'itch.copyFormatted': 'Formatiert kopieren', + 'itch.tagWhat': 'Tag „{t}“', + 'itch.tagsHint': 'itch erlaubt 10 · Klick kopiert einen Tag', + 'itch.all': 'Alle', + 'itch.inPackage': 'Im Paket ({n})', + 'itch.noTags': 'Im Paket stehen noch keine Tags.', + 'itch.examples': 'Beispiele / Ideen', + 'itch.showInExplorer': 'im Explorer zeigen', + 'itch.texts': 'Texte', + 'itch.noDescHtml': 'Keine description.html im Paket – „Ergänzen mit Claude“ in Aktionen erzeugt sie.', + 'itch.nWords': '{n} Wörter', + 'itch.images': 'Bilder', + 'itch.imagesHint': 'Klick zeigt die Datei im Explorer – von dort in itch.io ziehen', + 'itch.noImages': 'Keine Bilder im Paket.', + 'itch.moreFiles': 'Weitere Dateien', + 'itch.moreFields': 'Weitere Felder („Edit game“)', + 'itch.copiedVal': 'Kopiert: {v}', + 'itch.nothingUploaded': 'Nichts wird automatisch hochgeladen – Texte kopieren, Bilder aus dem Ordner auf itch.io ziehen.', + 'itch.installText': 'Install-Text', + 'itch.kind.cover': 'Cover (Cover image)', + 'itch.kind.theme': 'Banner & Hintergrund (Edit theme)', + 'itch.kind.promo': 'Promo-Bilder', + 'itch.kind.screenshot': 'Screenshots', + 'itch.kind.other': 'Weitere Bilder', + 'pbackup.noTarget': 'Noch kein Backup-Ziel festgelegt (z. B. externe Platte oder NAS).', + 'pbackup.setupTarget': 'Backup-Ziel einrichten', + 'pbackup.lastSaved': 'Zuletzt gesichert', + 'pbackup.target': 'Ziel', + 'pbackup.allTargets': 'Alle Ziele', + 'pbackup.checking': 'Prüfe, was im Backup fehlt…', + 'pbackup.copyingPct': 'Kopiere… {pct} %', + 'pbackup.nFiles': '{done} / {total} Dateien', + 'pbackup.otherRunning': 'Es läuft gerade ein anderes Backup ({scope}). Danach geht es hier.', + 'pbackup.allProjects': 'alle Projekte', + 'pbackup.savedBold': 'Gesichert.', + 'pbackup.copiedN': '{n} Dateien ({size}) neu ins Backup kopiert.', + 'pbackup.upToDate': 'Alles aktuell.', + 'pbackup.nothingMissing': 'Im Backup fehlte nichts.', + 'pbackup.cancelled': 'Abgebrochen. Bereits kopierte Dateien bleiben im Backup.', + 'pbackup.saveNow': 'Jetzt sichern', + 'pbackup.hint': 'Prüft das Projekt im Backup und kopiert nur fehlende und geänderte Dateien. Gelöscht wird dort nichts.', + 'edit.itchNot': 'als „nicht veröffentlicht“ markiert', + 'edit.itchAuto': 'automatisch erkannt: {title}', + 'edit.itchNotFound': 'nicht auf dem itch.io-Profil gefunden', + 'edit.saved': 'Gespeichert', + 'tray.on': 'Läuft beim Schließen im Hintergrund weiter', + 'tray.off': 'Schließen beendet das Dashboard', + 'autostart.on': 'Startet mit Windows', + 'autostart.off': 'Startet nicht mehr mit Windows', + 'itch.reading': 'itch.io wird gelesen…', + 'itch.found': '{n} Spiele gefunden.', + 'itch.unmatched': 'Ohne Projekt: {list} – im Projekt unter „Bearbeiten“ den Link eintragen.', + 'itch.allMatched': 'Alle einem Projekt zugeordnet.', + 'when.soon': 'gleich', + 'when.today': 'heute {time}', + 'when.tomorrow': 'morgen {time}', + 'auto.lastOk': 'Zuletzt erfolgreich {ago}.', + 'auto.lastFail': 'Letzter Versuch {ago} fehlgeschlagen – {detail}', + 'auto.error': 'Fehler', + 'auto.never': 'Noch nie automatisch gesichert.', + 'auto.running': 'Läuft gerade.', + 'auto.next': 'Nächstes automatisches Backup: {when}.', + 'set.saved': 'Einstellungen gespeichert', + 'row.name': 'Name', + 'row.nameTarget': 'Name, z. B. USB', + 'row.path': 'Pfad', + 'row.chooseFolder': 'Ordner wählen…', + 'row.upRoot': 'Nach oben (der erste ist der Hauptordner)', + 'row.upTarget': 'Nach oben (das erste ist das Standard-Ziel)', + 'row.rmRoot': 'Aus der Liste entfernen (auf der Platte wird nichts gelöscht)', + 'row.rmTarget': 'Ziel entfernen (im Backup selbst wird nichts gelöscht)', + 'row.phRoot': 'z. B. D:\\Projekte', + 'row.phTarget': 'z. B. E:\\Backup\\Projekte oder \\\\NAS\\Freigabe\\Projekte', + 'row.main': 'Hauptordner', + 'row.shown': 'angezeigt', + 'row.nProjects': '{n} Projekte', + 'row.backupDirect': 'Backup direkt ins Ziel', + 'row.backupSub': 'Backup in Unterordner „{name}“', + 'row.enterPath': 'Pfad eintragen oder Ordner wählen', + 'row.default': 'Standard', + 'row.saved': 'gesichert', + 'row.incomplete': 'unvollständig', + 'row.neverComplete': 'noch nie komplett', + 'row.newChecked': 'Neu – wird beim Speichern geprüft', + 'import.addedRemember': '{n} Projektordner hinzugefügt – Speichern nicht vergessen', + 'import.reading': 'wird gelesen…', + 'import.already': 'schon in der Liste', + 'import.thisFolder': 'Diesen Ordner selbst', + 'import.nProjects': '{n} Projekte', + 'import.nSub': '{n} Unterordner', + 'import.noSub': 'Keine Unterordner.', + 'import.allSub': 'Alle Unterordner', + 'import.addSelected': 'Ausgewählte hinzufügen', + 'import.nothingSelected': 'Nichts ausgewählt', + 'err.serverStale': 'Der Server ist veraltet – oben „Neu starten“ klicken.', + 'upd.serverStale': 'Das Dashboard wurde aktualisiert – der Server muss neu starten, damit alles funktioniert.', + 'upd.restart': 'Neu starten', + 'upd.uiNew': 'Neue Version der Oberfläche – Seite neu laden.', + 'upd.reload': 'Neu laden', + 'upd.restarting': 'Startet neu…', + 'upd.noRestart': 'Dieser Server kann sich noch nicht selbst neu starten – Dashboard einmal schließen und wieder öffnen.', + 'upd.noResponse': 'Server antwortet nicht – Dashboard schließen und wieder öffnen.', + 'kpi.projects': 'Projekte · {n} aktiv', + 'kpi.noRemote.title': 'Projekte ohne Git oder Remote anzeigen', + 'kpi.noRemote': 'ohne Git-Remote', + 'kpi.used': 'belegt ({n} gescannt)', + 'kpi.notScanned': 'noch nicht gescannt', + 'kpi.cleanable.title': 'Aufräumbare Projekte anzeigen', + 'kpi.cleanableCache': 'aufräumbar · Cache {cache}', + 'kpi.cleanable': 'aufräumbar', + 'kpi.scanN': 'Scan {done}/{total}', + 'kpi.scanAll': 'Alle scannen', + 'kpi.scanError': 'Scan-Fehler', + 'kpi.scanHint': 'Größe & löschbare Ordner messen', + 'quick.all': 'Alle', + 'quick.nobackup': 'Ohne Remote', + 'quick.unsaved': 'Ungesichert', + 'quick.due': 'Backup fällig', + 'quick.cleanable': 'Aufräumbar', + 'quick.install': 'npm install', + 'quick.noicon': 'Ohne Icon', + 'quick.gencopy': 'Generator-Kopie', + 'quick.fav': 'Favoriten', + 'quick.itch': 'itch.io', + 'quick.noitch': 'Fertig, nicht auf itch', + 'action.started': 'Gestartet: {label}', + 'count.none': 'Kein Projektordner angezeigt – oben wählen', + 'count.noFolder': 'Noch kein Projektordner gewählt', + 'count.multi': '{n} Projekte aus {folders} Ordnern', + 'count.single': '{n} Ordner unter {dir}', + 'scan.done': 'Scan fertig', + 'qs.start': 'Starten: {label}', + 'qs.explorer': 'Ordner im Explorer öffnen', + 'qs.vscode': 'In VS Code öffnen', + 'tasks.openN': '{n} offene Aufgaben', + 'empty.noProjects': 'Keine Projekte gefunden.', + 'home.noDesc': 'Keine Beschreibung', + 'home.favorites': 'Favoriten', + 'home.allProjects': 'Alle Projekte', + 'home.all': 'Alle', + 'home.ideas': 'Ideen', + 'home.archive': 'Archiv', + 'home.sort': 'Sortierung', + 'home.view': 'Ansicht', + 'home.cards': 'Kacheln', + 'home.compact': 'Kompakt', + 'home.list': 'Liste', + 'col.project': 'Projekt', + 'col.status': 'Status', + 'col.git': 'Git', + 'col.backup': 'Backup', + 'col.tech': 'Technik', + 'col.size': 'Größe', + 'col.cleanable': 'Aufräumbar', + 'col.activity': 'Aktivität', + 'tier.Cache.label': 'Cache', 'tier.Cache.hint': 'immer neu erzeugbar', 'tier.Cache.short': 'Cache', + 'tier.Release.label': 'Fertiger Build', 'tier.Release.hint': 'Version – bewusst löschen', 'tier.Release.short': 'Builds', + 'tier.Output.label': 'Rohbilder', 'tier.Output.hint': 'Generator-Output', 'tier.Output.short': 'Rohbilder', + 'tier.rest': 'Rest', + 'st.size': 'Größe', + 'st.folder': 'Ordner', + 'st.measured': 'gemessen', + 'st.deletable': 'Löschbar', + 'st.inside': 'darin {s}', + 'st.clickSub': 'Klick: Unterordner', + 'st.used': 'Belegt', + 'st.nMeasured': '{n} Projekte gemessen', + 'st.cleanableShare': 'Anteil aufräumbar', + 'st.ofUsed': 'vom belegten Platz', + 'st.measuredCount': 'Gemessen', + 'st.runningN': 'läuft: {done}/{total}', + 'st.oldest': 'ältester Stand {ago}', + 'st.nothingMeasured': 'noch nichts gemessen', + 'st.measureAll': 'Alle messen', + 'st.openPanel': 'Projekt-Panel öffnen', + 'st.nothingMeasuredHint': 'Noch nichts gemessen – oben „Alle messen“.', + 'st.projUnmeasured': 'Dieses Projekt wurde noch nicht gemessen.', + 'st.projRemeasure': 'Für die Aufteilung nach Ordnern das Projekt neu messen.', + 'st.measure': 'Messen', + 'st.remeasure': 'Neu messen', + 'st.ofCleanable': ', davon aufräumbar {size}', + 'st.nothingMeasured2': 'Noch nichts gemessen.', + 'st.kind': 'Art', + 'st.select': 'Auswählen', + 'st.nothingToClean': 'Nichts zum Aufräumen gefunden (oder noch nicht gemessen).', + 'st.selected': '{n} ausgewählt · {size}', + 'st.needCleanup': 'Löschen braucht cleanup.ps1', + 'st.confirmDelete': '{n} Ordner ({size}) endgültig löschen?', + 'st.regenHint': 'Sie lassen sich neu erzeugen (npm install, Build …).', + 'st.deleting': 'Lösche…', + 'st.freed': '{size} freigegeben', + 'act.level.0': 'keins', 'act.level.1': '1 Projekt', 'act.level.2': '2 Projekte', 'act.level.3': '3–4 Projekte', 'act.level.4': '5+ Projekte', + 'act.activeDays': 'Aktive Tage', + 'act.pastYear': 'im letzten Jahr', + 'act.currentStreak': 'Aktuelle Serie', + 'act.streakSub': 'am Stück mit Arbeit', + 'act.longestStreak': 'Längste Serie', + 'act.fullestDay': 'Vollster Tag', + 'act.day1': '{n} Tag', + 'act.daysN': '{n} Tage', + 'act.nProjects': '{n} Projekte', + 'act.pending': '{n} Projekte werden noch gelesen…', + 'act.less': 'weniger', + 'act.more': 'mehr aktive Projekte', + 'act.file1': '{n} Datei', + 'act.filesN': '{n} Dateien', + 'act.commit1': '{n} Commit', + 'act.commitsN': '{n} Commits', + 'act.nothingDay': 'An diesem Tag wurde nichts geändert.', + 'act.lastAgo': 'zuletzt {ago}', + 'act.noChangesRange': 'In diesem Zeitraum keine Änderungen.', + 'backup.otherRunning': 'Es läuft gerade ein Backup', + 'backup.autoDone': 'Automatisches Backup fertig', + 'backup.autoFail': 'Automatisches Backup: {err}', + 'backup.cancelledWord': 'abgebrochen', + 'backup.autoRunning': 'Automatisches Backup läuft …', + 'backup.lastAgo': 'zuletzt {ago}', + 'backup.neverComplete': 'noch nie komplett gesichert', + 'backup.setup': 'einrichten', + 'backup.autoChecking': 'auto: prüft…', + 'backup.checkingShort': 'prüft…', + 'backup.nDue': '{n} fällig', + 'backup.dueTitle': '{n} Projekte seit dem letzten Backup geändert (älter als {days} Tage) – Filter „Backup fällig“', + 'backup.remind1': 'Backup fällig: 1 Projekt wurde seit dem letzten Backup geändert – oben auf „Backup“ klicken', + 'backup.remindN': 'Backup fällig: {n} Projekte wurden seit dem letzten Backup geändert – oben auf „Backup“ klicken', + 'backup.noTargetShort': 'kein Ziel festgelegt', + 'backup.noTargetLong': 'Noch kein Backup-Ziel festgelegt. Wähle einen Ordner auf einer externen Platte, einem NAS oder einem anderen Laufwerk.', + 'backup.lastBackup': 'Letztes Backup', + 'backup.copied': 'Kopiert', + 'backup.noneOnTarget': 'Auf „{name}“ wurde über das Dashboard noch kein Komplett-Backup gemacht.', + 'backup.statusOf': 'Status – {name}', + 'backup.scopeNote': 'Der aktuelle Lauf betrifft nur das Projekt {scope} (gestartet über „Sichern“ im Projekt).', + 'backup.checkingLong': 'Prüfe, was neu ist und im Backup fehlt…', + 'backup.checkingTime': 'Dauert über das Netzwerk etwa 1–2 Minuten.', + 'backup.copyingTitle': 'Kopiere…', + 'backup.keepOpen': 'Das Fenster bitte offen lassen, bis das Backup fertig ist.', + 'backup.nothingMissing': 'Im Backup fehlt nichts.', + 'backup.checkResult': 'Ergebnis der Prüfung', + 'backup.new': 'Neu', + 'backup.changed': 'Geändert', + 'backup.onlyInBackup': 'Nur im Backup', + 'backup.kept': 'bleiben erhalten', + 'backup.nFilesCell': '{n} Dateien', + 'backup.moreProjects': '+ {n} weitere Projekte', + 'backup.recheck': 'Neu prüfen', + 'backup.copyNow': 'Jetzt kopieren ({size})', + 'backup.done': 'Backup fertig.', + 'backup.doneN': '{n} Dateien, {size} kopiert.', + 'backup.checkWhatsNew': 'Prüfen, was neu ist', + 'backup.footerHint': 'Im Backup wird nie etwas gelöscht – nur neue und geänderte Dateien kommen dazu. Nicht gesichert (wird neu erzeugt): {exclude}. Ziel und Ausnahmen: Einstellungen (Zahnrad oben).', + 'boot.itch': 'itch.io-Profil lesen …', + 'boot.reading2': 'Projekte einlesen (Git, Technik, Größen)', + 'boot.changes': 'Letzte Änderungen ermitteln', + 'boot.step': 'Schritt {step} von 2', + 'boot.estimating': 'wird geschätzt …', + 'boot.almost': 'gleich fertig', + 'boot.etaS': 'noch ca. {s} s', + 'boot.etaMin': 'noch ca. {m} min', + 'danger.title': 'Gefahrenzone', + 'danger.hint': 'Löscht den kompletten Projektordner dauerhaft von der Platte. Das Backup bleibt unberührt. Nicht rückgängig machbar.', + 'danger.deleteFolder': 'Projektordner löschen…', + 'danger.confirm1': 'Projektordner „{name}“ endgültig löschen?\n\n{path}\n\nAlles darin wird von der Platte entfernt. Das Backup wird NICHT gelöscht. Nicht rückgängig machbar.', + 'danger.confirm2': '„{name}“ wirklich löschen? Letzte Chance.', + 'danger.deleted': 'Projektordner „{name}“ gelöscht', + }, +}; diff --git a/server.js b/server.js index d6172a6..5cec9b4 100644 --- a/server.js +++ b/server.js @@ -321,10 +321,20 @@ async function describeProject(p, target) { } } +// progress of reading the projects (start screen: /api/progress) +const loadState = { running: 0, phase: '', done: 0, total: 0 } async function listProjects(target) { - if (settings.itchOn()) await itch.ensure() // switched off: no request to itch.io - const list = await pool(projectList(), 8, (p) => describeProject(p, target)) - return list.sort((a, b) => new Date(b.mtime) - new Date(a.mtime)) + loadState.running++ + try { + if (settings.itchOn()) { loadState.phase = 'itch'; await itch.ensure() } // switched off: no request to itch.io + const items = projectList() + Object.assign(loadState, { phase: 'projects', done: 0, total: items.length }) + const list = await pool(items, 8, async (p) => { const d = await describeProject(p, target); loadState.done++; return d }) + return list.sort((a, b) => new Date(b.mtime) - new Date(a.mtime)) + } finally { + loadState.running-- + if (!loadState.running) loadState.phase = '' + } } // tech.actions matches programs against the folder name; the key names the console windows @@ -381,6 +391,16 @@ app.get('/icons.svg', (req, res) => { res.sendFile(ICON_SPRITE, (err) => { if (err && !res.headersSent) res.status(404).end() }) }) +// Start screen: how far reading the projects (git, sizes ...) and the +// "last change" of every project (lib/activity.js, in the background) has come. +app.get('/api/progress', (req, res) => { + const total = projMap.size + res.json({ + projects: { running: loadState.running > 0, phase: loadState.phase, done: loadState.done, total: loadState.total }, + activity: { pending: activity.pending(), total }, + }) +}) + app.get('/api/projects', handle(async (req, res) => { const list = await listProjects(String(req.query.target ?? '') || null) const s = settings.get() @@ -391,7 +411,9 @@ app.get('/api/projects', handle(async (req, res) => { activeRoot: s.activeRoot, activeRoots: s.activeRoots, remindDays: s.backup.remindDays ?? 7, - setupNeeded: !ROOT_DIR, + // first start: no usable projects folder registered at all (an empty selection is fine) + setupNeeded: !settings.get().roots.some((r) => fs.existsSync(r.path)), + noneShown: !ROOTS.length && !!settings.get().noneShown, projects: list, totals: { ...storage.totals(list.map((p) => ({ root: ROOTS.find((r) => r.id === p.root)?.path, folder: p.folder }))), noBackup: list.filter((p) => p.git.level === 'red').length }, scan: storage.state, @@ -444,7 +466,7 @@ const uiFiles = () => filesIn(path.join(__dirname, 'public'), /\.(js|html|css)$/ const CODE_STAMP = newestMtime(codeFiles()) const STARTED_AT = new Date().toISOString() app.get('/api/version', (req, res) => { - res.json({ startedAt: STARTED_AT, pid: process.pid, stale: newestMtime(codeFiles()) > CODE_STAMP, uiStamp: newestMtime(uiFiles()) }) + res.json({ startedAt: STARTED_AT, pid: process.pid, version: require('./package.json').version, stale: newestMtime(codeFiles()) > CODE_STAMP, uiStamp: newestMtime(uiFiles()) }) }) // Restart the server (lib/supervisor.js starts it again). app.post('/api/restart', (req, res) => { @@ -883,6 +905,41 @@ app.post('/api/projects/:name/clean', handle(async (req, res) => { res.json(result) })) +// Permanently deletes the whole project folder from disk (not from any backup). +// Guarded: only a real subfolder of a shown projects folder, never a root or _Tools. +app.post('/api/projects/:name/delete', handle(async (req, res) => { + if (storage.busy() || backup.busy() || create.busy() || archive.busy()) return res.status(409).json({ error: 'Erst warten, bis Scan/Backup fertig ist.' }) + const key = req.params.name + const dir = resolveProject(key) + const ref = dir && projectRef(key) + if (!ref || !dir) return res.status(404).json({ error: 'unknown project' }) + if (ref.folder === '_Tools') return res.status(400).json({ error: '_Tools wird nie gelöscht' }) + const root = path.resolve(ref.root.path) + const target = path.resolve(dir) + // never the projects folder itself, never a drive root – only a subfolder of a registered root + if (target.toLowerCase() === root.toLowerCase() || !target.toLowerCase().startsWith(root.toLowerCase() + path.sep) || path.dirname(target) === target) { + return res.status(400).json({ error: 'Ordner nicht löschbar.' }) + } + try { + fs.rmSync(target, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 }) + } catch (e) { + return res.status(400).json({ error: `Löschen fehlgeschlagen (Datei gesperrt? Programm offen?): ${String(e.message ?? e)}` }) + } + // drop it from the subfolder-scanner lists if it was listed there + const rSet = settings.get().roots.find((x) => x.id === ref.root.id) + if (rSet) { + const low = ref.folder.toLowerCase() + const nn = (rSet.nested ?? []).filter((x) => x.toLowerCase() !== low) + const ni = (rSet.nestedIgnored ?? []).filter((x) => x.toLowerCase() !== low) + if (nn.length !== (rSet.nested ?? []).length || ni.length !== (rSet.nestedIgnored ?? []).length) { + settings.setNested(rSet.id, nn, ni); nested.forgetHint(); applySettings() + } + } + thumbCache.delete(key); quickCache.delete(key); icons.forget(target) + projectList() + res.json({ ok: true, name: ref.name }) +})) + // NAS backup (lib/backup.js): check → copy, never deletes in the backup. app.get('/api/backup', (req, res) => res.json({ ...backup.getState(), schedule: scheduler.status() })) // body: { target } = check everything · { target, project, autoCopy: true } = "Sichern" of one project