1 # po2test.sed - Convert Uniforum style .po file to C code for testing.
2 # Copyright (C) 2000,2003 Free Software Foundation, Inc.
3 # Ulrich Drepper <drepper@cygnus.com>, 2000.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # We copy the original message as a comment into the .msg file. But enclose
22 # them with INPUT ( ).
24 s/^msgid[ ]*"\(.*\)"/INPUT ("\1")/
25 # Clear flag from last substitution and jump if matching
29 # Copy the translations as well and enclose them with OUTPUT ( ).
31 s/^msgstr[ ]*"\(.*\)"/OUTPUT ("\1")/
32 # Clear flag from last substitution and jump if matching
38 # Append the next line.
40 # Check whether second part is a continuation line. If so, before printing
42 s/\(.*\)")\(\n\)"\(.*\)"/\1\\\2\3")/
45 # No, go to the top and process it. Note that `D' includes a jump to the start!!
47 # Yes, we found a continuation line.
49 # We cannot use the sed command `D' here
51 # Clear the substitution flag and do the next line.