Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3kSC-0003J4-En for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Nov 2016 13:59:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c3kSC-0008QG-1L for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Nov 2016 13:59:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c3kQn-0006oF-Ku for pgsql-hackers@postgresql.org; Mon, 07 Nov 2016 13:57:49 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c3kQl-0005ap-6s for pgsql-hackers@postgresql.org; Mon, 07 Nov 2016 13:57:48 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id CBBB6206AD; Mon, 7 Nov 2016 08:57:45 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 07 Nov 2016 08:57:45 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=VccTZz1R4pUymoi/Sl24Sib0AVw=; b=ICbcc0EzIPMrJmyt70sy H1GipWancNWXeSBa3OWI6sappgC+CQYKt3+t9Fjv1HJ5bxbKomOD6Svk8O2Pb5dP 6B+VgreMvaGCi+FQcQZ4RyI8kOSQ8qQRozpWQT8BWNzRn0MYWLla3J+fTl44m+FI vLoC/n5nnswXb2DiOlKL+zU= X-ME-Sender: X-Sasl-enc: Basywp1zQB+7LBF+ZY32mzWP6wO02uZAOAsftu+se21S 1478527064 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 61D8ECC0C0; Mon, 7 Nov 2016 08:57:44 -0500 (EST) Subject: Re: add more NLS to bin To: Michael Paquier References: Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com> Date: Mon, 7 Nov 2016 08:57:43 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 11/5/16 8:03 AM, Michael Paquier wrote: >> > Yeah that was wrong anyway. The previously existing translation markers >> > were wrong. We want to translate the fmt, not the formatted message. > Does using one way or the other actually change something? Because > pg_rewind/logging.c is not marking fmt but the message, the opposite > of your v2 patch. One way or the other, having consistency for both > would be nice. Consider the following for example: pg_log(PG_DEBUG, "fetched file \"%s\", length %d\n", filename, len); If you pass fmt to gettext(), then it will look up the string that you see in the code. If you pass the formatted message to gettext(), then it will look up something like "fetched file \"foo\", length 12\n" which it will not find, unless you provide translations for all combinations of file names and lengths. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers