[Libguestfs] [PATCH] po-docs: turn language list into LINGUAS file

Pino Toscano ptoscano at redhat.com
Thu Aug 13 10:20:01 UTC 2020


Use a LINGUAS file with the list of available translations instead of
defining them in a make variable. This way Weblate will be able to
update the list using an available addon, and we do not need to list
those not built.

Accordingly, rename the variable with built languages to
'linguas_translated'.

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
 po-docs/LINGUAS     | 12 ++++++++++++
 po-docs/Makefile.am | 12 +++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)
 create mode 100644 po-docs/LINGUAS

diff --git a/po-docs/LINGUAS b/po-docs/LINGUAS
new file mode 100644
index 000000000..85b7927a3
--- /dev/null
+++ b/po-docs/LINGUAS
@@ -0,0 +1,12 @@
+cs
+de
+en_GB
+es
+eu
+fr
+ja
+nl
+pt_BR
+tg
+uk
+zh_CN
diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am
index 028fbbcea..ed21cb152 100644
--- a/po-docs/Makefile.am
+++ b/po-docs/Makefile.am
@@ -21,25 +21,23 @@ include $(top_srcdir)/subdir-rules.mk
 # into the po/ directory and the translations into the usual
 # libguestfs.pot file.
 
-# Languages that we translate.
+# Languages.
 # Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464).
-linguas = ja uk
+linguas     := $(shell cat $(srcdir)/LINGUAS)
 
-# Languages that we have PO files for, but we don't translate
-# because there is insufficient coverage.
-linguas_not_translated = cs de en_GB es eu fr nl pt_BR tg zh_CN
+# Languages that we translate, as they have enough coverage.
+linguas_translated = ja uk
 
 EXTRA_DIST = \
 	libguestfs-docs.pot \
 	$(linguas:%=%.po) \
-	$(linguas_not_translated:%=%.po) \
 	podfiles
 
 # Build the final man pages from the translated POD files.  Each
 # language directory contains a Makefile.am that we need to keep up to
 # date (note each $lang/Makefile.am should be identical).
 # XXX Is there a better way?
-SUBDIRS = $(linguas)
+SUBDIRS = $(linguas_translated)
 
 libguestfs-docs.pot:
 	cd $(top_srcdir) && $(PO4A_GETTEXTIZE) \
-- 
2.26.2




More information about the Libguestfs mailing list