git-status übersetzt, fehlender key "st.cleanable"
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -115,8 +115,21 @@ function factsHtml(p) {
|
||||
}
|
||||
|
||||
function gitHtml(git, short = false) {
|
||||
const label = short ? t('git.' + git.level) : git.label
|
||||
return `<span class="git ${git.level}" title="${escapeHtml(git.label)}">${ic(GIT_ICON[git.level], 'sm')}<span class="gl">${escapeHtml(label)}</span></span>`
|
||||
const label = short ? t('git.' + git.level) : gitLabel(git)
|
||||
return `<span class="git ${git.level}" title="${escapeHtml(gitLabel(git))}">${ic(GIT_ICON[git.level], 'sm')}<span class="gl">${escapeHtml(label)}</span></span>`
|
||||
}
|
||||
// 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)}
|
||||
<span class="rsize" title="${escapeHtml(sizeTitle(p))}">${ic('folder', 'sm')}${p.storage?.sizeMB != null ? fmtMB(p.storage.sizeMB) : '–'}</span>
|
||||
<span class="rdate" title="${escapeHtml(changeTitle(p))}">${ic('file-pen', 'sm')}<span class="dl">${fmtDate(lastActivity(p))}</span><span class="ds">${fmtDate(lastActivity(p), false)}</span></span>
|
||||
<span class="ri ${p.git.level}" title="Git: ${escapeHtml(p.git.label)}">${ic(GIT_ICON[p.git.level], 'sm')}</span>
|
||||
<span class="ri ${p.git.level}" title="Git: ${escapeHtml(gitLabel(p.git))}">${ic(GIT_ICON[p.git.level], 'sm')}</span>
|
||||
<span class="ri ${c.level}" title="${escapeHtml(c.label)}">${ic('hard-drive', 'sm')}</span>
|
||||
${open ? `<span class="ri tasks" title="${t('tasks.openN', { n: open })}">${ic('list-checks', 'sm')}${open}</span>` : ''}
|
||||
${p.published ? `<a class="ri pub" href="${escapeHtml(p.published.url)}" target="_blank" draggable="false" onclick="event.stopPropagation()" title="${escapeHtml(pubTitle(p))}">${ic('rocket', 'sm')}</a>` : ''}
|
||||
@@ -1562,7 +1575,7 @@ function renderGallery() {
|
||||
<img loading="lazy" class="${p.hasIcon ? '' : 'photo'}" src="${thumbUrl(p.name)}" alt="" onerror="this.remove()">
|
||||
${statusHtml(p.status)}
|
||||
${favBtn(p, 'onthumb')}
|
||||
<span class="tbadges">${pubBadge(p)}${cloudBadge(p)}<span class="tbadge ${p.git.level}" title="Git: ${escapeHtml(p.git.label)}">${ic(GIT_ICON[p.git.level])}</span></span>
|
||||
<span class="tbadges">${pubBadge(p)}${cloudBadge(p)}<span class="tbadge ${p.git.level}" title="Git: ${escapeHtml(gitLabel(p.git))}">${ic(GIT_ICON[p.git.level])}</span></span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="ghead"><div class="name">${escapeHtml(p.name)}</div>${qsGroup(p, false, true)}</div>
|
||||
|
||||
Reference in New Issue
Block a user