From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Tim Morley (forstreku la legoman koloron de mia retadreso)" Newsgroups: gmane.emacs.help Subject: PO-mode help, please Date: Mon, 21 Feb 2005 13:15:13 GMT Organization: ntl Cablemodem News Service Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108991752 23910 80.91.229.2 (21 Feb 2005 13:15:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2005 13:15:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 21 14:15:52 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D3DPT-0006hy-Jx for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Feb 2005 14:15:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D3DgQ-0003m9-7t for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Feb 2005 08:33:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!news.glorb.com!news.zanker.org!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!pe1.news.blueyonder.co.uk!blueyonder!news-out.ntli.net!newsrout1-gui.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe3-gui.ntli.net.POSTED!53ab2750!not-for-mail User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Original-Lines: 60 Original-NNTP-Posting-Host: 80.6.119.86 Original-X-Complaints-To: http://www.ntlworld.com/netreport Original-X-Trace: newsfe3-gui.ntli.net 1108991713 80.6.119.86 (Mon, 21 Feb 2005 13:15:13 GMT) Original-NNTP-Posting-Date: Mon, 21 Feb 2005 13:15:13 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:128680 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24215 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24215 Hi all. I'm looking for some help in finding a solution to a problem involving some gettext po-mode files. Any suggestions much appreciated. Short description: I need to extract from a group of .po files every record (including all related comments) that contains a certain string within a comment. Long description: I have twenty-odd .po files for a certain project. Spread throughout these files there are various entries which are tagged, via a comment, as "technical vocabulary" that needs sending to a specialist for verification. I need to find and extract all of these cases from the collection of files, to send to the aforementioned specialists. Obviously, a standard gettext record looks like this: msgid "Absolute Record" msgstr "Absoluta Rikordo" [Whitespace before `msgid' and `msgstr' added by me for the purposes of this mail only.] I need to find each record that includes the comment below: # FAKVORTO: MATEMATIKA msgid "Absolute Value" msgstr "Absoluta Valoro" It may appear as one of several comments, in which case I need to copy over all of the comments: # Aux ALD (laux la franca AJT)? (Gian Piero SAVIO, 2004-04-02) # 'ALDONI' estas plej klara; 'ALD' iom malpli, do konservu la unuan. (Tim Morley, 2004-04-03) # FAKVORTO: MATEMATIKA msgid "ADD" msgstr "ALDONI" And the comments may not appear in any particular order: # Nur la franca uzas verban terminon, cxiuj aliaj uzas substantivan terminon. Atentu, "Combine" povus havi aritmetikan signifon, kies preciza traduko estas "Kombinacio" (mi intertempe kontrolis en PIV1). (Leo DC, 2004-08-13) # Vi pravas, ke estas cxiutaga kaj matematika sencoj por tiu vorto. Mi enmetos ambaux. (Tim Morley, 2004-09-23) # FAKVORTO: MATEMATIKA # PLURSENCAJXO # Kombinajxo msgid "Combination" msgstr "Kunigado" If somebody could suggest either an EMACS keyboard macro, or possibly a SED or AWK script, that would spit out a text file containing all of the above records from my collection of files, it would be a great help to me. Thanks in advance for any help offered. Regards, Tim Morley [remove `rapkolora' to make my email address valid]