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 1wOqVb-000ETT-39 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2026 05:27:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wOqVX-001BLY-2g for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2026 05:27:16 +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 1wOqVX-001BLQ-1X for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2026 05:27:16 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wOqVR-000000007e7-1i7q for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2026 05:27:15 +0000 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-50fc496c8baso27209131cf.3 for ; Sun, 17 May 2026 22:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779082029; cv=none; d=google.com; s=arc-20240605; b=HBLDPVAu1yqygbwPCipZZlAiGjHvL6UBS4x84X/spIxgiPgoEtdMhHELWiX1VwP1oA 3LL6/rALR9NoOSrI1yEh7Mm3kTM8RvRW7LN/GEUoiHal6tcg/b6AASlDk/lw1zl0zY99 Kq5hQDrlcX4rEwGY5rqoMdYhG0NCiPXR9snCVO9axAV90cw6dyzPaoyWMUlCm9Uc9D1z Vasy3KpEF3MSutNXS7q0kkU8S+KmxOyFdxHUlIpOfWQfWnYNoo5THrvJwKcfZMxl7W0E pKAYV2AfJuWR6kRJMfjbk+P7WZND/CzQK4IrJ3GohKJerUw+OLBHnyTvbeEIsnXYqrHo kQkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EK96DpQV10ONAn8uzn4M/wxrJxM67/Z/DavZ4fG7erE=; fh=tvS4T4+oR2J2hxK5aNJGfORVVBBvqUJPnvm76ijROZw=; b=SzrQIeclDFAh/m0sxQWn/fTR4irQuhROPrCah1KjVHZhxvS9057bLGgOHJYRD9E8ye fVWQls4W24/56MGAeFddyhO51R4d9VUu1HFtDS35NxolcAd8VgensUeSuWXArbkJ8MJt VPji2i8SK96Iqv5JKaX5IQSlWrH3zt8kEuqQN9Nj2k3f3O0+pUYkFtdnkrIQ88O2yg/G 9Ir4k3DqQJgVH8yINscp4JdDmnGPZrjCjpXP/ibW2DfozI64OP2y+t66LqTsAJz6IGwu V5GAxSQgAXUo29nvTfASIedQhTdDXgMLguVfihvkE3gb2MB0pJRQVpcwgTsh3wCL9lea 8QTg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779082029; x=1779686829; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EK96DpQV10ONAn8uzn4M/wxrJxM67/Z/DavZ4fG7erE=; b=daOYJLoK8nK3oWo9RuoTFl7pemjAUU/7oCeNKPynGLSs8ADsD2qQruI/SnRNq71b4p 2Ff/1Ss8feu0N9qvmW5ZLn6Ji3J22ZdtRYe7luhcTmVfd35u1z4rjynXLQAufJd20kud mjvZF/8qskRe99Ow7hdqaWABPXPOBopy0Ra5va3GOkVfNh6Y0XT4M3uHibwePMZjhJSW s1nO/YNVunEvefvxdichqV7uQnMev6AxzGHN5bR+cKuJ55X1FvtiPaH/YaUR2qIV5FpQ KNTfPvZc+tePvWuwH8ququXPAs9kqp0PdU5bKCqQBHCNX8FFmlKu27taJabeqsgxTjZU mKPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779082029; x=1779686829; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EK96DpQV10ONAn8uzn4M/wxrJxM67/Z/DavZ4fG7erE=; b=p2JusrDUsAhqepMSfZ58SRnvm5g28TPpkQ1qTnV/pEMSvw9s0wy7hb98FUufhvw0xA UDthBwk89Ck1c9kd4F9IwPoDvDtSR2vG8DG+VX3FXTfpxgtGS+7FHeA7uDJutkIlEEsM D3EZv6A8Jn7ObDjYz9rxqR6Sf471O3uysW0vdsork0gdCYEeY0AP/fx0GeoafOKtcv6c LS9LHu28a0KZfzRySDMjfff7nS4OlKZ2a9HlwmESusa/sfnVb3AbZHF3uBHhwPj2Nv8F MUlgU1UP0OQm4i/J9ouqXxSIOTQoYYoDnQ03yNkfxmz6hHJ1sj3av8ksXf22GnfzA4iM StbQ== X-Gm-Message-State: AOJu0Yzx0iIk5j9ZERY/ZC2k+9yrq+gMhe9QFkIb8lkqOgZxXBBhSgYT m59dbdRQn//BPnzpswcKI7yILZOXZD9cNSPhv72WRh3D+LO0ZexCFFNePG6bWxg9UnvRHE8uZkX eriBZ5QRIqMvKoC3sQWiqx1IDoYJItgs= X-Gm-Gg: Acq92OGNHVHlA9JTpGiaTh6ZnlWZaonNF4tdHBn3uDwYVkE+4xIJ/jY6YOzPZPa0Wst MZWkBIOENTDo5zh+/FktTW/UIzKw62YzPfFjZoLVW5UNZXaEG1+k7ETsArjaNHIrAtC1XXoVz2d +13RN100TUXpfFhEQlPQ4t2jiG9D0bAoT7YF215c7ZAanmKHGJfDNGYmpKt/DS6LPvysTk6QG1D oOgzTrbluINUgGx5Al5uBSx6rESBuDZiZjxU2AovIKj4RNG2a4RkbRtV+da3b9fGOLPNW9im6NS KOoB/mI= X-Received: by 2002:a05:622a:598e:b0:50d:e298:8f1c with SMTP id d75a77b69052e-5165a0cc9f5mr182990171cf.32.1779082029215; Sun, 17 May 2026 22:27:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 18 May 2026 15:26:41 +1000 X-Gm-Features: AVHnY4LOMIH-9QxurzrPJF168ZXqnoM8LU4eD62rbSnMEnrYUaz9FoUs3Jk4A0Y Message-ID: Subject: Re: Redundant/mis-use of _(x) gettext macro? To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 28, 2026 at 11:57=E2=80=AFAM Peter Smith wrote: > > On Fri, Apr 24, 2026 at 10:14=E2=80=AFPM =C3=81lvaro Herrera wrote: > > > > 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. > > > > Personally, I prefer `first` logic because > a) The length of the list is not required up-front > b) At each iteration, the built string makes sense instead of always > having a dangling ',' until the final iteration > > But it is not a big deal. This thread is about the translation part, > so whatever way makes the most sense for translators is fine with me. > This thread has been inactive for about 5 weeks. AFAIK, everybody was happy with the patch, and we were only debating if the translated format string should have a leading comma or a trailing comma. Either way is OK with me -- whatever way you think makes the most sense to a translator. What can I do to help the patch proceed to get pushed? =3D=3D=3D=3D=3D=3D Kind Regards, Peter Smith. Fujitsu Australia