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

The GitHub tool window's long operations (checking out a pull request,
fetching it for a diff, creating its worktree, applying or committing a
suggested change, resolving a thread) passed their banner title as an
untagged string, and the failure notification appended " failed" to it, so
the banner stayed English and the error read "Checking out #12失败". Each
operation now names a translated progress title and its own failure title.
Цей коміт міститься в:
l0ng-ai committed 2026-11-04 12:01:50 +08:00
1 джерело d3b9a39831
коміт f2c620cceb
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;
}