mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
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
This commit is contained in:
parent
40e0354631
commit
cf3a1cc1f0
@ -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>
|
35
data/virt-manager.appdata.xml.in
Normal file
35
data/virt-manager.appdata.xml.in
Normal file
@ -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&component=virt-manager</url>
|
||||
<update_contact>virt-tools-list@redhat.com</update_contact>
|
||||
<translation type="gettext">virt-manager</translation>
|
||||
</component>
|
22
setup.py
22
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):
|
||||
|
Loading…
Reference in New Issue
Block a user