diff --git a/app.py b/app.py index 214101ee9..0318ad9f7 100644 --- a/app.py +++ b/app.py @@ -55,7 +55,7 @@ def app_listlists(): if '.json' in filename: list_list.append(filename[:len(filename)-5]) except OSError: - raise MoulinetteError(1, m18n.n('no_list_found')) + raise MoulinetteError(1, m18n.n('no_appslist_found')) return { 'lists' : list_list } @@ -79,12 +79,12 @@ def app_fetchlist(url=None, name=None): else: if name is None: raise MoulinetteError(errno.EINVAL, - m18n.n('custom_list_name_required')) + m18n.n('custom_appslist_name_required')) list_file = '%s/%s.json' % (repo_path, name) if os.system('wget "%s" -O "%s.tmp"' % (url, list_file)) != 0: os.remove('%s.tmp' % list_file) - raise MoulinetteError(errno.EBADR, m18n.n('list_retrieve_error')) + raise MoulinetteError(errno.EBADR, m18n.n('appslist_retrieve_error')) # Rename fetched temp list os.rename('%s.tmp' % list_file, list_file) @@ -92,7 +92,7 @@ def app_fetchlist(url=None, name=None): os.system("touch /etc/cron.d/yunohost-applist-%s" % name) os.system("echo '00 00 * * * root yunohost app fetchlist -u %s -n %s > /dev/null 2>&1' >/etc/cron.d/yunohost-applist-%s" % (url, name, name)) - msignals.display(m18n.n('list_fetched'), 'success') + msignals.display(m18n.n('appslist_fetched'), 'success') def app_removelist(name): @@ -107,9 +107,9 @@ def app_removelist(name): os.remove('%s/%s.json' % (repo_path, name)) os.remove("/etc/cron.d/yunohost-applist-%s" % name) except OSError: - raise MoulinetteError(errno.ENOENT, m18n.n('unknown_list')) + raise MoulinetteError(errno.ENOENT, m18n.n('appslist_unknown')) - msignals.display(m18n.n('list_removed'), 'success') + msignals.display(m18n.n('appslist_removed'), 'success') def app_list(offset=None, limit=None, filter=None, raw=False): diff --git a/locales/en.json b/locales/en.json index fc61ac58f..f89bca680 100644 --- a/locales/en.json +++ b/locales/en.json @@ -6,12 +6,12 @@ "installation_complete" : "Installation complete", "installation_failed" : "Installation failed", - "no_list_found" : "No list found", - "custom_list_name_required" : "You must provide a name for your custom list", - "list_retrieve_error" : "Unable to retrieve the remote list", - "list_fetched" : "List successfully fetched", - "list_unknown" : "Unknown list", - "list_removed" : "List successfully removed", + "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", + "appslist_fetched" : "Apps list successfully fetched", + "appslist_unknown" : "Unknown apps list", + "appslist_removed" : "Apps list successfully removed", "app_unknown" : "Unknown app", "app_no_upgrade" : "No app to upgrade", "app_not_installed" : "%s is not installed",