path: root/po/insert-header.sin
diff options
authorChristian Grothoff <>2021-04-05 20:11:45 +0200
committerChristian Grothoff <>2021-04-05 20:11:45 +0200
commita1705fe4211340e380d50f48c177ca2d66bf7b8b (patch)
treeaf2f426d8290327e52a5992935d6c22160be2a25 /po/insert-header.sin
parentda15a59717fcf824569cbd647641c572405eb678 (diff)
add gettext support
Diffstat (limited to 'po/insert-header.sin')
1 files changed, 23 insertions, 0 deletions
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 00000000..b26de01f
--- /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 /{
+# Test if the hold space is empty.
+# Yes it was empty. First occurrence. Read the file.
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+# The hold space was nonempty. Following occurrences. Do nothing.