summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2016-06-17 17:31:24 -0400
committerCole Robinson <crobinso@redhat.com>2016-06-17 18:06:07 -0400
commitcf3a1cc1f08a6f1afe9433cf07af1fb931117f2f (patch)
tree52d2c89c8d6acb9372bed90b391f04a48a7a8d2e
parent40e035463193e676e875261d9d85cb7885fc8efc (diff)
downloadvirt-manager-cf3a1cc1f08a6f1afe9433cf07af1fb931117f2f.tar.gz
appdata: Modernize, and translate it
This also revealed our translations were busted for .desktop files as well, so rework the POTFILES.in generation to account for it
-rw-r--r--data/virt-manager.appdata.xml25
-rw-r--r--data/virt-manager.appdata.xml.in35
-rwxr-xr-xsetup.py22
3 files changed, 50 insertions, 32 deletions
diff --git a/data/virt-manager.appdata.xml b/data/virt-manager.appdata.xml
deleted file mode 100644
index e49384c4..00000000
--- a/data/virt-manager.appdata.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2013 Cole Robinson -->
-<application>
- <id type="desktop">virt-manager.desktop</id>
- <metadata_license>CC0-1.0</metadata_license>
- <project_license>GPL-2.0+</project_license>
- <name>Virtual Machine Manager</name>
- <summary>Graphically manage KVM, Xen, or LXC via libvirt</summary>
- <description>
- <p>
- Virtual Machine Manager provides a graphical tool for administering virtual
- machines for KVM, Xen, and LXC. Start, stop, add or remove virtual devices,
- connect to a graphical or serial console, and see resource usage statistics
- for existing VMs on local or remote machines. Uses libvirt as the backend
- management API.
- </p>
- </description>
- <screenshots>
- <screenshot type="default">http://virt-manager.org/appdata/en_US/manager.png</screenshot>
- <screenshot>http://virt-manager.org/appdata/en_US/details.png</screenshot>
- <screenshot>http://virt-manager.org/appdata/en_US/console.png</screenshot>
- </screenshots>
- <url type="homepage">http://www.virt-manager.org/</url>
- <updatecontact>virt-tools-list@redhat.com</updatecontact>
-</application>
diff --git a/data/virt-manager.appdata.xml.in b/data/virt-manager.appdata.xml.in
new file mode 100644
index 00000000..94cdcb67
--- /dev/null
+++ b/data/virt-manager.appdata.xml.in
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>virt-manager.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <_name>Virtual Machine Manager</_name>
+ <_summary>Graphically manage KVM, Xen, or LXC via libvirt</_summary>
+ <description>
+ <_p>
+ Virtual Machine Manager provides a graphical tool for administering virtual
+ machines for KVM, Xen, and LXC. Start, stop, add or remove virtual devices,
+ connect to a graphical or serial console, and see resource usage statistics
+ for existing VMs on local or remote machines. Uses libvirt as the backend
+ management API.
+ </_p>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <image>http://virt-manager.org/appdata/en_US/manager.png</image>
+ <_caption>Main manager window</_caption>
+ </screenshot>
+ <screenshot>
+ <image>http://virt-manager.org/appdata/en_US/details.png</image>
+ <_caption>Virtual machine configuration screen</_caption>
+ </screenshot>
+ <screenshot>
+ <image>http://virt-manager.org/appdata/en_US/console.png</image>
+ <_caption>Graphical console connection for a virtual vachine</_caption>
+ </screenshot>
+ </screenshots>
+ <url type="homepage">http://www.virt-manager.org/</url>
+ <url type="bugtracker">https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools&amp;component=virt-manager</url>
+ <update_contact>virt-tools-list@redhat.com</update_contact>
+ <translation type="gettext">virt-manager</translation>
+</component>
diff --git a/setup.py b/setup.py
index 4d57e788..d1c9a56e 100755
--- a/setup.py
+++ b/setup.py
@@ -24,6 +24,14 @@ sysprefix = distutils.sysconfig.get_config_var("prefix")
# pylint: disable=attribute-defined-outside-init
+_desktop_files = [
+ ("share/applications", ["data/virt-manager.desktop.in"]),
+]
+_appdata_files = [
+ ("share/appdata", ["data/virt-manager.appdata.xml.in"]),
+]
+
+
def _generate_potfiles_in():
def find(dirname, ext):
ret = []
@@ -42,8 +50,12 @@ def _generate_potfiles_in():
potfiles += "\n".join(find("virtconv", "*.py")) + "\n\n"
potfiles += "\n".join(find("virtinst", "*.py")) + "\n\n"
+ for ignore, filelist in _desktop_files + _appdata_files:
+ potfiles += "\n".join(filelist) + "\n"
+ potfiles += "\n"
+
potfiles += "\n".join(["[type: gettext/glade]" + f for
- f in find("ui", "*.ui")])
+ f in find("ui", "*.ui")]) + "\n\n"
return potfiles
@@ -75,13 +87,8 @@ class my_build_i18n(distutils.command.build.build):
def _run(self):
# Borrowed from python-distutils-extra
- desktop_files = [
- ("share/applications", ["data/virt-manager.desktop.in"]),
- ("share/appdata", ["data/virt-manager.appdata.xml"]),
- ]
po_dir = "po"
-
# Update po(t) files and print a report
# We have to change the working dir to the po dir for intltool
cmd = ["intltool-update",
@@ -112,7 +119,8 @@ class my_build_i18n(distutils.command.build.build):
self.distribution.data_files.append((targetpath, (mo_file,)))
# merge .in with translation
- for (file_set, switch) in [(desktop_files, "-d")]:
+ for (file_set, switch) in [(_desktop_files, "-d"),
+ (_appdata_files, "-x")]:
for (target, files) in file_set:
build_target = os.path.join("build", target)
if not os.path.exists(build_target):