Weblate works a slightly different way than Zanata. Instead of manually pushing a pot file and fetching po files, Weblate is going to work automatically with GitLab Merge requests. The main pot file must be committed to git, and then Weblate fully manages the .po files, using merge requests to send updates back. With this new system we don't have a separate .mini.po file. The main .po file is partially minimized by removing locations but does not have non-translated msgids removed. This is not a big downside if we consider that over time most translations should trend towards 100% translated, and we have purged all 100% non-translated languages. The main .pot file is generated with alphabetic sort ordering instead of the default source file location ordering, as this makes the diffs stable across renames/code movement, which is something we used in the old .mini.po files. The only rules needed in the makefile are to refresh the .pot file and to generate the .gmo files at install time. We must never touch the .po files locally, not even to rebase them when the .pot is updated, as that will create merge conflicts with Weblate. Weblate will take care of all rebases of the .po files in its own fork of the git repo, and open merge requests to send changes back when needed. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2.0 KiB
=========================== Virt-Viewer Message Translation
.. image:: https://translate.fedoraproject.org/widgets/virt-viewer/-/virt-viewer/multi-auto.svg :target: https://translate.fedoraproject.org/engage/virt-viewer/ :alt: Translation status
Virt-Viewer translatable messages are maintained using the GNU Gettext tools and file formats, in combination with the Fedora Weblate web service.
https://translate.fedoraproject.org/projects/virt-viewer/virt-viewer/
Source repository
The virt-viewer GIT repository stores the master "virt-viewer.pot" file, which is to be refreshed at time of feature freeze.
The "po" files stored in GIT have source locations removed in order to cut down on storage size, by eliminating information already present in the "pot" file. All files are stored with strings sorted in alphabetical order rather than source location order, to minimize movement of strings when source locations change.
The "po" files are to be EXCLUSIVELY UPDATED by merge requests sent from the Fedora Weblate service. Other contributors MUST NEVER send changes which touch the "po" file content, as that will create merge conflicts for Weblate. IOW any bug fixes to translations should be made via the Weblate application UI.
After the "pot" file in virt-viewer GIT, Weblate will automatically run "msgmerge" to update the "po" files itself and send back a merge request with the changes.
Translation updates made in the Weblate Web UI will be committed to its fork of the GIT repo once a day. These commits will be submitted back to the master GIT repo via merge requests. If a merge request from Weblate is already open, commits will be added to this existing merge request. Weblate will take care of rebasing whenever changes happen in Git master. In order to avoid having to do translations merges 30 times a month, merge requests from Weblate will usually be left open until feature freeze arrives. During the freeze period, they will be accepted more promptly to ensure they make it into the new release.