nls: Update the man-po logic

Put the man-po pot file under version control like its po/*.pot sibling.

Makefile now auto-matically generates the list of man pages as they are
in a single directory. There were some missing!

pot file target is dependent on the untranslated man pages

When downloading from translation project, run po4a to sync the new
po files correctly.

Downloaded man po files from translation project and synched.

Thanks to @gorean for the info

References:
 procps-ng/procps#258

Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
Craig Small 2022-11-10 21:52:19 +11:00
parent c92da2adc5
commit 5ed8add969
11 changed files with 141475 additions and 46900 deletions

1
.gitignore vendored
View File

@ -30,7 +30,6 @@ libtool
ltmain.sh ltmain.sh
m4/ m4/
po-man/translated po-man/translated
po-man/*.pot
po-man/man.stamp po-man/man.stamp
po-man/??/* po-man/??/*
po-man/??_??/* po-man/??_??/*

View File

@ -411,3 +411,5 @@ get-trans:
echo "Getting the latest translations from translationproject.org..." echo "Getting the latest translations from translationproject.org..."
rsync -Lrtvz translationproject.org::tp/latest/procps-ng/ po rsync -Lrtvz translationproject.org::tp/latest/procps-ng/ po
rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man/ po-man rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man/ po-man
rm -f po-man/man.stamp
make -C po-man man.stamp

View File

@ -7,17 +7,7 @@
# make -C po-man man.stamp # make -C po-man man.stamp
# To update man page translations # To update man page translations
# Not sure why this needs to be repeated from the top-level Makefile but it does src_MANS = $(wildcard $(top_srcdir)/man/*.[1-9])
dist_man_MANS = \
../man/free.1 \
../man/pgrep.1 \
../man/pkill.1 \
../man/pmap.1 \
../man/uptime.1 \
../man/vmstat.8 \
../man/procps.3 \
../man/procps_pids.3 \
../man/procps_misc.3
translated_MANS = $(wildcard translated/*/*.[1-9]) translated_MANS = $(wildcard translated/*/*.[1-9])
translated_MAN_sections=$(subst .,,$(sort $(suffix $(translated_MANS)))) translated_MAN_sections=$(subst .,,$(sort $(suffix $(translated_MANS))))
@ -62,10 +52,10 @@ clean-local-yes:
.PHONY: update-po .PHONY: update-po
procps-man.pot: procps-man.pot: $(src_MANS)
# parafiles = $(patsubst %,-m%,$(subst :, ,$(dist_man_MANS))) # parafiles = $(patsubst %,-m%,$(subst :, ,$(src_MANS)))
# parafiles = $(dist_man_MANS:doc=Ente) # parafiles = $(src_MANS:doc=Ente)
po4a-gettextize -M utf8 --option groff_code=verbatim --option generated --option untranslated="a.RE,\|" --option unknown_macros=untranslated -f man $(patsubst %,-m%,$(subst :, ,$(dist_man_MANS))) -p $@ po4a-gettextize -M utf8 --option groff_code=verbatim --option generated --option untranslated="a.RE,\|" --option unknown_macros=untranslated -f man $(patsubst %,-m%,$(subst :, ,$(src_MANS))) -p $@
update-po: update-po:
$(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po4a.cfg $(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po4a.cfg
@ -74,7 +64,7 @@ update-po:
install-data-local: install-data-local:
for lang in $(LINGUAS) ; do \ for lang in $(LINGUAS) ; do \
files=""; \ files=""; \
for trans in $(notdir $(dist_man_MANS)); do \ for trans in $(notdir $(src_MANS)); do \
if [ -f $(CURDIR)/$$lang/$$trans ]; then \ if [ -f $(CURDIR)/$$lang/$$trans ]; then \
files="$$files $(CURDIR)/$$lang/$$trans"; \ files="$$files $(CURDIR)/$$lang/$$trans"; \
elif [ -f $(srcdir)/$$lang/$$trans ]; then \ elif [ -f $(srcdir)/$$lang/$$trans ]; then \
@ -84,13 +74,13 @@ install-data-local:
$(MAKE) -C .. install-man \ $(MAKE) -C .. install-man \
mandir="$(mandir)/$$lang" \ mandir="$(mandir)/$$lang" \
man_MANS="" \ man_MANS="" \
dist_man_MANS="$$files"; \ src_MANS="$$files"; \
done done
uninstall-local: uninstall-local:
for lang in $(LINGUAS); do \ for lang in $(LINGUAS); do \
files=""; \ files=""; \
for trans in $(notdir $(dist_man_MANS)); do \ for trans in $(notdir $(src_MANS)); do \
if [ -f $(CURDIR)/$$lang/$$trans ]; then \ if [ -f $(CURDIR)/$$lang/$$trans ]; then \
files="$$files $(CURDIR)/$$lang/$$trans"; \ files="$$files $(CURDIR)/$$lang/$$trans"; \
elif [ -f $(srcdir)/$$lang/$$trans ]; then \ elif [ -f $(srcdir)/$$lang/$$trans ]; then \
@ -100,7 +90,7 @@ uninstall-local:
$(MAKE) -C .. uninstall-man \ $(MAKE) -C .. uninstall-man \
mandir="$(mandir)/$$lang" \ mandir="$(mandir)/$$lang" \
man_MANS="" \ man_MANS="" \
dist_man_MANS="$$files"; \ src_MANS="$$files"; \
done done
dist-hook: man.stamp dist-hook: man.stamp

25401
po-man/de.po

File diff suppressed because it is too large Load Diff

32167
po-man/fr.po

File diff suppressed because it is too large Load Diff

13887
po-man/pl.po

File diff suppressed because it is too large Load Diff

19321
po-man/procps-man.pot Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

26516
po-man/sv.po

File diff suppressed because it is too large Load Diff

28739
po-man/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff