Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLPwa-0004DP-MH for pgsql-translators@arkaria.postgresql.org; Mon, 26 Dec 2016 07:43:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cLPwa-0003qU-9S for pgsql-translators@arkaria.postgresql.org; Mon, 26 Dec 2016 07:43:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cLPwa-0003qO-2V for pgsql-translators@postgresql.org; Mon, 26 Dec 2016 07:43:40 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cLPwX-00070R-2t for pgsql-translators@postgresql.org; Mon, 26 Dec 2016 07:43:39 +0000 Received: by mail-lf0-x241.google.com with SMTP id d16so12423530lfb.1 for ; Sun, 25 Dec 2016 23:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=M11O9zwr9Ebc0h0E2ZOaTQr5Zs7REMR02sZSR3elsto=; b=euB4Yeo6bIG0lHxWauMRR2Xoblrx38sKT+TvnnmvL71J+DoygwvDSiHW+7f609MHEX Xzyh/e/KC531J44lJOqyCZQoF1zZmMmmR6ohVOZVafudgn2R627OIxC/49bfxn9VHmYM 0S4tra/b1b0h3JYkoFJ83VYlJFQzjj9R0WY9qbw6Rx4g7q/ovDnxJKqKmHeJU117SLS6 2t+LmPD6YuNtKK1jAcUCSdY6uWTN9xzG9jqB5YEvZXWlmwhk/LRlPdH0vpiU8ndbt34c 0WsbfzHu9Ofq2dhduG3NwVZ1iRswuuA2KWY7lav+Y22XYFmqgqHeb7QDiufmVk2SLcQS 5nhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=M11O9zwr9Ebc0h0E2ZOaTQr5Zs7REMR02sZSR3elsto=; b=jrUvCfj+9V57EJHMy03nF70R7xhoVBRR8B+bwAYvTy0HGUmXJb0K21YfOETYskQdf8 w7kTkiFVS1u0OSCqvjXhqj5c/s+NlGgxFbBQqgAA0j5vk1eAt0DFZSjMaSRkPqiCu5ug NFWryZjNXA+pWjBzxvsf1kmNxL8Vi+6qoa9nLlR9qa3OJg7hcJbOLkuwjwYak+FvLQEx WNY1aAvJptlRNml+xO6pVtcO9oEzkoDyHwmg1lKAxU8jW9TIkhe7CyalFIdY8oUdFCSb 4pcyyJnY65GHnCMLZH3t6EfqAjaGJRKKyU5cCu/CzRhAIVRAmZL80Eni4jvY5ljFxhyM SNuQ== X-Gm-Message-State: AIkVDXKXgcQb78fZfq5blHF4lGvzLSEuXn4pKHooXrx820qFNsND3tWGhmeMud4qYnwckQ== X-Received: by 10.46.72.17 with SMTP id v17mr9940812lja.5.1482738216191; Sun, 25 Dec 2016 23:43:36 -0800 (PST) Received: from [1.0.0.7] ([109.196.196.23]) by smtp.gmail.com with ESMTPSA id n124sm8575130lfn.5.2016.12.25.23.43.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Dec 2016 23:43:35 -0800 (PST) Subject: Re: Some localizable files are absent on https://babel.postgresql.org/ To: Peter Eisentraut , pgsql-translators@postgresql.org References: <95cf0a86-c8ab-e4d2-d13a-6e8d464235a7@gmail.com> From: Alexander Law Message-ID: <06d891a6-e655-45ae-6955-219cf22ef099@gmail.com> Date: Mon, 26 Dec 2016 10:43:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------9D2FD5FAD392C5C4E3DF390D" X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-translators Precedence: bulk Sender: pgsql-translators-owner@postgresql.org This is a multi-part message in MIME format. --------------9D2FD5FAD392C5C4E3DF390D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello Peter, It would be nice, I could translate these files to Russian before February. Btw, what is your opinion regarding contrib localizations? I found that with minor modifications we can get some extensions localizeable. For example, see attached patch for file_fdfw. Having the patch applied I can do `make update-po -C contrib` and get contrib/file_fdw/po/*.pot , *.po for translation. And postgres uses my translation when I compile translated messages and place it in the LC_MESSAGES directory. So I see no technical issues with translating contrib modules. Maybe they should be maintained on https://babel.postgresql.org/ too? Best regards, Alexander 23.12.2016 18:06, Peter Eisentraut wrote: > On 12/21/16 3:12 AM, Alexander Law wrote: >> Please consider adding to https://babel.postgresql.org/ the following >> .pot files for translation: >> /src/bin/pg_test_timing/po/pg_test_timing.pot// >> //src/bin/pg_upgrade/po/pg_upgrade.pot// >> //src/bin/pg_xlogdump/po/pg_xlogdump.pot// >> //src/bin/pg_archivecleanup/po/pg_archivecleanup.pot// >> //src/bin/pg_test_fsync/po/pg_test_fsync.pot/ > We haven't branched that repository between 9.6 and 10 yet. > > We could do that now, if there is interest in getting started on the > above. Or otherwise we could do it after the minor releases in February. > --------------9D2FD5FAD392C5C4E3DF390D Content-Type: text/x-patch; name="file_fdw.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file_fdw.patch" diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index d325f53..ffed8d4 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -36,6 +36,12 @@ #include "utils/rel.h" #include "utils/sampling.h" +/* define our text domain for translations */ +#undef TEXTDOMAIN +#define TEXTDOMAIN PG_TEXTDOMAIN("file_fdw") + +extern void _PG_init(void); + PG_MODULE_MAGIC; /* @@ -162,6 +168,18 @@ static int file_acquire_sample_rows(Relation onerel, int elevel, /* + * _PG_init() - library load-time initialization + * + * DO NOT make this static nor change its name! + * + */ +void +_PG_init(void) +{ + pg_bindtextdomain(TEXTDOMAIN); +} + +/* * Foreign-data wrapper handler function: return a struct with pointers * to my callback routines. */ diff --git a/contrib/file_fdw/nls.mk b/contrib/file_fdw/nls.mk new file mode 100644 index 0000000..0b938df --- /dev/null +++ b/contrib/file_fdw/nls.mk @@ -0,0 +1,6 @@ +# contrib/file_fdw/nls.mk +CATALOG_NAME = file_fdw +AVAIL_LANGUAGES = +GETTEXT_FILES = file_fdw.c +GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) +GETTEXT_FLAGS = $(BACKEND_COMMON_GETTEXT_FLAGS) --------------9D2FD5FAD392C5C4E3DF390D Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-translators mailing list (pgsql-translators@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-translators --------------9D2FD5FAD392C5C4E3DF390D--