mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Merge branch 'metainfo' of https://github.com/qykth-git/calibre
This commit is contained in:
commit
ae09f4bacc
@ -1217,7 +1217,7 @@ def make_appdata_releases():
|
|||||||
# Formatting of release description tries to resemble that of
|
# Formatting of release description tries to resemble that of
|
||||||
# https://calibre-ebook.com/whats-new while taking into account the limits imposed by
|
# https://calibre-ebook.com/whats-new while taking into account the limits imposed by
|
||||||
# https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description
|
# https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description
|
||||||
description = E.description('{http://www.w3.org/XML/1998/namespace}lang', 'en')
|
description = E.description(**{'{http://www.w3.org/XML/1998/namespace}lang': 'en'})
|
||||||
if 'new features' in revision:
|
if 'new features' in revision:
|
||||||
description.append(E.p('New features:'))
|
description.append(E.p('New features:'))
|
||||||
description.append(E.ol(
|
description.append(E.ol(
|
||||||
@ -1261,8 +1261,7 @@ def write_appdata(key, entry, base, translators):
|
|||||||
for lang, t in iteritems(translators):
|
for lang, t in iteritems(translators):
|
||||||
tp = t.gettext(para)
|
tp = t.gettext(para)
|
||||||
if tp != para:
|
if tp != para:
|
||||||
description.append(E.p(tp))
|
description.append(E.p(tp, **{'{http://www.w3.org/XML/1998/namespace}lang': lang}))
|
||||||
description[-1].set('{http://www.w3.org/XML/1998/namespace}lang', lang)
|
|
||||||
|
|
||||||
root = E.component(
|
root = E.component(
|
||||||
E.id(key + '.desktop'),
|
E.id(key + '.desktop'),
|
||||||
@ -1287,8 +1286,7 @@ def write_appdata(key, entry, base, translators):
|
|||||||
for lang, t in iteritems(translators):
|
for lang, t in iteritems(translators):
|
||||||
tp = t.gettext(entry['summary'])
|
tp = t.gettext(entry['summary'])
|
||||||
if tp != entry['summary']:
|
if tp != entry['summary']:
|
||||||
root.append(E.summary(tp))
|
root.append(E.summary(tp, **{'{http://www.w3.org/XML/1998/namespace}lang': lang}))
|
||||||
root[-1].set('{http://www.w3.org/XML/1998/namespace}lang', lang)
|
|
||||||
if entry.get('include-releases', False):
|
if entry.get('include-releases', False):
|
||||||
try:
|
try:
|
||||||
root.append(make_appdata_releases())
|
root.append(make_appdata_releases())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user