summaryrefslogtreecommitdiffstats
path: root/po/insert-header.sin
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-06-09 11:13:33 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-06-09 12:26:49 -1000
commit8462702c0bfac6be3d33b17a7ff209be0fb9a7b5 (patch)
treed1640fae5292739cdfeaa43d70f68df50a0a16cf /po/insert-header.sin
parent7154dd486eaa991408903c6304abb6c349088e03 (diff)
downloadanaconda-8462702c0bfac6be3d33b17a7ff209be0fb9a7b5.tar.gz
anaconda-8462702c0bfac6be3d33b17a7ff209be0fb9a7b5.tar.xz
anaconda-8462702c0bfac6be3d33b17a7ff209be0fb9a7b5.zip
Convert po/ subdirectory to GNU gettext template system.
Maintaining po/ now means maintaining po/LINGUAS, po/POTFILES.in, and po/Makevars. The other files are automatically added by gettextize when we update to a newer minimum version of gettext. The LINGUAS file lists all of the languages we support. The POTFILES.in file lists all of the source files that have strings for translation. The Makevars file sets some control variables and options to xgettext.
Diffstat (limited to 'po/insert-header.sin')
-rw-r--r--po/insert-header.sin23
1 files changed, 23 insertions, 0 deletions
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 000000000..b26de01f6
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}