Commit Graph

29322 Commits

Author SHA1 Message Date
Daniel P. Berrangé
4a742166da po: minimize language id
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:45 +01:00
Daniel P. Berrangé
7b55350ddc po: minimize language ia
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:41 +01:00
Daniel P. Berrangé
8ab9d04290 po: minimize language hu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:37 +01:00
Daniel P. Berrangé
83feb4fbaa po: minimize language hr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:35 +01:00
Daniel P. Berrangé
5bb09356c0 po: minimize language hi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:32 +01:00
Daniel P. Berrangé
1e060aafee po: minimize language he
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:29 +01:00
Daniel P. Berrangé
9120dfcc2b po: minimize language gu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:26 +01:00
Daniel P. Berrangé
19dc2b5e0a po: minimize language gl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:23 +01:00
Daniel P. Berrangé
59b61454b0 po: minimize language ga
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:20 +01:00
Daniel P. Berrangé
e7bb87ae0d po: minimize language fur
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:16 +01:00
Daniel P. Berrangé
8e9c220381 po: minimize language fr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:12 +01:00
Daniel P. Berrangé
74b6ab04f3 po: minimize language fi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:07 +01:00
Daniel P. Berrangé
2477971666 po: minimize language fil
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:04 +01:00
Daniel P. Berrangé
472ded5dc0 po: minimize language fa
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:01 +01:00
Daniel P. Berrangé
36545e85cf po: minimize language eu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:58 +01:00
Daniel P. Berrangé
b4508a26c2 po: minimize language et
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:55 +01:00
Daniel P. Berrangé
2edb1d44c1 po: minimize language es
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:52 +01:00
Daniel P. Berrangé
bdc647404a po: minimize language eo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:49 +01:00
Daniel P. Berrangé
5d224f2e4f po: minimize language en_GB
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:46 +01:00
Daniel P. Berrangé
c545d73f74 po: minimize language el
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:43 +01:00
Daniel P. Berrangé
07bb2d4df7 po: minimize language de
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:39 +01:00
Daniel P. Berrangé
c11ee734f0 po: minimize language de_CH
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:35 +01:00
Daniel P. Berrangé
a6c2d8543f po: minimize language da
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:31 +01:00
Daniel P. Berrangé
804d3ba6b8 po: minimize language cy
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:28 +01:00
Daniel P. Berrangé
d577eb0da9 po: minimize language cs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:25 +01:00
Daniel P. Berrangé
e4b0f71ce5 po: minimize language ca
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:19 +01:00
Daniel P. Berrangé
04b7c3b749 po: minimize language bs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:15 +01:00
Daniel P. Berrangé
a1b6fae3f2 po: minimize language brx
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:10 +01:00
Daniel P. Berrangé
49e7d213a8 po: minimize language br
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:06 +01:00
Daniel P. Berrangé
cf50974fcc po: minimize language bo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:01 +01:00
Daniel P. Berrangé
d2825a3a3a po: minimize language bn
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:58 +01:00
Daniel P. Berrangé
e9c3dcc6c1 po: minimize language bn_IN
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:49 +01:00
Daniel P. Berrangé
17fbfc38f7 po: minimize language bg
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:44 +01:00
Daniel P. Berrangé
e2bd50c8f2 po: minimize language be
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:40 +01:00
Daniel P. Berrangé
cc955c1b74 po: minimize language bal
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:34 +01:00
Daniel P. Berrangé
fa7e7a8ce3 po: minimize language ast
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:29 +01:00
Daniel P. Berrangé
b2c57c91ca po: minimize language as
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:17 +01:00
Daniel P. Berrangé
f2da1535f0 po: minimize language ar
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:27 +01:00
Daniel P. Berrangé
0a6054f8de po: minimize language anp
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:18 +01:00
Daniel P. Berrangé
2ee64e5889 po: minimize language am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:09 +01:00
Daniel P. Berrangé
2ffcb25cfc po: minimize language af
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:02 +01:00
Daniel P. Berrangé
a3857dbeeb po: minimize & canonicalize translations stored in git
Similar to the libvirt.pot, .po files contain line numbers and file
names identifying where in the source a translatable string comes from.
The source locations in the .po files are thrown away and replaced with
content from the libvirt.pot whenever msgmerge is run, so this is not
precious information that needs to be stored in git.

When msgmerge processes a .po file, it will add in any msgids from the
libvirt.pot that were not already present. Thus, if a particular msgid
currently has no translation, it can be considered redundant and again
does not need storing in git.

When msgmerge processes a .po file and can't find an exact existing
translation match, it will try todo fuzzy matching instead, marking such
entries with a "# fuzzy" comment to alert the translator to take a
look and either discard, edit or accept the match. Looking at the
existing fuzzy matches in .po files shows that the quality is awful,
with many having a completely different set of printf format specifiers
between the msgid and fuzzy msgstr entry. Fortunately when msgfmt
generates the .gmo, the fuzzy entries are all ignored anyway. The fuzzy
entries could be useful to translators if they were working on the .po
files directly from git, but Libvirt outsourced translation to the
Fedora Zanata system, so keeping fuzzy matches in git is not much help.

Finally, by default msgids are sorted based on source location. Thus, if
a bit of code with translatable text is moved from one file to another,
it may shift around in the .po file, despite the msgid not itself changing.
If the msgids were sorted alphabetically, the .po files would have
stable ordering when code is refactored.

This patch takes advantage of the above observations to canonicalize
and minimize the content stored for .po files in git. Instead of storing
the real .po files, we now store .mini.po files.

The .mini.po files are the same file format as .po files, but have no
source location comments, are sorted alphabetically, and all fuzzy
msgstrs and msgids with no translation are discarded. This cuts the size
of content in the po directory from 109MB to 19MB.

Users working from a libvirt git checkout who need the full .po files
can run "make update-po", which merges the libvirt.pot and .mini.po
file to create a .po file containing all the content previously stored
in git.

Conversely if a full .po file has been modified, for example, by
downloading new content from Zanata, the .mini.po files can be updated
by running "make update-mini-po". The resulting diffs of the .mini.po
file will clearly show the changed translations without any of the noise
that previously obscured content. Being able to see content changes
clearly actually identified a bug in the zanata python client where it
was adding bogus "fuzzy" annotations to many messages:

  https://bugzilla.redhat.com/show_bug.cgi?id=1564497

Users working from libvirt releases should not see any difference in
behaviour, since the tarballs only contain the full .po files, not the
.mini.po files.

As an added benefit, generating tarballs with "make dist", will no
longer cause creation of dirty files in git, since it won't touch the
.mini.po files, only the .po files which are no longer kept in git.

To avoid creating a single commit 100+MB in size, each language is
minimized separately in a following commit.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:11:08 +01:00
Daniel P. Berrangé
d3034944e4 po: stop storing libvirt.pot in git
Storing the libvirt.pot file is a bad idea because it is an
automatically generated file. Most patches will invalidate the stored
libvirt.pot file by changing line numbers or introducing/removing files
with translatable content.

Anyone working with a libvirt GIT checkout who needs the libvirt.pot is
better served creating a fresh copy with "make libvirt.pot".

libvirt.pot is still included in the release dists, so those building
from tarballs see no change in behaviour.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:32 +01:00
Daniel P. Berrangé
4aaf5964dc po: add rules for integration with zanata
Add rules to handle pushing libvirt.pot to zanata, and refreshing .po
files with new content from zanata.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:20 +01:00
Daniel P. Berrangé
bdfdec31bc po: remove language list from zanata configuration
The <locales> element in zanata.xml is no longer relevant as this info
is recorded server side.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:06 +01:00
Daniel P. Berrangé
c0a8ea450d po: provide custom make rules for po file management
Historically we have relied on autopoint/gettextize to install a
standard po/Makefile.in.in. There is very limited scope for customizing
this and it also causes a bunch of extra stuff to be pulled into
configure.ac which potentially clashes with gnulib. Writing make rules
for po file management is no more difficult than any other rules libvirt
has, so stop using autopoint/gettextize.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:35:58 +01:00
Peter Krempa
327430fcfc qemu: Format 'write-cache' parameter for disk frontends
The disk cache mode translates to various frontend and backend
attributes for the qemu block layer. For the frontend device the
'writeback' parameter is used and provided as 'write-cache'. Implement
this so that we can later switch to using -blockdev where we will not
pass the cachemode directly any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-04-19 11:20:34 +02:00
Peter Krempa
955df88de6 qemu: caps: Add capability for 'write-cache' parameter of disk frontends
QEMU translates the cache mode of a disk internally into 3 flags.
'write-cache' is a flag of the frontend while others are flag of the
backing storage. Add capability which will allow expressing it via the
frontend attribute.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-04-19 11:20:34 +02:00
Peter Krempa
cf44d63a83 tests: qemuxml2argv: Test formatting of 'write-cache' parameter
Prepare the tests for adding the new parameter. The parameter was
introduced in qemu-2.7.0, so add a forked version of the test case to
see that it is formatted properly.

This test is also an example how the new testing macros should be used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-04-19 11:20:34 +02:00
Peter Krempa
e2244abc60 qemu: domain: Add helper for translating disk cachemode to qemu flags
Add helper which will map values of disk cache mode to the flags which
are accepted by various parts of the qemu block layer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-04-19 11:20:34 +02:00