Skip to content

Commit

Permalink
po-docs: Run po4a-translate and sed commands separately
Browse files Browse the repository at this point in the history
I noticed that 1-byte translated POD files were being generated in the
output directory (po-docs/ja/).  This seems to have happened because
po4a-translate was generating an error, but because we were
immediately pipeing the output into sed the error was suppressed.

By running them as two separate commands this cannot happen.

Fixes: commit bd896d6
  • Loading branch information
rwmjones committed Apr 4, 2024
1 parent d829778 commit d755070
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion po-docs/language.mk
Expand Up @@ -179,13 +179,16 @@ virt-p2v.1: virt-p2v.pod virt-p2v-kernel-config.pod
# Remove both.
# XXX Fix po4a so it doesn't do this.
%.pod: $(srcdir)/../$(LINGUA).po
rm -f $@ $@-t
$(guestfs_am_v_po4a_translate)$(PO4A_TRANSLATE) \
-f pod \
-M utf-8 -L utf-8 \
-k 0 \
-m $(top_srcdir)/$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \
-p $< \
| $(SED) '0,/^=encoding/d' > $@
-l $@-t
$(SED) '0,/^=encoding/d' < $@-t > $@
rm $@-t

# XXX Can automake do this properly?
install-data-hook:
Expand Down

0 comments on commit d755070

Please sign in to comment.