We are migrating to Weblate (the Fedora instance, in particular) for translations instead of Zanata. Adapt our tooling a bit to the different workflow: - Weblate takes care of updating the po files whenever a new translation catalog is available, so stop doing that on our own: this meant also tweaking the po4a usage for POD documentations, resulting in simpler rules (IMHO) - ensure that the references to sources files in translation catalogs are relative to the top-level directory, so Weblate (and users too, actually) can properly locate the sources - extract also C sources - regenerate the catalogs - drop references to Zanata - update the translations to do edits before handing them over to Weblate - remove empty translations (v2v is translated less than libguestfs) Pino Toscano (14): po: turn language list into LINGUAS file po-docs: turn language list into LINGUAS file po: remove rules for pot/po update podfiles: add missing documentation po-docs: add missing dependencies for virt-v2v.1 po-docs: split pot and po handling po: fix references to OCaml sources po-docs: fix references to sources Remove references to Zanata po: extract again messages from C sources po/po-docs: update catalog templates po: update translations from catalog templates po: remove empty translations po-docs: update translations from catalog templates .gitignore | 1 - Makefile.am | 18 +- m4/guestfs-progs.m4 | 5 +- po-docs/LINGUAS | 12 + po-docs/Makefile.am | 62 +- po-docs/cs.po | 3960 +- po-docs/de.po | 9299 +-- po-docs/en_GB.po | 62274 +------------------ po-docs/es.po | 5760 +- po-docs/eu.po | 3993 +- po-docs/fr.po | 30007 +--------- po-docs/ja.po | 37459 +----------- po-docs/language.mk | 31 +- po-docs/nl.po | 3815 +- po-docs/podfiles | 31 +- po-docs/pt_BR.po | 3790 +- po-docs/tg.po | 4009 +- po-docs/uk.po | 111660 +---------------------------------- po-docs/virt-v2v-docs.pot | 3783 +- po-docs/zh_CN.po | 3939 +- po/LINGUAS | 15 + po/Makefile.am | 32 +- po/POTFILES | 24 + po/cs.po | 1294 +- po/de.po | 2003 +- po/en_GB.po | 2684 - po/es.po | 2911 +- po/eu.po | 2541 - po/fr.po | 3562 +- po/gu.po | 2096 +- po/hi.po | 1944 +- po/ja.po | 3746 +- po/kn.po | 1928 +- po/ml.po | 1910 +- po/mr.po | 2602 +- po/nl.po | 3279 +- po/or.po | 1911 +- po/pa.po | 2610 +- po/pl.po | 3101 +- po/ru.po | 2541 - po/ta.po | 3292 -- po/te.po | 3288 -- po/tg.po | 2529 - po/uk.po | 6020 +- po/virt-v2v.pot | 2014 +- po/zh_CN.po | 2581 - subdir-rules.mk | 3 + zanata-pull.sh | 30 - zanata.xml | 7 - 49 files changed, 29826 insertions(+), 316580 deletions(-) create mode 100644 po-docs/LINGUAS create mode 100644 po/LINGUAS create mode 100644 po/POTFILES delete mode 100644 po/en_GB.po delete mode 100644 po/eu.po delete mode 100644 po/ru.po delete mode 100644 po/ta.po delete mode 100644 po/te.po delete mode 100644 po/tg.po delete mode 100644 po/zh_CN.po delete mode 100755 zanata-pull.sh delete mode 100644 zanata.xml -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 01/14] po: turn language list into LINGUAS file
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. --- po/LINGUAS | 22 ++++++++++++++++++++++ po/Makefile.am | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 po/LINGUAS diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 00000000..69604489 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,22 @@ +cs +de +en_GB +es +eu +fr +gu +hi +ja +kn +ml +mr +nl +or +pa +pl +ru +ta +te +tg +uk +zh_CN diff --git a/po/Makefile.am b/po/Makefile.am index bfef889c..b4c2d3ff 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -23,13 +23,14 @@ MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libgues # Languages. # Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464). -linguas := cs de en_GB es eu fr gu hi ja kn ml mr nl or pa pl ru ta te tg uk zh_CN +linguas := $(shell cat $(srcdir)/LINGUAS) POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-ml) POFILES := $(linguas:%=%.po) GMOFILES := $(linguas:%=%.gmo) EXTRA_DIST = \ + LINGUAS \ POTFILES-ml \ $(DOMAIN).pot \ $(POFILES) \ -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 02/14] po-docs: turn language list into LINGUAS file
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'. --- po-docs/LINGUAS | 12 ++++++++++++ po-docs/Makefile.am | 15 +++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 po-docs/LINGUAS diff --git a/po-docs/LINGUAS b/po-docs/LINGUAS new file mode 100644 index 00000000..85b7927a --- /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 6ef0e233..0660eba0 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -21,18 +21,17 @@ 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 = \ + LINGUAS \ virt-v2v-docs.pot \ $(linguas:%=%.po) \ - $(linguas_not_translated:%=%.po) \ podfiles CLEANFILES += po4a.conf @@ -41,7 +40,7 @@ CLEANFILES += po4a.conf # 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) update-po: virt-v2v-docs.pot @@ -61,7 +60,7 @@ virt-v2v-docs.pot: po4a.conf --msgid-bugs-address libguestfs@redhat.com \ --copyright-holder "Red Hat Inc." \ po4a.conf - for f in `cd $(srcdir); find $(linguas) -name '*.pod'`; do \ + for f in `cd $(srcdir); find $(linguas_translated) -name '*.pod'`; do \ $(SED) '0,/^=encoding/d' < $$f > $$f.new; \ mv $$f.new $$f; \ done -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 03/14] po: remove rules for pot/po update
Weblate will handle the update of the po files from the translation catalog, so avoid stomping on its feet by doing the same. The translation catalog will be regenerated manually periodically. --- po/Makefile.am | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/po/Makefile.am b/po/Makefile.am index b4c2d3ff..790c5710 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -38,17 +38,6 @@ EXTRA_DIST = \ if HAVE_GNU_GETTEXT -dist-hook: - $(MAKE) update-po - cp *.po *.gmo $(distdir)/ - -update-po: - $(MAKE) $(DOMAIN).pot - $(MAKE) $(POFILES) - $(MAKE) update-gmo - -update-gmo: Makefile $(GMOFILES) - XGETTEXT_ARGS = \ --default-domain=$(DOMAIN) \ --from-code=utf-8 \ @@ -80,9 +69,6 @@ if HAVE_OCAML_GETTEXT endif mv $@-t $@ -%.po: $(DOMAIN).pot - cd $(srcdir) && $(MSGMERGE) -N --update $@ $(DOMAIN).pot - .po.gmo: rm -f $@ $@-t $(MSGFMT) -c -o $@-t $(srcdir)/$< @@ -102,9 +88,4 @@ install-data-hook: $(GMOFILES) .PRECIOUS: $(DOMAIN).pot $(POFILES) -else - -# If no GNU gettext, 'make update-po' is a dummy rule. -update-po: - endif -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 04/14] podfiles: add missing documentation
--- po-docs/podfiles | 1 + 1 file changed, 1 insertion(+) diff --git a/po-docs/podfiles b/po-docs/podfiles index 6a9ce650..a1063091 100644 --- a/po-docs/podfiles +++ b/po-docs/podfiles @@ -2,6 +2,7 @@ ../common/mlcustomize/customize-synopsis.pod ../common/options/blocksize-option.pod ../common/options/key-option.pod +../common/options/keys-from-stdin-option.pod ../docs/virt-v2v-copy-to-local.pod ../docs/virt-v2v-hacking.pod ../docs/virt-v2v-input-vmware.pod -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 05/14] po-docs: add missing dependencies for virt-v2v.1
The virt-v2v man page uses also additional POD snippets, so list them as dependencies to make sure they are up-to-date. This does not change the behaviour at the moment, however it will matter when each traslated POD file will be generated on its own. --- po-docs/language.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/po-docs/language.mk b/po-docs/language.mk index 26ba67ae..ab402c32 100644 --- a/po-docs/language.mk +++ b/po-docs/language.mk @@ -46,6 +46,8 @@ EXTRA_DIST = \ all-local: $(MANPAGES) +virt-v2v.1: key-option.pod keys-from-stdin-option.pod + %.1: %.pod $(PODWRAPPER) \ --no-strict-checks \ -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 06/14] po-docs: split pot and po handling
With the Weblate adoption, we let it update the po files from the catalog template. The po4a behaviour of extracting the template, merging the existing translations, and creating the translated PODs at once is problematic. Hence, split the extraction and the translated POD generation in two. Use po4a-gettextize to extract the catalog template only, not doing it anymore automatically at each build. There is no more need for a po4a.conf file. Use po4a-translate to create translated PODs from the po files, keeping the fixup of the generated files (to avoid spurious =encoding, etc). Add a silent rule to hide the po4a-translate command lines by default. These changes also allow us to get rid of the POD existance checks with associated error message pointing to the update-po rule. Now each translated POD file is generated because of make dependency, and it depends only on its po file. --- .gitignore | 1 - m4/guestfs-progs.m4 | 5 +++-- po-docs/Makefile.am | 37 ++++++------------------------------- po-docs/language.mk | 29 +++++++++++++++-------------- subdir-rules.mk | 3 +++ 5 files changed, 27 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 54423b1a..28ddd182 100644 --- a/.gitignore +++ b/.gitignore @@ -83,7 +83,6 @@ Makefile.in /po-docs/*/*.3 /po-docs/*/*.5 /po-docs/*/*.8 -/po-docs/po4a.conf /po-docs/*/*.pod /podwrapper.1 /podwrapper.pl diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 index 1847e241..edb45cf9 100644 --- a/m4/guestfs-progs.m4 +++ b/m4/guestfs-progs.m4 @@ -45,8 +45,9 @@ AC_PATH_PROGS([GENISOIMAGE],[genisoimage mkisofs],[no], test "x$GENISOIMAGE" = "xno" && AC_MSG_ERROR([genisoimage must be installed]) dnl po4a for translating man pages and POD files (optional). -AC_CHECK_PROG([PO4A],[po4a],[po4a],[no]) -AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"]) +AC_CHECK_PROG([PO4A_GETTEXTIZE],[po4a-gettextize],[po4a-gettextize],[no]) +AC_CHECK_PROG([PO4A_TRANSLATE],[po4a-translate],[po4a-translate],[no]) +AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A_GETTEXTIZE" != "xno" && test "x$PO4A_TRANSLATE" != "xno"]) dnl Check for db_load (optional). GUESTFS_FIND_DB_TOOL([DB_LOAD], [load]) diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index 0660eba0..0667b784 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -34,47 +34,22 @@ EXTRA_DIST = \ $(linguas:%=%.po) \ podfiles -CLEANFILES += po4a.conf - # 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_translated) -update-po: virt-v2v-docs.pot - -# Note: po4a puts the following junk at the top of every POD file it -# generates: -# - a warning -# - a probably bogus =encoding line -# Remove both. -# XXX Fix po4a so it doesn't do this. -virt-v2v-docs.pot: po4a.conf - $(PO4A) \ - -M utf-8 -L utf-8 -A utf-8 \ - -v \ - -k 0 \ +virt-v2v-docs.pot: + $(PO4A_GETTEXTIZE) \ + -f pod \ + -M utf-8 -L utf-8 \ --package-name $(PACKAGE_NAME) \ --package-version $(PACKAGE_VERSION) \ --msgid-bugs-address libguestfs@redhat.com \ --copyright-holder "Red Hat Inc." \ - po4a.conf - for f in `cd $(srcdir); find $(linguas_translated) -name '*.pod'`; do \ - $(SED) '0,/^=encoding/d' < $$f > $$f.new; \ - mv $$f.new $$f; \ - done - -po4a.conf: podfiles - rm -f $@-t - echo "[po_directory] $(srcdir)" >> $@-t - echo >> $@-t - for f in `cat podfiles`; do \ - out=`basename -- $$f .pod`.pod; \ - echo "[type: pod] $$f \$$lang:\$$lang/$$out" >> $@-t; \ - echo >> $@-t; \ - done; - mv $@-t $@ + -p $@ \ + $(patsubst %,-m %,$(shell cat $(srcdir)/podfiles)) podfiles: Makefile rm -f $@ $@-t diff --git a/po-docs/language.mk b/po-docs/language.mk index ab402c32..54f621b5 100644 --- a/po-docs/language.mk +++ b/po-docs/language.mk @@ -22,7 +22,7 @@ include $(top_srcdir)/subdir-rules.mk LINGUA = $(shell basename -- `pwd`) # Before 1.23.23, the old Perl tools were called *.pl. -CLEANFILES += *.pl +CLEANFILES += *.pl *.pod MANPAGES = \ virt-v2v.1 \ @@ -54,19 +54,20 @@ virt-v2v.1: key-option.pod keys-from-stdin-option.pod --man $@ \ $< -# If a POD file is missing, the user needs to run make update-po. -# This cannot be done automatically by make because it would be unsafe -# to run po4a or update podfiles potentially in parallel. Therefore -# tell the user what to do and stop. -$(podfiles): - @if ! test -f $@; then \ - echo "***"; \ - echo "*** You need to run the following commands:"; \ - echo "*** rm po-docs/podfiles; make -C po-docs update-po"; \ - echo "*** After that, rerun make."; \ - echo "***"; \ - exit 1; \ - fi +# Note: po4a puts the following junk at the top of every POD file it +# generates: +# - a warning +# - a probably bogus =encoding line +# Remove both. +# XXX Fix po4a so it doesn't do this. +%.pod: $(srcdir)/../$(LINGUA).po + $(guestfs_am_v_po4a_translate)$(PO4A_TRANSLATE) \ + -f pod \ + -M utf-8 -L utf-8 \ + -k 0 \ + -m $(srcdir)/../$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \ + -p $< \ + | $(SED) '0,/^=encoding/d' > $@ # XXX Can automake do this properly? install-data-hook: diff --git a/subdir-rules.mk b/subdir-rules.mk index 6c6f1e56..3547c750 100644 --- a/subdir-rules.mk +++ b/subdir-rules.mk @@ -76,6 +76,9 @@ guestfs_am_v_podwrapper_0 = @echo " POD " $@; guestfs_am_v_jar = $(guestfs_am_v_jar_@AM_V@) guestfs_am_v_jar_ = $(guestfs_am_v_jar_@AM_DEFAULT_V@) guestfs_am_v_jar_0 = @echo " JAR " $@; +guestfs_am_v_po4a_translate = $(guestfs_am_v_po4a_translate_@AM_V@) +guestfs_am_v_po4a_translate_ = $(guestfs_am_v_po4a_translate_@AM_DEFAULT_V@) +guestfs_am_v_po4a_translate_0 = @echo " PO4A-T " $@; %.cmi: %.mli $(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc -package guestfs $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 07/14] po: fix references to OCaml sources
Start the message extraction from the toplevel source directory, so the file references are relative to that, instead of relative to this po subdirectory. --- po/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile.am b/po/Makefile.am index 790c5710..8d981d91 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -63,7 +63,7 @@ $(DOMAIN).pot: Makefile POTFILES-ml $(POTFILES_ML) rm -f $@-t touch $@-t if HAVE_OCAML_GETTEXT - $(OCAML_GETTEXT) --action extract --extract-pot $@-t $(POTFILES_ML) + cd $(top_srcdir) && $(OCAML_GETTEXT) --action extract --extract-pot $(abs_srcdir)/$@-t $(shell cat $(abs_srcdir)/POTFILES-ml) \ $(FIX_CHARSET) $@-t endif -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 08/14] po-docs: fix references to sources
Start the message extraction from the toplevel source directory, so the file references are relative to that, instead of relative to this po-docs subdirectory. In addition, remove the reference to POTFILES-pl, as there are no Perl sources in virt-v2v. Also update/regenerate podfiles accordingly. --- po-docs/Makefile.am | 16 ++++++++-------- po-docs/language.mk | 2 +- po-docs/podfiles | 32 ++++++++++++++++---------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index 0667b784..8c5c9b1e 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -41,24 +41,24 @@ EXTRA_DIST = \ SUBDIRS = $(linguas_translated) virt-v2v-docs.pot: - $(PO4A_GETTEXTIZE) \ + cd $(top_srcdir) && $(PO4A_GETTEXTIZE) \ -f pod \ -M utf-8 -L utf-8 \ --package-name $(PACKAGE_NAME) \ --package-version $(PACKAGE_VERSION) \ --msgid-bugs-address libguestfs@redhat.com \ --copyright-holder "Red Hat Inc." \ - -p $@ \ + -p $(abs_srcdir)/$@ \ $(patsubst %,-m %,$(shell cat $(srcdir)/podfiles)) podfiles: Makefile rm -f $@ $@-t - find $(top_srcdir) -name '*.pod' | \ - grep -v /debian/ | \ - grep -v /virt-v2v-1 | \ - grep -v /po-docs/ | \ + cd $(top_srcdir) && find . -name '*.pod' -printf '%P\n'| \ + grep -v ^debian/ | \ + grep -v ^virt-v2v-1 | \ + grep -v ^po-docs/ | \ + grep -v ^stamp- | \ grep -v /stamp- \ - > $@-t - for f in `cat $(top_srcdir)/po/POTFILES-pl`; do echo $(top_srcdir)/$$f; done >> $@-t + > $(abs_srcdir)/$@-t LC_ALL=C sort -o $@-t $@-t mv $@-t $@ diff --git a/po-docs/language.mk b/po-docs/language.mk index 54f621b5..05c63d8c 100644 --- a/po-docs/language.mk +++ b/po-docs/language.mk @@ -65,7 +65,7 @@ virt-v2v.1: key-option.pod keys-from-stdin-option.pod -f pod \ -M utf-8 -L utf-8 \ -k 0 \ - -m $(srcdir)/../$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \ + -m $(top_srcdir)/$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \ -p $< \ | $(SED) '0,/^=encoding/d' > $@ diff --git a/po-docs/podfiles b/po-docs/podfiles index a1063091..e0a776a5 100644 --- a/po-docs/podfiles +++ b/po-docs/podfiles @@ -1,16 +1,16 @@ -../common/mlcustomize/customize-options.pod -../common/mlcustomize/customize-synopsis.pod -../common/options/blocksize-option.pod -../common/options/key-option.pod -../common/options/keys-from-stdin-option.pod -../docs/virt-v2v-copy-to-local.pod -../docs/virt-v2v-hacking.pod -../docs/virt-v2v-input-vmware.pod -../docs/virt-v2v-input-xen.pod -../docs/virt-v2v-output-local.pod -../docs/virt-v2v-output-openstack.pod -../docs/virt-v2v-output-rhv.pod -../docs/virt-v2v-release-notes-1.42.pod -../docs/virt-v2v-support.pod -../docs/virt-v2v.pod -../test-harness/virt-v2v-test-harness.pod +common/mlcustomize/customize-options.pod +common/mlcustomize/customize-synopsis.pod +common/options/blocksize-option.pod +common/options/key-option.pod +common/options/keys-from-stdin-option.pod +docs/virt-v2v-copy-to-local.pod +docs/virt-v2v-hacking.pod +docs/virt-v2v-input-vmware.pod +docs/virt-v2v-input-xen.pod +docs/virt-v2v-output-local.pod +docs/virt-v2v-output-openstack.pod +docs/virt-v2v-output-rhv.pod +docs/virt-v2v-release-notes-1.42.pod +docs/virt-v2v-support.pod +docs/virt-v2v.pod +test-harness/virt-v2v-test-harness.pod -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 09/14] Remove references to Zanata
We migrated to Weblate, and Zanata is being decommissioned. --- Makefile.am | 4 +--- zanata-pull.sh | 30 ------------------------------ zanata.xml | 7 ------- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100755 zanata-pull.sh delete mode 100644 zanata.xml diff --git a/Makefile.am b/Makefile.am index 6d0c270b..06e12a3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,9 +93,7 @@ EXTRA_DIST = \ website/index.css \ website/index.html.in \ website/pod.css \ - website/standard.css \ - zanata.xml \ - zanata-pull.sh + website/standard.css # When doing 'make dist' update a few files automatically. # diff --git a/zanata-pull.sh b/zanata-pull.sh deleted file mode 100755 index ee5f8830..00000000 --- a/zanata-pull.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Pull translations from Zanata. -# Copyright (C) 2011-2020 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -set -e - -echo zanata po pull -zanata po pull - -# Remove PO files that have no translations in them. -for f in po/*.po po-docs/*.po; do - if ! grep -q '^msgstr "[^"]' $f; then - echo rm $f - rm $f - fi -done diff --git a/zanata.xml b/zanata.xml deleted file mode 100644 index 649c4254..00000000 --- a/zanata.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<config xmlns="http://zanata.org/namespace/config/"> - <url>https://fedora.zanata.org/</url> - <project>virt-v2v</project> - <project-version>master</project-version> - <project-type>gettext</project-type> -</config> -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 10/14] po: extract again messages from C sources
There are C sources (mostly in libguestfs-common) with user messages, and at least some of them may actually be shown by virt-v2v. Hence, extract them again, so they can be translated. --- Makefile.am | 14 +++++++++++++- po/Makefile.am | 8 ++++++-- po/POTFILES | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 po/POTFILES diff --git a/Makefile.am b/Makefile.am index 06e12a3c..e316f88c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -98,9 +98,10 @@ EXTRA_DIST = \ # When doing 'make dist' update a few files automatically. # # ChangeLog - changelog (created from git) +# po/POTFILES - files with ordinary extensions, but not OCaml files # po/POTFILES-ml - OCaml files, which need a special tool to translate -dist-hook: ChangeLog po/POTFILES-ml +dist-hook: ChangeLog po/POTFILES po/POTFILES-ml cp ChangeLog $(distdir)/ChangeLog ChangeLog: configure.ac @@ -108,6 +109,17 @@ ChangeLog: configure.ac git log --decorate=false > $@-t mv $@-t $@ +# For more information about translations, see po/Makefile.am. +po/POTFILES: configure.ac + rm -f $@ $@-t + cd $(srcdir); \ + find $(DIST_SUBDIRS) -name '*.c' | \ + grep -v -E '^(gnulib|po-docs|tests|test-data|bundled)/' | \ + grep -v -E '/(dummy\.c)$$' | \ + grep -v -E '.*-(tests)\.c$$' | \ + LC_ALL=C sort -u > $@-t + mv $@-t $@ + po/POTFILES-ml: configure.ac rm -f $@ $@-t cd $(srcdir); \ diff --git a/po/Makefile.am b/po/Makefile.am index 8d981d91..f1509d60 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -25,13 +25,14 @@ MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libgues # Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464). linguas := $(shell cat $(srcdir)/LINGUAS) +POTFILES := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-ml) POFILES := $(linguas:%=%.po) GMOFILES := $(linguas:%=%.gmo) EXTRA_DIST = \ LINGUAS \ - POTFILES-ml \ + POTFILES POTFILES-ml \ $(DOMAIN).pot \ $(POFILES) \ $(GMOFILES) @@ -59,7 +60,7 @@ XGETTEXT_ARGS = \ FIX_CHARSET = \ $(SED) -i 's|text/plain; charset=CHARSET|text/plain; charset=utf-8|g' -$(DOMAIN).pot: Makefile POTFILES-ml $(POTFILES_ML) +$(DOMAIN).pot: Makefile POTFILES $(POTFILES) POTFILES-ml $(POTFILES_ML) rm -f $@-t touch $@-t if HAVE_OCAML_GETTEXT @@ -67,6 +68,9 @@ if HAVE_OCAML_GETTEXT \ $(FIX_CHARSET) $@-t endif + $(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) \ + --files-from=$(abs_srcdir)/POTFILES + $(FIX_CHARSET) $@-t mv $@-t $@ .po.gmo: diff --git a/po/POTFILES b/po/POTFILES new file mode 100644 index 00000000..02a410d7 --- /dev/null +++ b/po/POTFILES @@ -0,0 +1,24 @@ +common/mlpcre/pcre-c.c +common/mltools/JSON_parser-c.c +common/mltools/getopt-c.c +common/mltools/tools_utils-c.c +common/mltools/uri-c.c +common/mlutils/c_utils-c.c +common/mlutils/unix_utils-c.c +common/mlxml/xml-c.c +common/options/config.c +common/options/decrypt.c +common/options/display-options.c +common/options/domain.c +common/options/inspect.c +common/options/keys.c +common/options/options.c +common/options/uri.c +common/qemuopts/qemuopts.c +common/utils/cleanups.c +common/utils/gnulib-cleanups.c +common/utils/libxml2-cleanups.c +common/utils/stringlists-utils.c +common/utils/utils.c +v2v/libosinfo-c.c +v2v/qemuopts-c.c -- 2.26.2
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 11/14] po/po-docs: update catalog templates
Regenerate the catalog templates according to the updated extraction rules (fixed paths, and added sources). --- This patch was shortened for mailing list posting. Originally it was ~114K. po-docs/virt-v2v-docs.pot | 3783 ++++++++++++++----------------------- po/virt-v2v.pot | 2014 +++++++++++++------- 2 files changed, 2765 insertions(+), 3032 deletions(-) diff --git a/po-docs/virt-v2v-docs.pot b/po-docs/virt-v2v-docs.pot index c464daea..f747348f 100644 --- a/po-docs/virt-v2v-docs.pot +++ b/po-docs/virt-v2v-docs.pot @@ -8,30 +8,25 @@ msgid "" msgstr "" "Project-Id-Version: virt-v2v 1.43.1\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2020-07-06 15:21+0100\n" +"POT-Creation-Date: 2020-08-13 13:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: =end -#: ../common/mlcustomize/customize-options.pod:1 -#: ../common/mlcustomize/customize-options.pod:25 -#: ../docs/virt-v2v-release-notes-1.42.pod:141 -#: ../docs/virt-v2v-release-notes-1.42.pod:145 -#: ../virt-v2v-1.43.1/common/mlcustomize/customize-options.pod:1 -#: ../virt-v2v-1.43.1/common/mlcustomize/customize-options.pod:25 -#: ../virt-v2v-1.43.1/docs/virt-v2v-release-notes-1.42.pod:141 -#: ../virt-v2v-1.43.1/docs/virt-v2v-release-notes-1.42.pod:145 +#: common/mlcustomize/customize-options.pod:1 +#: common/mlcustomize/customize-options.pod:25 +#: docs/virt-v2v-release-notes-1.42.pod:141 +#: docs/virt-v2v-release-notes-1.42.pod:145 msgid "comment" msgstr "" [10600+ lines follow...] diff --git a/po/virt-v2v.pot b/po/virt-v2v.pot index cd04fdd6..ab31f32f 100644 --- a/po/virt-v2v.pot +++ b/po/virt-v2v.pot @@ -1,2007 +1,2699 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) YEAR Red Hat Inc. +# This file is distributed under the same license as the virt-v2v package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-06 14:21+0000\n" +"Project-Id-Version: virt-v2v 1.43.1\n" +"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?" +"component=libguestfs&product=Virtualization+Tools\n" +"POT-Creation-Date: 2020-08-13 13:16+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: ../v2v/input_ova.ml:152 ../common/mltools/tools_utils.ml:187 +#: v2v/input_ova.ml:152 common/mltools/tools_utils.ml:187 msgid "%s" msgstr "" [3300+ lines follow...]
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 12/14] po: update translations from catalog templates
Run a msgmerge of the translations with the up-to-date template. Do it manually before adding virt-v2v to Weblate, so we can edit them (e.g. removing the obsolete messages, which are largely from libguestfs sources). --- This patch was truncated for mailing list posting. Originally it was ~2.8M. po/cs.po | 1294 ++++++----- po/de.po | 2003 ++++++----------- po/en_GB.po | 1343 ++++++------ po/es.po | 2911 ++++++------------------- po/eu.po | 1232 ++++++----- po/fr.po | 3562 ++++++------------------------ po/gu.po | 2096 ++++++------------ po/hi.po | 1944 ++++++----------- po/ja.po | 3746 ++++++-------------------------- po/kn.po | 1928 ++++++----------- po/ml.po | 1910 ++++++---------- po/mr.po | 2602 ++++++---------------- po/nl.po | 3279 ++++++---------------------- po/or.po | 1911 ++++++---------- po/pa.po | 2610 ++++++---------------- po/pl.po | 3101 ++++++-------------------- po/ru.po | 1231 ++++++----- po/ta.po | 1903 ++++++---------- po/te.po | 1899 ++++++---------- po/tg.po | 1227 ++++++----- po/uk.po | 6020 ++++++--------------------------------------------- po/zh_CN.po | 1246 ++++++----- 22 files changed, 14749 insertions(+), 36249 deletions(-)
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 13/14] po: remove empty translations
--- This patch was greatly shortened for mailing list posting. Originally it was ~495K. po/LINGUAS | 7 - po/en_GB.po | 2701 -------------------------------------------------- po/eu.po | 2701 -------------------------------------------------- po/ru.po | 2704 --------------------------------------------------- po/ta.po | 2701 -------------------------------------------------- po/te.po | 2701 -------------------------------------------------- po/tg.po | 2700 -------------------------------------------------- po/zh_CN.po | 2699 -------------------------------------------------- 8 files changed, 18914 deletions(-) delete mode 100644 po/en_GB.po delete mode 100644 po/eu.po delete mode 100644 po/ru.po delete mode 100644 po/ta.po delete mode 100644 po/te.po delete mode 100644 po/tg.po delete mode 100644 po/zh_CN.po diff --git a/po/LINGUAS b/po/LINGUAS index 69604489..ed6cea94 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,8 +1,6 @@ cs de -en_GB es -eu fr gu hi @@ -14,9 +12,4 @@ nl or pa pl -ru -ta -te -tg uk -zh_CN diff --git a/po/en_GB.po b/po/en_GB.po deleted file mode 100644 index 37b7817c..00000000 --- a/po/en_GB.po +++ /dev/null diff --git a/po/eu.po b/po/eu.po deleted file mode 100644 index 2556796c..00000000 --- a/po/eu.po +++ /dev/null diff --git a/po/ru.po b/po/ru.po deleted file mode 100644 index e088b77d..00000000 --- a/po/ru.po +++ /dev/null diff --git a/po/ta.po b/po/ta.po deleted file mode 100644 index 4b53d510..00000000 --- a/po/ta.po +++ /dev/null diff --git a/po/te.po b/po/te.po deleted file mode 100644 index 4d83db02..00000000 --- a/po/te.po +++ /dev/null diff --git a/po/tg.po b/po/tg.po deleted file mode 100644 index 89888480..00000000 --- a/po/tg.po +++ /dev/null diff --git a/po/zh_CN.po b/po/zh_CN.po deleted file mode 100644 index 0ed8422b..00000000 --- a/po/zh_CN.po +++ /dev/null
Pino Toscano
2020-Aug-13 12:10 UTC
[Libguestfs] [v2v PATCH 14/14] po-docs: update translations from catalog templates
Run a msgmerge of the translations with the up-to-date template. Do it manually before adding virt-v2v to Weblate, so we can edit them (e.g. removing the obsolete messages, which are largely from libguestfs sources). --- This patch was truncated for mailing list posting. Originally it was ~13M. po-docs/cs.po | 3960 +- po-docs/de.po | 9299 +--- po-docs/en_GB.po | 62274 +----------------------- po-docs/es.po | 5760 +-- po-docs/eu.po | 3993 +- po-docs/fr.po | 30007 +----------- po-docs/ja.po | 37459 +-------------- po-docs/nl.po | 3815 +- po-docs/pt_BR.po | 3790 +- po-docs/tg.po | 4009 +- po-docs/uk.po | 111660 +------------------------------------------- po-docs/zh_CN.po | 3939 +- 12 files changed, 16947 insertions(+), 263018 deletions(-)
Richard W.M. Jones
2020-Aug-13 12:45 UTC
Re: [Libguestfs] [v2v PATCH 14/14] po-docs: update translations from catalog templates
ACK series, thanks. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Possibly Parallel Threads
- [PATCH 0/9] Adaptations to Weblate
- [PATCH] po-docs: turn language list into LINGUAS file
- Re: [PATCH] build: ensure .pot and .pod files for docs are up-to-date
- [PATCH] build: ensure .pot and .pod files for docs are up-to-date
- Fixes from the patch queue of the Debian package