diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:03 +0000 |
commit | 932e4432596447eb9331cc2a2bb74a26a35b4efc (patch) | |
tree | 95161711ea07fd64f0c82d6e7943024c033dd5a8 /templates/generate-template.sh | |
parent | Adding debian version 4.22.0-1. (diff) | |
download | manpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.tar.xz manpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/generate-template.sh')
-rwxr-xr-x | templates/generate-template.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/generate-template.sh b/templates/generate-template.sh index 9c172ba5..13a50eb7 100755 --- a/templates/generate-template.sh +++ b/templates/generate-template.sh @@ -40,15 +40,16 @@ if [ -z "$upstream_manpage" ]; then exit 1 fi -# Necessary, size 0 file of mktemp fails for UTF-8 characters, see Debian bug #1022216 +# Necessary, size 0 file of mktemp fails for UTF-8 characters, see Debian bug #1022216 // should be fixed in po4a 0.72 tdir=$(mktemp -d) mkdir $tdir/$distribution # Remove / Uncomment some macros po4a cannot handle -# #1 / #2 Errors in some pages -# #3 / #4 The last two can be removed, if mkpasswd (Debian BTS #1036908) and gawk (fixed upstream) are fixed (or Debian #1036826) -# #5 Po4a sometimes has troubles parsing \c - This crude pattern gets around this, but adding additional spaces and sometimes moving arguments into main text, see Debian #1036826 -cat $upstream_manpage | sed "s/^.ft C$/^\".ft C$/" | sed "s/^.ft P$/^\".ft P$/" | sed "s/\\\\fb/\\fB/" | sed "s/^\.BI \(\\\\.*\)\"\\\\c$/.BI \1\"/" | sed "s/^\.BR \(\\\\.*\)\"\\\\c$/.BI \1\"/" | sed "s/\\\\c$//" > $tdir/$distribution/$manpage +# #1 / #2 / # 3 Errors in some pages +# Po4a sometimes has troubles parsing \c - pattern (4) handles credentials.7.po and mkpasswd.1.po.; pattern (5) and (6) handle mkosi.1.po (OpenSuSE tumbleweed), (7) handles gawk(1)/Debian and (8) handles afmtodit.1.po [ see Debian #1036826 ] +cat $upstream_manpage | sed "s/^.ft C$/^\".ft C$/" | sed "s/^.ft P$/^\".ft P$/" | sed "s/\\\\fb/\\fB/" | sed 's/\.BR \(.*\)\\c/.BR \1/' | sed 's/\.UE \\c/.UE /' | sed 's/^\\c$//'| sed 's/\.BI \(.*\)\\c/.BI \1/' | sed 's/\.RI \(.*\)\\c/.RI \1/' > $tdir/$distribution/$manpage +#cat $upstream_manpage | sed "s/^.ft C$/^\".ft C$/" | sed "s/^.ft P$/^\".ft P$/" | sed "s/\\\\fb/\\fB/" > $tdir/$distribution/$manpage +#cat $upstream_manpage | sed "s/^.ft C$/^\".ft C$/" | sed "s/^.ft P$/^\".ft P$/" | sed "s/\\\\fb/\\fB/" | sed "s/^\.BI \(\\\\.*\)\"\\\\c$/.BI \1\"/" | sed "s/^\.BR \(\\\\.*\)\"\\\\c$/.BI \1\"/" | sed "s/\\\\c$//" > $tdir/$distribution/$manpage #cat $upstream_manpage | sed "s/^.ft C$/^\".ft C$/" | sed "s/^.ft P$/^\".ft P$/" | sed "s/\\\\fb/\\fB/" | sed "s/^\.BI \(\\\\.*\)\"\\\\c$/.BI \1\"/" | sed "s/^\.BR \(\\\\.*\)\"\\\\c$/.BI \1\"/" | perl -p -e 's/\\c\n//' > $tdir/$distribution/$manpage po4a-updatepo -f man \ @@ -57,6 +58,7 @@ po4a-updatepo -f man \ --option generated \ --option untranslated="}1,Ds,zY,zZ,Ee,ES,dT,FN,NE,NS,EX,EE,Id,rstReportMargin,INDENT,UNINDENT,UN,a.RE,\|" \ --option unknown_macros=untranslated \ + --option inline="MR" \ --master "$tdir/$distribution/$manpage" -M utf-8 \ -p $tdir/tmp.pot |