Weblate transition & integration for upstream projects
by Daniel P. Berrangé
I'm the maintainer for various upstream projects  which are currently
using Fedora's Zanata for translation services and I saw the recent
change proposal for Fedora to shift to Weblate in the next release
First I'm wondering what sort of time frame is being targetted for move
of the upstream projects which are independant of Fedora's release cycle ?
Next, and more importantly, I'm trying to understand how we will integrate
With Zanata the maintainers just run "zanata push" and "zanata pull" when
desired and we have rules integrated into our build system to do various
processing steps to build the .pot file and .po files as needed.
Looking at what was done for ibus-typing-booster, IIUC Weblate is given
commit access directly to the git repository.
This is tricky for us as, AFAICT, it assumes the project is storing the
.pot files and .po files in git which is not the case for an increasing
number of our virt related projects - libvirt, libvirt-glib & virt-viewer.
It is also not appealing from a security POV to grant commit access to
a 3rd party service.
The .pot file is never stored as it is an huge auto-generated file which
would be out of date as soon as it was committed. We would always rebuild
this from master source files whenever it is needed so it is fully updated.
We also recently stopped storing full .po files , again because they are
huge files with a large amount of redundant information in them. Instead
we store what we call ".mini.po" files. This is the same file format as
a normal ".po" file, but with
- all filenames + line numbers stripped
- all non-translated msgids stripped
- msgids sorted alphabetically
This is loss-less - all the removed information can be automatically
re-added by processing with msgmerge & the latest .pot file.
This cut down size of stored /po directory from 100 MB to just 18 MB.
It also means that when we push updates with new translations, the
git patch diffs have high signal/noise ratio and are very small.
eg a git commit refreshing translations is now approx 700 KB, instead
of the ~80 MB we saw when storing full .po files.
This can also makes distributed tar.xz files smaller as we only need
include the .mini.po files.
We have build rules from convert from .po files to .mini.po files which
are run when we pull down new translations from zanata, and the inverse
to convert from .mini.po files to .po files which we run at build time
when creating the binary .mo files for installation into /usr/share/locale
All this means though that Weblate can't simply operate directly on our
git repo. There's no .pot for it to find, nor can it push normally formatted
Thus I'm trying to understand how we'll go about integrating with Weblate.
I'm guessing there's no way to control how it interacts with git - eg no
way to tell it to run meson to generate a .pot file, nor any way to tell
it to run meson to generate .mini.po files
The 'wlc download' and 'wlc upload' commands appear to be similar in
purpose to zanata's 'pull' and 'push' commands, but when I try to run
'wlc download ibus-typing-booster/app' it reports "Error: Not supported".
Essentially if there's a way to push a .pot file and pull a .po file
from Weblate's REST API we'll be able to continue our current workflow.
Finally in Weblate after authenticating with FAS, I still don't have the
ability to create new projects. Is this intentionally restricted ? I was
hoping to do some testing with Weblate & one of the virt apps like
virt-viewer to try to understand its operation better before any formal
 libvirt, libvirt-glib, virt-viewer, entangle, osinfo-db, osinfo-db-tools,
libosinfo, virt-manager, libvirt-sandbox
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
3 years, 5 months