Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGFQc-00621z-28 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 12:14:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGFQb-006K78-06 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 12:14:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGFQa-006K6z-1U for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 12:14:36 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wGFQY-00000002ZaG-0j8j for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 12:14:35 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 445A71D0022B; Fri, 24 Apr 2026 08:14:33 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 24 Apr 2026 08:14:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1777032873; x= 1777119273; bh=q80iDfCq/0gjnvV1AVBs1Lm0dXd1Lr8az7Wum9XP3Vg=; b=c mGcou7xzybbxA/AUwakuSAojJW0ogNXUgaf1GB8btYEOtuSCHJFcJvFipLgyQH9Y 5HZOH5D38O428XNtD60x8n4RJ0dVkYXhMtNuI9oIK0KUiO8jD6T072CEVijfHmzO 7565mNwGW91Q2TWKhFeRX0jqDTvDqLt+a17bTprv4tWmtgbRByoslEn6dPDse+TO NEJXmZVMczJxhSBOl4fb4XdnktmvUX9ft/UdmglHjFE0G1Dz4caS3qgQ98bkeV/f nXjDy/5YdcbxngrD746x81k4psc/A5rPtQ/7A+xKHsl4HlHHkfQ5Jji1r+ByL1ny LZ5/7FZX40RQrQ2nvoMZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1777032873; x=1777119273; bh=q 80iDfCq/0gjnvV1AVBs1Lm0dXd1Lr8az7Wum9XP3Vg=; b=E5XoGTvTLiW0Th/nW 9/GcNCDnSOC6lcEWkmVk9w8El0Db+Lf3M65hca4FXmE1sjEEWBBU8dmFoD/LduI+ QNFiQI8vUzQ9pY5kGWay5W6Fw/Impt3aal6SqzqoQJCCH+MLIn+H6m12ZZOkGSRd o8aZ/EG8zAiAwdvGCrbSjgsSSIKeqXhzc+ujv+uGF7gJumyqLxZilHA0Dbm2LdnT WUwOeZZOglHu5qJGajNJWbtWDUtD8ep5zB/MoX2gpwmYXzp3YsW91z5FkwOMDNR7 RZe4jn40VY+Lcmt0bWTGrrRcdZV0pTQJUWP/2wOJiWpqKaI6925CfOf43n41B7Rn R5VSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdejtddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgeqnecuggftrf grthhtvghrnhepteeuvdehffekvefgueehveetveekgfegtddtueefueehuddutdfhfeff hfejfeffnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvges khhurhhilhgvmhhurdguvgdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepshhmihhthhhpsgdvvdehtdesghhmrghilhdrtghomhdprhgtphht thhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Apr 2026 08:14:32 -0400 (EDT) Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 16C88B0323B; Fri, 24 Apr 2026 14:14:30 +0200 (CEST) Date: Fri, 24 Apr 2026 14:14:30 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Peter Smith Cc: PostgreSQL Hackers Subject: Re: Redundant/mis-use of _(x) gettext macro? Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Apr-24, Peter Smith wrote: > OK. Including the comma within a larger translated string seems like a > better idea. > > Since you now have the list `length`, I wondered why not simplify > further to use list_nth indexing? Then you can remove > `foreach_current_index` and `lc`. WFM. > Also, why did you choose to implement `last` versus `first` logic? > e.g. How about this? > { > if (first) > appendStringInfo(dest, _("\"%s\""), pubname); > else > appendStringInfo(dest, _(", \"%s\""), pubname); > } I don't know, it just seemed more natural. The whole ", foo" style simply feels weird to me. It seems a matter of choice only though, so if you feel strongly about this, I'm not opposed. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Hay dos momentos en la vida de un hombre en los que no debería especular: cuando puede permitírselo y cuando no puede" (Mark Twain)