From bf6bbf01691e88d49adae7fe80e3effbcb80ebb9 Mon Sep 17 00:00:00 2001 From: Michi Date: Tue, 24 Nov 2026 21:21:05 +0100 Subject: [PATCH] =?UTF-8?q?git-status=20=C3=BCbersetzt,=20fehlender=20key?= =?UTF-8?q?=20"st.cleanable"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Git-Zeile auf Karten/Liste wird clientseitig aus den Rohdaten des Servers gebaut (dirty/ahead/behind/remote/upstream) und übersetzt – vorher blieb sie auch in der englischen Oberfläche deutsch. - Speicher-Ansicht: Kennzahl "Aufräumbar" zeigte den rohen Key "st.cleanable" (fehlte im Wörterbuch). Co-Authored-By: Claude Opus 5.5 --- public/app.js | 21 +++++++++++++++++---- public/lang.js | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/public/app.js b/public/app.js index 8cdeeae..3096620 100644 --- a/public/app.js +++ b/public/app.js @@ -115,8 +115,21 @@ function factsHtml(p) { } function gitHtml(git, short = false) { - const label = short ? t('git.' + git.level) : git.label - return `${ic(GIT_ICON[git.level], 'sm')}${escapeHtml(label)}` + const label = short ? t('git.' + git.level) : gitLabel(git) + return `${ic(GIT_ICON[git.level], 'sm')}${escapeHtml(label)}` +} +// Git status line in the current language, built from the server's raw fields (lib/git.js) +function gitLabel(g) { + if (!g) return '' + if (!g.isRepo) return t('gitl.noGit') + if (g.label === 'Git nicht installiert') return t('gitl.notInstalled') + const parts = [] + if (g.dirty) parts.push(t('gitl.changed', { n: g.dirty })) + if (g.ahead) parts.push(t('gitl.unpushed', { n: g.ahead })) + if (g.behind) parts.push(t('gitl.behind', { n: g.behind })) + if (!g.remote) return [t('gitl.noRemote'), ...parts].join(' · ') + if (!g.upstream) return [t('gitl.noUpstream'), ...parts].join(' · ') + return parts.length ? parts.join(' · ') : t('gitl.saved') } // Backup state of one project (p.lastBackup from the server: own or full backup, newer one) @@ -1473,7 +1486,7 @@ function rowHtml(p) { ${rootTag(p, true)} ${ic('folder', 'sm')}${p.storage?.sizeMB != null ? fmtMB(p.storage.sizeMB) : '–'} ${ic('file-pen', 'sm')}${fmtDate(lastActivity(p))}${fmtDate(lastActivity(p), false)} - ${ic(GIT_ICON[p.git.level], 'sm')} + ${ic(GIT_ICON[p.git.level], 'sm')} ${ic('hard-drive', 'sm')} ${open ? `${ic('list-checks', 'sm')}${open}` : ''} ${p.published ? `${ic('rocket', 'sm')}` : ''} @@ -1562,7 +1575,7 @@ function renderGallery() { ${statusHtml(p.status)} ${favBtn(p, 'onthumb')} - ${pubBadge(p)}${cloudBadge(p)}${ic(GIT_ICON[p.git.level])} + ${pubBadge(p)}${cloudBadge(p)}${ic(GIT_ICON[p.git.level])}
${escapeHtml(p.name)}
${qsGroup(p, false, true)}
diff --git a/public/lang.js b/public/lang.js index 1b01a69..a24fb54 100644 --- a/public/lang.js +++ b/public/lang.js @@ -261,6 +261,14 @@ window.LANG = { 'git.green': 'Backed up', 'git.yellow': 'Not backed up', 'git.red': 'No remote', + 'gitl.noGit': 'no Git', + 'gitl.notInstalled': 'Git not installed', + 'gitl.changed': '{n} changed', + 'gitl.unpushed': '{n} not pushed', + 'gitl.behind': '{n} behind', + 'gitl.noRemote': 'no remote (local only)', + 'gitl.noUpstream': 'no upstream', + 'gitl.saved': 'pushed', 'cloud.never': 'never', 'cloud.neverLong': 'Backup: never backed up', 'cloud.incomplete': 'incomplete', @@ -631,6 +639,7 @@ window.LANG = { 'st.inside': 'of it {s}', 'st.clickSub': 'Click: subfolders', 'st.used': 'Used', + 'st.cleanable': 'Cleanable', 'st.nMeasured': '{n} projects measured', 'st.cleanableShare': 'Cleanable share', 'st.ofUsed': 'of the used space', @@ -1028,6 +1037,14 @@ window.LANG = { 'git.green': 'Gesichert', 'git.yellow': 'Ungesichert', 'git.red': 'Kein Remote', + 'gitl.noGit': 'kein Git', + 'gitl.notInstalled': 'Git nicht installiert', + 'gitl.changed': '{n} geändert', + 'gitl.unpushed': '{n} nicht gepusht', + 'gitl.behind': '{n} hinterher', + 'gitl.noRemote': 'kein Remote (nur lokal)', + 'gitl.noUpstream': 'kein Upstream', + 'gitl.saved': 'gesichert', 'cloud.never': 'nie', 'cloud.neverLong': 'Backup: noch nie gesichert', 'cloud.incomplete': 'unvollständig', @@ -1398,6 +1415,7 @@ window.LANG = { 'st.inside': 'darin {s}', 'st.clickSub': 'Klick: Unterordner', 'st.used': 'Belegt', + 'st.cleanable': 'Aufräumbar', 'st.nMeasured': '{n} Projekte gemessen', 'st.cleanableShare': 'Anteil aufräumbar', 'st.ofUsed': 'vom belegten Platz',