From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Morley Newsgroups: gmane.emacs.help Subject: search/replace in gettext files Date: Sun, 22 Apr 2007 18:19:48 GMT Organization: ntl Cablemodem News Service Message-ID: <8HNWh.4956$mk4.4515@newsfe4-win.ntli.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1177267048 25257 80.91.229.12 (22 Apr 2007 18:37:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Apr 2007 18:37:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 22 20:37:26 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hfgw8-00086y-S0 for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Apr 2007 20:37:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hfh1R-0007UJ-Su for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Apr 2007 14:42:54 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!news-out.ntli.net!newsrout1-gui.ntli.net!ntli.net!news.highwinds-media.com!newspeer1-win.ntli.net!newsfe4-win.ntli.net.POSTED!53ab2750!not-for-mail User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 86.1.40.29 Original-X-Complaints-To: http://www.virginmedia.com/netreport Original-X-Trace: newsfe4-win.ntli.net 1177265988 86.1.40.29 (Sun, 22 Apr 2007 19:19:48 BST) Original-NNTP-Posting-Date: Sun, 22 Apr 2007 19:19:48 BST Original-Xref: shelby.stanford.edu gnu.emacs.help:147387 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 Xref: news.gmane.org gmane.emacs.help:42992 Archived-At: Hi. Not sure if this group is the ideal place for this question, but couldn't find a newsgroup dedicated to GNU gettext questions. Please do point me in the right direction if there's a better place. My question: I'd like to be able to do a global search and replace operation on the translations held in a tree of .po files. The original English strings mustn't be changed, so I need something that will parse the files, pick out the translated text, and perform the search/replace only on those elements. I'm aware of msgexec, and I attempted this: ~$ msgexec -i temp.po sed s/foo/bar/g but the result was just a list of the changed items sent to stdout, not the whole original file with the each 'foo' changed to 'bar' as I need. Any suggestions or advice gratefully received. Thanks in advance. Tim