[enh] Retrieve 'license' field from app manifest

This commit is contained in:
Jérôme Lebleu 2014-06-04 11:46:31 +02:00
parent 3815bb5557
commit e3f27e01e0
3 changed files with 8 additions and 0 deletions

6
app.py
View file

@ -175,6 +175,9 @@ def app_list(offset=None, limit=None, filter=None, raw=False):
'id': app_id,
'name': app_info['manifest']['name'],
'description': app_info['manifest']['description'],
# FIXME: Temporarly allow undefined license
'license': app_info['manifest'].get('license',
m18n.n('license_undefined')),
'installed': installed
})
i += 1
@ -209,6 +212,9 @@ def app_info(app, raw=False):
return {
'name': app_info['manifest']['name'],
'description': app_info['manifest']['description']['en'],
# FIXME: Temporarly allow undefined license
'license': app_info['manifest'].get('license',
m18n.n('license_undefined')),
#TODO: Add more infos
}

View file

@ -6,6 +6,7 @@
"installation_complete" : "Installation complete",
"installation_failed" : "Installation failed",
"license_undefined" : "undefined",
"no_appslist_found" : "No apps list found",
"custom_appslist_name_required" : "You must provide a name for your custom apps list",
"appslist_retrieve_error" : "Unable to retrieve the remote apps list",

View file

@ -6,6 +6,7 @@
"installation_complete" : "Installation terminée",
"installation_failed" : "Échec de l'installation",
"license_undefined" : "indéfinie",
"no_appslist_found" : "Aucune liste d'applications trouvée",
"custom_appslist_name_required" : "Vous devez spécifier un nom pour votre liste d'applications personnalisée",
"appslist_retrieve_error" : "Impossible de récupérer la liste d'applications distante",