[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PO-mode help, please

From: Tim Morley (forstreku la legoman koloron de mia retadreso)
Subject: PO-mode help, please
Date: Mon, 21 Feb 2005 13:15:13 GMT
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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:
   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)
   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)
   # 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.


Tim Morley
[remove `rapkolora' to make my email address valid]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]