rendering 'info' list fields | better AUR 'optional deps' presentation

This commit is contained in:
Vinicius Moreira
2019-09-20 15:37:10 -03:00
parent b72590287d
commit 57e17c79d8
2 changed files with 12 additions and 2 deletions

View File

@@ -48,7 +48,12 @@ class InfoDialog(QDialog):
for idx, attr in enumerate(sorted(app.keys())):
if attr not in IGNORED_ATTRS and app[attr]:
i18n_key = app['__app__'].model.get_type() + '.info.' + attr.lower()
val = str(app[attr]).strip()
if isinstance(app[attr], list):
val = '\n'.join([str(e) for e in app[attr]])
else:
val = str(app[attr]).strip()
full_val = None
i18n_val = locale_keys.get('{}.{}'.format(i18n_key, val.lower()))