From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-translators@postgresql.org
Subject: Re: branching time
Date: Fri, 26 Apr 2019 23:37:40 +0200
Message-ID: <94cfe030-61d0-4b01-2d3a-603e7c326bf1@2ndquadrant.com> (raw)
In-Reply-To: <20190426181403.GA10450@alvherre.pgsql>
References: <20190426181403.GA10450@alvherre.pgsql>
On 2019-04-26 20:14, Alvaro Herrera wrote:
> I think it's quite possible to do this with msgfilter ... but you need
> to read the 'info' documentation, not the 'man' documentation, because
> the latter is completely useless.
I tried one with this invocation:
msgfilter --no-wrap perl -e '$_ = do { local $/; <STDIN> }; s/^%s:
(.*)\n$/\1/;s/: %s\z/: %m/; print $_' < initdb.po > new.po
This gets the job done textually, but you will see errors from msgfmt
because the newlines of msgid and msgstr no longer match.
> I think we need to write a filter program that compares MSGFILTER_MSGID
> to MSGFILTER_PREV_MSGID, and if the only difference is the leading "%s: "
> and the trailing "\n", then strip those thing from stdin and write that
> to stdout.
I didn't do it that way, which explains the above problems. We can try
it a few more times. :)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-translators@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com
Subject: Re: branching time
In-Reply-To: <94cfe030-61d0-4b01-2d3a-603e7c326bf1@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox