fix(i18n): translate the GitHub pull request operations' progress and failure titles (#1169)

The GitHub tool window's long operations passed an untagged banner title and appended " failed" for the error, so the banner stayed English and failures read half translated. withBusy now takes a tx-tagged progress title and its own failure title per operation (checkout, fetch for diff, worktree, apply/commit suggestion, resolve thread).
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-04 12:02:06 +08:00
1 джерело d3b9a39831
коміт c5e188d1e3
3 files changed
+33 -10

No files matched your search

+8 -3
Переглянути файл
@@ -31,8 +31,10 @@ export async function applySuggestion(
suggestion: readonly string[],
commitMessage?: string,
): Promise<boolean> {
const title = commitMessage ? tx("Committing suggested change") : tx("Applying suggested change");
const done = await withBusy(title, async () => {
const op = commitMessage
? { title: tx("Committing suggested change"), failure: tx("Couldn't commit the suggested change") }
: { title: tx("Applying suggested change"), failure: tx("Couldn't apply the suggested change") };
const done = await withBusy(op, async () => {
const root = await repositoryRoot();
const abs = `${root}/${target.path}`;
const text = await call(commands.fsReadText(abs));
@@ -61,7 +63,10 @@ export async function applySuggestion(
return true;
});
if (!done) return false;
if (thread.viewerCanResolve) await withBusy(tx("Resolving thread"), () => resolveThread(number, thread.id));
if (thread.viewerCanResolve)
await withBusy({ title: tx("Resolving thread"), failure: tx("Couldn't resolve the thread") }, () =>
resolveThread(number, thread.id),
);
return true;
}