feat(status): localize selection count and stage/unstage buttons

Replace hard-coded "X selected" and "Stage/Unstage X" labels in the status panel
with i18n lookups. Adds three message keys with English and German texts:
- status.selectionCount
- status.stageCount
- status.unstageCount

StatusPanel.svelte now uses t(...) with the count for the selection badge and the
stage/unstage action buttons. CHANGELOG.md was also updated (Unreleased and
recent release entries).
This commit is contained in:
2026-09-22 18:50:24 +02:00
parent d2cf81ac94
commit 8bac03e3fc
3 changed files with 181 additions and 4 deletions
+4 -4
View File
@@ -503,9 +503,9 @@
</div>
<div class="status-lane-actions">
{#if selectedUnstagedCount > 1}
<span class="status-selection-count">{selectedUnstagedCount} selected</span>
<span class="status-selection-count">{t("status.selectionCount", { count: selectedUnstagedCount })}</span>
<button class="btn-sm" type="button" onclick={() => onStage(changedFiles.filter((file) => selectedStatusPaths.has(fileKey(file)) && file.unstaged !== null))} disabled={isBusy} title={t("status.stageSelected", { count: selectedUnstagedCount })}>
<ArrowRight size={13} aria-hidden="true" /> Stage {selectedUnstagedCount}
<ArrowRight size={13} aria-hidden="true" /> {t("status.stageCount", { count: selectedUnstagedCount })}
</button>
{/if}
<button class="btn-sm" type="button" onclick={onStageAll} disabled={isBusy || !hasUnstaged} title={t("status.stageAllHint")}>
@@ -560,9 +560,9 @@
</div>
<div class="status-lane-actions">
{#if selectedStagedCount > 1}
<span class="status-selection-count">{selectedStagedCount} selected</span>
<span class="status-selection-count">{t("status.selectionCount", { count: selectedStagedCount })}</span>
<button class="btn-sm" type="button" onclick={() => onUnstage(changedFiles.filter((file) => selectedStatusPaths.has(fileKey(file)) && file.staged !== null))} disabled={isBusy} title={t("status.unstageSelected", { count: selectedStagedCount })}>
<ArrowLeft size={13} aria-hidden="true" /> Unstage {selectedStagedCount}
<ArrowLeft size={13} aria-hidden="true" /> {t("status.unstageCount", { count: selectedStagedCount })}
</button>
{/if}
<button class="btn-sm" type="button" onclick={onUnstageAll} disabled={isBusy || !hasStaged} title={t("status.unstageAllHint")}>
+3
View File
@@ -216,6 +216,9 @@ export const messages = {
"status.discardUnstagedSelected": { en: "Discard unstaged changes in {count} selected files", de: "Ungestagte Änderungen in {count} ausgewählten Dateien verwerfen" },
"status.discardStagedSelected": { en: "Discard staged changes in {count} selected files", de: "Gestagte Änderungen in {count} ausgewählten Dateien verwerfen" },
"status.discard": { en: "Discard", de: "Verwerfen" },
"status.selectionCount": { en: "{count} selected", de: "{count} ausgewählt" },
"status.stageCount": { en: "Stage {count}", de: "{count} stagen" },
"status.unstageCount": { en: "Unstage {count}", de: "{count} entstagen" },
"status.selectInExplorer": { en: "Select {path} in Explorer", de: "{path} im Explorer auswählen" },
"status.stageFile": { en: "Stage file", de: "Datei stagen" },
"status.unstageFile": { en: "Unstage file", de: "Datei entstagen" },