The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
fix(vcs): translate the question in the add/remove to Git confirmation (#1575)
l0ng-ai6e6baf428409
diff --git a/src/features/vcs/confirmations.tsx b/src/features/vcs/confirmations.tsxindex b9145ad81..66e080658 100644--- a/src/features/vcs/confirmations.tsx+++ b/src/features/vcs/confirmations.tsx@@ -44,14 +44,20 @@ async function confirmFiles(op: FileOperation["kind"], files: string[]): Promiseconst root = useVcs.getState().root ?? "";const add = op === "created";const n = files.length;- const what = n === 1 ? "file" : `${n} files`;const list = files.slice(0, 10).map((f) => relTo(root, f)).join("\n");+ const question = add+ ? n === 1+ ? tx("Do you want to add the following file to Git?")+ : tx`Do you want to add the following ${n} files to Git?`+ : n === 1+ ? tx("Do you want to remove the following file from Git?")+ : tx`Do you want to remove the following ${n} files from Git?`;const r = await ask({title: add ? "Add File to Git" : "Remove File from Git",- body: `${add ? `Do you want to add the following ${what} to Git?` : `Do you want to remove the following ${what} from Git?`}\n${list}${n > 10 ? "\n…" : ""}`,+ body: `${question}\n${list}${n > 10 ? "\n…" : ""}`,checkbox: "Don't ask again",width: 480,buttons: [{ id: "ok", label: add ? "Add" : "Remove", primary: true }],diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.jsonindex cf7b1f137..944384062 100644--- a/src/platform/locales/text/zh.json+++ b/src/platform/locales/text/zh.json@@ -6099,6 +6099,10 @@"Dropped {ref}": "已删除 {ref}","Remove 1 file from Git": "从 Git 中移除 1 个文件","Remove {n} files from Git": "从 Git 中移除 {n} 个文件",+ "Do you want to add the following file to Git?": "是否将以下文件添加到 Git?",+ "Do you want to add the following {n} files to Git?": "是否将以下 {n} 个文件添加到 Git?",+ "Do you want to remove the following file from Git?": "是否从 Git 中移除以下文件?",+ "Do you want to remove the following {n} files from Git?": "是否从 Git 中移除以下 {n} 个文件?","Accept yours for {path}": "对 {path} 接受你的版本","Accept theirs for {path}": "对 {path} 接受他们的版本","{path} resolved": "{path} 已解决",