🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #976

[Outreachy PATCH] checkout: use Q_() for the "... and %d more" message

#976
From: Tanga Joris
Date: Wed, 21 Oct 2026 02:21
33 lines
11467 bytes
When leaving orphaned commits behind, "git checkout" ends the list
with " ... and %d more." using a plain _(), so translators are unable
to give the correct plural form of the count. Use Q_() so gettext can
pick it. English string output stays the same.

Signed-off-by: Tanga Joris <tangajoris@gmail.com>
---
The count here is always 2 or more, because when only one commit is
left over, the suggest_reattach() function lists it instead of printing
this message. I still used Q_() because some languages, like Polish,
use different words for 2-4 and for 5 or more.

 builtin/checkout.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 2d575a4f57..49239f029f 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1085,7 +1085,9 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
 		if (more == 1)
 			describe_one_orphan(&sb, last);
 		else
-			strbuf_addf(&sb, _(" ... and %d more.\n"), more);
+			strbuf_addf(&sb, Q_(" ... and %d more.\n",
+					    " ... and %d more.\n",
+					    more), more);
 	}
 
 	fprintf(stderr,
-- 
2.43.0
Technical Details
Message-ID: <20261021022156.119947-1-tangajoris@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72629-linux-kernel-git=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72629-linux-kernel-git=dewy.ru
From: tangajoris@gmail.com (Tanga Joris)
Newsgroups: linux.kernel.git
Subject: [Outreachy PATCH] checkout: use Q_() for the "... and %d more" message
Date: Wed, 21 Oct 2026 05:21:56 +0300
Organization: Usenet Network
Message-ID: <20261021022156.119947-1-tangajoris@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="4018597"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:gyMclm1EtNWXP9u/TH/RbeWUi1o= sha256:O2eVYt0OQHmZuakD9HrzFfq7WyWtk9Hk7A+Zq3hrSlI=
	sha1:qjtgtY5RzGg+vE7vswKs/TcmeyA= sha256:QUX1dYSn4Uw/a8MuIMI0LlBzGpu8pVCrI6qNA+hBI+4=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9B311110EE1; Wed, 21 Oct 2026 05:27:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: 0.51
X-Spam-Status: No, score=0.51 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SBL_CSS=3.558,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id EnQfLd8rRZcK;
	Wed, 21 Oct 2026 05:27:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72629-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 012B1110EDD; Wed, 21 Oct 2026 05:27:05 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id E8E02399F9; Wed, 21 Oct 2026 02:22:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792549346;
	b=kRIC07xwupHkrc27TV0rAdLqCQYPblsslW4ym47zV4UilwtP+g9aKHCuxduVIlb5aUkD
	 yLrkjz2wwujW4pPtTw8jq9dSGeABOzxfFxaQPcNefgYYg1KsAKindn/jeIB2jXOqGaL0O
	 WJehYKnm+8BhC2cSXHr7dfYq8yVtCIALXuT53CjU2bkTn4797qfHOD3DWAjbrfVCtr2b/
	 5R4X2Xjr3fYwuMe3+hXwAz/7rEStlDoejLkcYfK8XW+3iwKYqPb29WqalVYLMg8y/jDH6
	 WXc2OwUudGSPdW/Ws7YDKMmpno214KU1D/vEpQfi3m36qJnyp/wasasp7rqKkLHwDVg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792549346;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=33fCz+KZ0GeyzH1W39CRJ+NN/paMKi5jdV6Jfq+7KZ4=;
	b=OgzarFKD46hbVuBFI7f/lYGiIkdJKzZZ2c1NPdlYAMBHhfJeEUmGmJKdZ6NTwXzI4oXP
	 rAaCKOBQU4eUGSgxIjJPKKgjABncCV4WruSBffqlsofshb+BKPrl21wdFZr1mE6aEk840
	 4ZySkElcl41wC96an+CJbOVL/Nqrs2PLEplkrEqWVyVaaGzrFJ47UAe0ES0upHlUgEMJF
	 gGU7qS8T2jw7Kg9wTVBguCbwS90knI42fRAhlTaaK2P09oqh+EEilCqLZBxUJrNb1Dr25
	 JfQFFpyn/h8vx0Vfo1mQSUFTm1EWygDNPLONPPOuNhyZ2pPPqS/s31naYMANE5pCtcA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=agiFGvg9;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id BDC11606A320;
	Wed, 21 Oct 2026 02:22:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=agiFGvg9
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792549345;
	b=GzgV75uQ286in5mlzFEZQtAzk5Q0YqEre6BMvsztH7QehfAXSlGvxawlJFErFlcwf2Be
	 B8LfdzQ6DTnJHevEZGPoRji0EVotS5okG6iFAxsyqOqvqGDHvo5BKy9/nJaMJ8BzCuV4x
	 PG9iQuHVuVngcr+k7xvo/+oTnMHG1AH7QGN3axtQXQwJWjMKiTfYw6oi25hhmfDXsn0Xs
	 uedMB17Wm30TVj9nromoq0O1sNZcReU6EFDfuY0Fj3ZzNfe1lMSBavw5k3f59OwgPTWWs
	 W5UgCAS43469wUPxYQ4kNHH93A/NwKsPReIRgdMpP5yC49ZqRjBDRAJgKR8L82dfLdw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792549345;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=33fCz+KZ0GeyzH1W39CRJ+NN/paMKi5jdV6Jfq+7KZ4=;
	b=lBmJ7in0S7gpIxfFYm5pwd6y5VNVYSIcD1WxgugBK0mFGfNdSehghRZMu6HOc+fnyZ7p
	 IwP6llGK0jgD3fR14AdRCEaKKrznDrVER+KIU0y9f+UwuIoA63mwmEew1tMaNSLZv0UxV
	 WzO5oFFriRJ3seH3cjHK5Wg7UJ+WKSrwQwV7vOU3XVq7H5EJPyrsnSoZiH+hbEliccBck
	 Ute50xz0EhWseUgE8LPUrDl432PA7mLHjqsIM2ckZMDRH52VlmyvvS7bobRwmI2/rioge
	 JhoAk7QD9ZmGLyGQIkfS+YN60J8Eyf4jMw18fp8K9ZUFRrCeh5VJXrT9sKLKzVtuOsA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=agiFGvg9;
	arc=none smtp.remote-ip=209.85.128.45
X-Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89681606A319
	for <git@vger.kernel.org>; Wed, 21 Oct 2026 02:22:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 89681606A319
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4a018dc1f98so1438415e9.3
        for <git@vger.kernel.org>; Tue, 20 Oct 2026 19:22:25 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792549344; x=1793154144; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=33fCz+KZ0GeyzH1W39CRJ+NN/paMKi5jdV6Jfq+7KZ4=;
        b=agiFGvg9Su/rCLV4JnI1ZNI6HTewdpav1s73NFEUO39dA+VKCV1oiQCwcCbGICwOeh
         Kca9+NfcfBpuzxK+reekyjNWIJ9Fw1HtuxOgyeMNoyZzddhfRBNfx/GGOc2JGXcBat3h
         gkWl0jtpOo1Vtj7alvjxvpLZqQroiy0vZtowtW0YSzgx20iyKH/lCfDFPf6dqD3ETofL
         u8JUpumzBMBw2qoiWEo74VxJ0Ss07aLQ1l5xbKevWbCA9pjyJGTY5uZNChJliUEMn7RL
         tiFjiQKk7wh9iDUUYv0VV7H1UND+iHvnrgxQs94mIPcH+JcHJTXYZPwswsrG1IY1JejD
         5sSQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792549344; x=1793154144;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=33fCz+KZ0GeyzH1W39CRJ+NN/paMKi5jdV6Jfq+7KZ4=;
        b=FmwtvdX/CFFP1s5Pnw/boWR+lmj7a0es4fqnMpuWbYmBCyTWR+ss8y07PEiERoisPr
         zdres8A7s5hzjLQXByAAu6BhzPPMkBaLVAHsdza1Z2e1OH8QuNrJAUFI6JURB2pJQ0ba
         cIz1OMtdLL3fThRq46/IGcSqzjWI/3rHnpmFHrcB6OY4Hv3KWNdsJUjPAUUALhl88SHg
         ADV4y5N+1DihIXpYtP5FIQ6vL0yutsp2FlwsOzi5Ilccs9uCHu8ono998o/CbhXG03N2
         KitNLq0UUGPsha+1AqqOqiTvejX8CxpJL4EZXfmMwcBdJjVsdjfpfBPfHjgFp99w7HXa
         XbNw==
X-Gm-Message-State: AFq9FYJUFX5Uen2O7SYms5xScIN1vFPzRcXttcOy0lhAhfI64bo1LN7P
	zcs9cf7bgUd7qlL1fMbFh0CoOW5/o/inFkZKhy1tLueNULHz5jbk6u8Z29IM2V3Z
X-Gm-Gg: AYBFou2uZRuBrxNMhQeQ46vWDAHP8XNTuLIXT6gWiLEO7Ycov6m1SNoh6fkt2N5uqh8
	Z656IIfc/OWHYdVgiMEIQ7z7V7Sp/xe6uoRiWHX4zlPsf53rCsVdX9p/09xSKH21uPmcKRkBlZl
	iDq8TRRSDRfmi44S4matBhPE4j0mPfiDpQOt7xExe05U1o5uohhuZ40/76lh+6UZkVz2vnLA+/5
	bpyzt+2SN19Wx7DgtP/RsV6FPuWa+KtxVgAf+U1IkZT+aI5CiqwbTsbSlbKgaPqfEONrxpwipN1
	Mgf42G5n2tqp+phiMBZFb/UjsCV3w1CiZu6ArhucOEU4qHQOzh2ofaenFG9DEVZPyZi84oiPV4X
	i42hit9fr/A6gPclxuFINTBBjUCrd68VPtL7Gcanq9uqo3de1DobiNVwReYFEMtbUtjFVarqQxZ
	z5tFA3xHURrdlhJpUAH2ewioGb6ejIHX+P4ODWJlsR+yox3X9zV6mt8cq8ek6ZPP8cxU+E+jGX5
	ydDAyiZ6jRDbyMkfEKhlfoGcZoWvCubVxOrFgWg0JMc5FOPRbLvGn5WRRl2zJ4aI8CJMEh5etej
	yx1Ypm7tLR8ox06KpP2B+7UwOWCqHD6Oht04VgIHbSDKHXEfV6KU0+FAYaOrQAw=
X-Received: by 2002:a05:600c:4e86:b0:49c:fa20:cbfc with SMTP id 5b1f17b1804b1-4a1fdd3946emr9648225e9.19.1792549343644;
        Tue, 20 Oct 2026 19:22:23 -0700 (PDT)
X-Received: from HP ([105.163.157.65])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1fcd2eff9sm19513185e9.4.2026.10.20.19.22.21
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 20 Oct 2026 19:22:23 -0700 (PDT)
X-Cc: christian.couder@gmail.com,
	siddharthasthana31@gmail.com,
	Tanga Joris <tangajoris@gmail.com>
X-Mailer: git-send-email 2.56.0.215.g47fdf2208c.dirty
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list