unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Morley <t_morley@argonet.co.uk>
To: help-gnu-emacs@gnu.org
Subject: search/replace in gettext files
Date: Sun, 22 Apr 2007 18:19:48 GMT	[thread overview]
Message-ID: <8HNWh.4956$mk4.4515@newsfe4-win.ntli.net> (raw)

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

                 reply	other threads:[~2007-04-22 18:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='8HNWh.4956$mk4.4515@newsfe4-win.ntli.net' \
    --to=t_morley@argonet.co.uk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).