On Thu, 2009-06-04 at 14:57 +1000, Asgeir Frimannsson wrote:
> On Thu, Jun 4, 2009 at 2:54 PM, Nguyen Vu Hung <vuhung16p...@gmail.com>wrote:
> 
> > On Thu, Jun 4, 2009 at 11:49 AM, Asgeir Frimannsson <asge...@gmail.com>
> > wrote:
> > > On Wed, Jun 3, 2009 at 3:21 PM, Christian Perrier <bubu...@debian.org>
> > >> msgcat --no-wrap foo.po | \
> > >>       sed '/msgstr \"/s/«/\"/g' | \
> > >>       sed '/msgstr \"/s/»/\"/g' | \
> > >>       msgcat >foo-fixed.po
> > >
> > > you could probably do this easier with msgfilter which only touches the
> > > translations in msgstr:
> > >
> > > msgfilter -i myfile.po sed -e 's/«/"/g' -e 's/»/"/g'
> > >
> > > Notice that these sed expressions works on the unescaped content in
> > msgstr,
> > > so you only replace it with " rather than \"
> > Ah, this is not good because it will make the po files syntax error.
> >
> 
> No, msgfilter will escape the " for you before it is written to the
> resulting PO file. Try it on a PO file ;) You can't produce an invalid PO
> file when using msgfilter.

Ah yes msgfilter forgot about her.

You'll still need to script something simple to traverse the files as
msgfilter works one file at a time.

Make sure you do this against version control so that you can see what
change it does make. I still prefer the pogrep way as it allows me to
review what's being done. Of course if its a 1000 strings then yeah
msgfilter is a friend.

-- 
Dwayne Bailey
Associate                                      +27 12 460 1095 (w)
Translate.org.za                               +27 83 443 7114 (c)

Recent blog posts:
* Google Translate + libtranslate + Virtaal = machine translation in 7 new 
languages
http://www.translate.org.za/blogs/dwayne/en/content/google-translate-libtranslate-virtaal-machine-translation-7-new-languages
* Fixes for Skype Video, Webcam on Fedora
* libtranslate, TM plugins and Virtaal

Stop Digital Apartheid! - http://www.digitalapartheid.com
Firefox web browser in Afrikaans - http://af.www.mozilla.com/af/
African Network for Localisation (ANLoc) - http://africanlocalisation.net/



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to