Weblate transition & integration for upstream projects
by Daniel P. Berrangé
I'm the maintainer for various upstream projects [1] 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
cycle.
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 Weblate....
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 [2], 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
.po files.
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
transition period.
Regards,
Daniel
[1] libvirt, libvirt-glib, virt-viewer, entangle, osinfo-db, osinfo-db-tools,
libosinfo, virt-manager, libvirt-sandbox
[2] https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-ha...
--
|: 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, 12 months
Self-Introduction: edwardzcn zh_cn
by Chuannan Zhang
Hello everyone! I am a newcomer who'd like to contribute to the translation
:)
Name: Edward Zhang
Lacation: Hunan Province, China
Login: edwardzcn
Language: zh_cn
Student
Major: Computer Science
About me:
As a student whose major is CS, I'm really interested in Open Source
Software. So I find Fedora! BTW I also want to learn some practical
knowledge about OS :)
Basketball and photography are my best two hobbies.
The Fedora Project and me: To be honest, I haven't learned much about the
project. Contributing to translation is my first step, also a wonderful way
to familiar with the project and the community. I think I will try to code
for the project (C++/Python/Go) later.
GPG KEYID: 38BFE990
Fingerprint: B4AB 40CC F607 DDD6 416A 00C6 27F5 9F82 38BF E990
:)
4 years