The build emits a lot of warnings like this:
po4a-translate is deprecated. The unified po4a(1) program is more convenient and less error prone. Once
configured, `po4a --no-update` can be used as a drop-in replacement to `po4a-translate`.
po4a::pod: A new SimplePod parser is now available. Please consider using it instead of the current Pod
module. If you encounter any bugs, your reports would be greatly appreciated. To use it, add
the following line at the top of your po4a configuration file: "[po4a_alias:Pod] SimplePod".
You can disable this message by setting the no-warn-simple option. Sorry for the noise, and
thank you!
But we can suppress them with some options to the po4a tools.
Actually fixing it is tracked here:
https://github.com/libguestfs/libguestfs/issues/312
(cherry picked from virt-v2v commit
865f1ced9fedd9c3121b44b2f3461727ce9dfadc)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
As far as I can tell using po4a-gettextize was wrong here. The right
subtool for combining multiple documents into a .pot is po4a-updatepo,
so use that one instead.
Run this command across the source:
perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`
and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
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'.
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.
Also update/regenerate podfiles accordingly.
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.
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Commit 794b6a1acf added cs.po, but
because this wasn't also added to lingas_not_translated the file was
not included in EXTRA_DIST or processed properly.
Fixes commit 794b6a1acf.
By adding common CLEANFILES and DISTCLEANFILES variables to
common-rules.mk, we can remove these from most other Makefiles, and
also clean files more consistently.
Note that bin_PROGRAMS are already cleaned by 'make clean', so I
removed cases where these were unnecessarily added to CLEANFILES.
Commit e6f7d23782 added new po files for
pt_BR to po/ and po-docs/ (they are only very minimal). However they
were not added to the list of linguas, so amongst other things the
files were not included in EXTRA_DIST automatically.
This file is mainly a central place to:
- include localenv if it exists, and
- define the RHEL 5 backwards compatibility macros, instead of
spreading them over every other file.
Generate the list of *.pod files, instead of hard coding
it (and having it get very very out of date). Store the
list in a separate file po-docs/podfiles.
Lift the if HAVE_PO4A ... endif completely out of the po-docs
subdirectory, and just exclude the whole subdirectory if the po4a
program is not available.
The guestfish-only commands such as 'alloc' and 'edit' are
now generated from one place in the generator instead of being
spread around ad-hoc in the C code.
This uses the optional po4a package to split these files into
PO files for translation, and reassemble afterwards.
Note this creates an extra pot file (po-docs/libguestfs-docs.pot).
We don't (yet) combine this with the main po/libguestfs.pot file.
The 'libguestfs-docs.pot' file included in this commit is not the
real thing, just a short cut down snippet for testing. The real
thing is created if you update one of the dependent files and
rebuild.
Note also the dummy ja.po, for testing the principles.