]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Translations: Add the man page translators into man page header comment.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 13 Feb 2024 11:07:33 +0000 (13:07 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 14 Feb 2024 16:31:16 +0000 (18:31 +0200)
It looked odd to only have the original English authors listed
in the header comments of the translated files.

po4a/.gitignore
po4a/po4a.conf
po4a/update-po

index 5bcfa04bf76799c00633fc362e48aa9dc8d70006..735f9fd150d669bcfad803c10e44039471a29f25 100644 (file)
@@ -1,2 +1,3 @@
 /man
 /xz-man.pot
+/*.po.authors
index 84c688c40c1ec8236164cfc01361ad0a1254fb22..b3eea576fc21126594d2556df5969167e5505c76 100644 (file)
@@ -7,10 +7,10 @@
 [po4a_langs] de fr ko pt_BR ro uk
 [po4a_paths] xz-man.pot $lang:$lang.po
 
-[type: man] ../src/xz/xz.1              $lang:man/$lang/xz.1
-[type: man] ../src/xzdec/xzdec.1        $lang:man/$lang/xzdec.1
-[type: man] ../src/lzmainfo/lzmainfo.1  $lang:man/$lang/lzmainfo.1
-[type: man] ../src/scripts/xzdiff.1     $lang:man/$lang/xzdiff.1
-[type: man] ../src/scripts/xzgrep.1     $lang:man/$lang/xzgrep.1
-[type: man] ../src/scripts/xzless.1     $lang:man/$lang/xzless.1
-[type: man] ../src/scripts/xzmore.1     $lang:man/$lang/xzmore.1
+[type: man] ../src/xz/xz.1              $lang:man/$lang/xz.1        add_$lang:?$lang.po.authors
+[type: man] ../src/xzdec/xzdec.1        $lang:man/$lang/xzdec.1     add_$lang:?$lang.po.authors
+[type: man] ../src/lzmainfo/lzmainfo.1  $lang:man/$lang/lzmainfo.1  add_$lang:?$lang.po.authors
+[type: man] ../src/scripts/xzdiff.1     $lang:man/$lang/xzdiff.1    add_$lang:?$lang.po.authors
+[type: man] ../src/scripts/xzgrep.1     $lang:man/$lang/xzgrep.1    add_$lang:?$lang.po.authors
+[type: man] ../src/scripts/xzless.1     $lang:man/$lang/xzless.1    add_$lang:?$lang.po.authors
+[type: man] ../src/scripts/xzmore.1     $lang:man/$lang/xzmore.1    add_$lang:?$lang.po.authors
index 244951ec12605a9000b093423cb7e1d519e987e7..2104503f24dab4ecfa6238e296a4929fe990c615 100755 (executable)
@@ -31,6 +31,24 @@ fi
 
 PACKAGE_VERSION=`cd .. && sh build-aux/version.sh` || exit 1
 
+# Put the author info from the .po files into the header comment of
+# the generated man pages.
+for FILE in *.po
+do
+       printf '%s\n.\\"\n' \
+'PO4A-HEADER: position=^\.\\" Author; mode=after; beginboundary=^\.\\"$' \
+               > "$FILE.authors"
+       sed '
+               /^[^#]/,$d
+               /: 0BSD$/d
+               /BSD Zero Clause License/d
+               /distributed under the same license/d
+               /in the public domain/d
+               /^#$/d
+               s/^#/.\\"/
+               ' "$FILE" >> "$FILE.authors"
+done
+
 # Using --force to get up-to-date version numbers in the output files
 # when nothing else has changed. This makes it slower but it's fine
 # as long as this isn't run every time when "make" is run at the