[virt-manager PATCH v4 0/9] Improve translations
Pino Toscano
ptoscano at redhat.com
Mon Jul 13 08:58:16 UTC 2020
On Sunday, 12 July 2020 15:12:24 CEST Cole Robinson wrote:
> On 7/8/20 10:54 AM, Pino Toscano wrote:
> > This patch series improve the handling of translations.
> >
> > Use the gettext tools to:
> > - extract the messages from all the various sources
> > - merge old translations with the new catalog
> > - build translations as mo files
> > - merge translations to desktop, and AppStream files
> > This makes gettext a mandatory dependency when installing, replacing
> > intltool.
> >
> > To make sure the translations are updated in Weblate, commit the
> > catalog in the repository.
> >
> > As related (i18n) changes: drop two translations that are totally
> > empty.
>
> Thanks Pino! Pushed now with a tweak to patch 3 to drop now unused
> fnmatch import.
Ah, missed that one, thanks for the hotfix.
> I set up some automation with this. After every push github CI will
> refresh po/virt-manager.pot in the 'translations' branch and I updated
> weblate to use that branch. I would appreciate it if you can confirm
> everything looks sensible from the weblate translator side
I've seen this separate branch setup already in other projects, and it
works as long as you remember to periodially merge the translations :)
The only downside is that checking out master gives no translations.
One thing I notice is that the branch seems to duplicate commits from
master, instead of merging from it.
Also, it could be helpful to commit the updated template only when it
has actual changes:
$ diff -u -I 'POT-Creation-Date' old.pot new.pot
this will ignore changes in lines with the POT-Creation-Date text.
In practice, this will not show any output if all it changed was the
creation date of the template. I can try to tweak the action for this.
It looks to me the updated template was not merged with the existing
translations. This is something to do in weblate (see below).
Do you have admin access to the virt-manager project in weblate? If so,
please enable the following addons (in [1], select Manage -> Addons):
- "Update PO files to match POT (msgmerge)": this does what I mentioned
above, i.e. update the translations to the template, so string
changes are available to translators; recommended settings:
- "Keep previous msgids of translated strings": enabled
when a string changes, this will keep the old msgid around, so
translators can see what changed
- "Use fuzzy matching": enabled
- "Update LINGUAS file": this updates the po/LINGUAS file when new
languages are added; IMHO sadly it does not keep the file sorted,
but I personally can live with that (especially if I don't have to
update LINGUAS myself)
I suggest also "Squash Git commits" configured per-author: this way,
translation updates will be squashed as single commit for each
translator (who will get then proper git authorship), instead of
multiple commits per-author after each editing session.
[1] https://translate.fedoraproject.org/projects/virt-manager/virt-manager/
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20200713/52638ad0/attachment.sig>
More information about the virt-tools-list
mailing list