Re: branching time

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-translators(at)postgresql(dot)org
Subject: Re: branching time
Date: 2019-04-26 21:37:40
Message-ID: 94cfe030-61d0-4b01-2d3a-603e7c326bf1@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-translators

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

In response to

Responses

Browse pgsql-translators by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-28 17:37:33 Re: branching time
Previous Message Alvaro Herrera 2019-04-26 18:14:03 Re: branching time