From a0874ea2f1129a78cd9997650f6480de60daaca6 Mon Sep 17 00:00:00 2001 From: brennanb2025 Date: Fri, 10 Jul 2026 01:21:48 -0700 Subject: [PATCH] fix(i18n): drop untranslatable plural placeholder from uploadingAttachments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The English plural-suffix hack (file{{value1}} with value1=''/'s') can't be expressed in ja/ko/zh, whose translations correctly omit {{value1}} — but verify:localization-catalog requires exact placeholder parity, so main fails lint for every PR. Use the catalog's established '(s)' convention instead and drop value1 from the caller; CJK translations stay intact. The sync repair script would have overwritten them with English text. Co-authored-by: Orca --- .../components/native-chat/native-chat-attachment-upload.ts | 4 ++-- src/renderer/src/i18n/locales/en.json | 2 +- src/renderer/src/i18n/locales/es.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/native-chat/native-chat-attachment-upload.ts b/src/renderer/src/components/native-chat/native-chat-attachment-upload.ts index 2bac1a42392..2cbcf236fa8 100644 --- a/src/renderer/src/components/native-chat/native-chat-attachment-upload.ts +++ b/src/renderer/src/components/native-chat/native-chat-attachment-upload.ts @@ -84,8 +84,8 @@ export async function uploadNativeChatAttachmentPaths( const pending = toast.loading( translate( 'components.native-chat.composer.uploadingAttachments', - 'Uploading {{value0}} file{{value1}} to remote…', - { value0: paths.length, value1: paths.length === 1 ? '' : 's' } + 'Uploading {{value0}} file(s) to remote…', + { value0: paths.length } ) ) try { diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 7c8045033f8..377ea9b6775 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -12877,7 +12877,7 @@ "pastedImageLabel": "Pasted image", "imagePasteFailed": "Image paste failed.", "worktreeNotReady": "Worktree not ready — try again in a moment.", - "uploadingAttachments": "Uploading {{value0}} file{{value1}} to remote…" + "uploadingAttachments": "Uploading {{value0}} file(s) to remote…" }, "tool": { "running": "Running…", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index ffd31bdd327..c770603fee4 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -12877,7 +12877,7 @@ "pastedImageLabel": "Imagen pegada", "imagePasteFailed": "Error al pegar imagen.", "worktreeNotReady": "Worktree no está listo — intenta de nuevo en un momento.", - "uploadingAttachments": "Subiendo {{value0}} archivo{{value1}} al remoto…" + "uploadingAttachments": "Subiendo {{value0}} archivo(s) al remoto…" }, "tool": { "running": "Ejecutando…",