Merge pull request #793 from YunoHost/fix-stale-i18n-strings

[fix] Stale / undefined i18n strings
This commit is contained in:
Alexandre Aubin 2019-09-22 12:58:57 +02:00 committed by GitHub
commit 7149fb5a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 44 deletions

View file

@ -14,7 +14,6 @@
"app_argument_choice_invalid": "Use one of these choices '{choices:s}' for the argument '{name:s}'", "app_argument_choice_invalid": "Use one of these choices '{choices:s}' for the argument '{name:s}'",
"app_argument_invalid": "Pick a valid value for the argument '{name:s}': {error:s}", "app_argument_invalid": "Pick a valid value for the argument '{name:s}': {error:s}",
"app_argument_required": "Argument '{name:s}' is required", "app_argument_required": "Argument '{name:s}' is required",
"app_change_no_change_url_script": "The application {app_name:s} doesn't support changing its URL yet, you might need to upgrade it.",
"app_change_url_failed_nginx_reload": "Could not reload NGINX. Here is the output of 'nginx -t':\n{nginx_errors:s}", "app_change_url_failed_nginx_reload": "Could not reload NGINX. Here is the output of 'nginx -t':\n{nginx_errors:s}",
"app_change_url_identical_domains": "The old and new domain/url_path are identical ('{domain:s}{path:s}'), nothing to do.", "app_change_url_identical_domains": "The old and new domain/url_path are identical ('{domain:s}{path:s}'), nothing to do.",
"app_change_url_no_script": "This application '{app_name:s}' doesn't support URL modification yet. Maybe you should upgrade it.", "app_change_url_no_script": "This application '{app_name:s}' doesn't support URL modification yet. Maybe you should upgrade it.",
@ -28,7 +27,6 @@
"app_location_install_failed": "Cannot install the app there because it conflicts with the app '{other_app}' already installed in '{other_path}'", "app_location_install_failed": "Cannot install the app there because it conflicts with the app '{other_app}' already installed in '{other_path}'",
"app_location_unavailable": "This URL is either unavailable, or conflicts with the already installed app(s):\n{apps:s}", "app_location_unavailable": "This URL is either unavailable, or conflicts with the already installed app(s):\n{apps:s}",
"app_manifest_invalid": "Something is wrong with the app manifest: {error}", "app_manifest_invalid": "Something is wrong with the app manifest: {error}",
"app_no_upgrade": "All applications are already up-to-date",
"app_not_upgraded": "The app '{failed_app}' failed to upgrade, and as a consequence the following apps upgrades have been cancelled: {apps}", "app_not_upgraded": "The app '{failed_app}' failed to upgrade, and as a consequence the following apps upgrades have been cancelled: {apps}",
"app_upgrade_stopped": "The upgrade of all applications has been stopped to prevent possible damage because the previous application failed to upgrade", "app_upgrade_stopped": "The upgrade of all applications has been stopped to prevent possible damage because the previous application failed to upgrade",
"app_not_correctly_installed": "{app:s} seems to be incorrectly installed", "app_not_correctly_installed": "{app:s} seems to be incorrectly installed",
@ -51,6 +49,7 @@
"app_upgrade_failed": "Could not upgrade {app:s}", "app_upgrade_failed": "Could not upgrade {app:s}",
"app_upgrade_some_app_failed": "Some applications could not be upgraded", "app_upgrade_some_app_failed": "Some applications could not be upgraded",
"app_upgraded": "{app:s} upgraded", "app_upgraded": "{app:s} upgraded",
"apps_already_up_to_date": "All applications are already up-to-date",
"apps_permission_not_found": "No permission found for the installed apps", "apps_permission_not_found": "No permission found for the installed apps",
"apps_permission_restoration_failed": "Grant the permission permission '{permission:s}' to restore {app:s}", "apps_permission_restoration_failed": "Grant the permission permission '{permission:s}' to restore {app:s}",
"appslist_corrupted_json": "Could not load the application lists. It looks like {filename:s} is damaged.", "appslist_corrupted_json": "Could not load the application lists. It looks like {filename:s} is damaged.",
@ -75,7 +74,6 @@
"ask_password": "Password", "ask_password": "Password",
"ask_path": "Path", "ask_path": "Path",
"backup_abstract_method": "This backup method has yet to be implemented", "backup_abstract_method": "This backup method has yet to be implemented",
"backup_action_required": "You must specify something to save",
"backup_actually_backuping": "Creating a backup archive from the collected files…", "backup_actually_backuping": "Creating a backup archive from the collected files…",
"backup_app_failed": "Could not back up the app '{app:s}'", "backup_app_failed": "Could not back up the app '{app:s}'",
"backup_applying_method_borg": "Sending all files to backup into borg-backup repository…", "backup_applying_method_borg": "Sending all files to backup into borg-backup repository…",
@ -84,7 +82,6 @@
"backup_applying_method_tar": "Creating the backup TAR archive…", "backup_applying_method_tar": "Creating the backup TAR archive…",
"backup_archive_app_not_found": "Could not find the app '{app:s}' in the backup archive", "backup_archive_app_not_found": "Could not find the app '{app:s}' in the backup archive",
"backup_archive_broken_link": "Could not access the backup archive (broken link to {path:s})", "backup_archive_broken_link": "Could not access the backup archive (broken link to {path:s})",
"backup_archive_mount_failed": "Could not mount the backup archive",
"backup_archive_name_exists": "A backup archive with this name already exists.", "backup_archive_name_exists": "A backup archive with this name already exists.",
"backup_archive_name_unknown": "Unknown local backup archive named '{name:s}'", "backup_archive_name_unknown": "Unknown local backup archive named '{name:s}'",
"backup_archive_open_failed": "Could not open the backup archive", "backup_archive_open_failed": "Could not open the backup archive",
@ -97,16 +94,13 @@
"backup_copying_to_organize_the_archive": "Copying {size:s}MB to organize the archive", "backup_copying_to_organize_the_archive": "Copying {size:s}MB to organize the archive",
"backup_couldnt_bind": "Could not bind {src:s} to {dest:s}.", "backup_couldnt_bind": "Could not bind {src:s} to {dest:s}.",
"backup_created": "Backup created", "backup_created": "Backup created",
"backup_creating_archive": "Creating the backup archive…",
"backup_creation_failed": "Could not create the backup archive", "backup_creation_failed": "Could not create the backup archive",
"backup_csv_addition_failed": "Could not add files to backup into the CSV file", "backup_csv_addition_failed": "Could not add files to backup into the CSV file",
"backup_csv_creation_failed": "Could not create the CSV file needed for restoration", "backup_csv_creation_failed": "Could not create the CSV file needed for restoration",
"backup_custom_backup_error": "Custom backup method could not get past the 'backup' step", "backup_custom_backup_error": "Custom backup method could not get past the 'backup' step",
"backup_custom_mount_error": "Custom backup method could not get past the 'mount' step", "backup_custom_mount_error": "Custom backup method could not get past the 'mount' step",
"backup_custom_need_mount_error": "Custom backup method could not get past 'need_mount' step",
"backup_delete_error": "Could not delete '{path:s}'", "backup_delete_error": "Could not delete '{path:s}'",
"backup_deleted": "Backup deleted", "backup_deleted": "Backup deleted",
"backup_extracting_archive": "Extracting backup archive…",
"backup_hook_unknown": "The backup hook '{hook:s}' is unknown", "backup_hook_unknown": "The backup hook '{hook:s}' is unknown",
"backup_invalid_archive": "This is not a backup archive", "backup_invalid_archive": "This is not a backup archive",
"backup_method_borg_finished": "Backup into Borg finished", "backup_method_borg_finished": "Backup into Borg finished",
@ -142,7 +136,6 @@
"certmanager_domain_cert_not_selfsigned": "The certificate for domain {domain:s} is not self-signed. Are you sure you want to replace it? (Use '--force' to do so.)", "certmanager_domain_cert_not_selfsigned": "The certificate for domain {domain:s} is not self-signed. Are you sure you want to replace it? (Use '--force' to do so.)",
"certmanager_domain_dns_ip_differs_from_public_ip": "The DNS 'A' record for the domain '{domain:s}' is different from this server IP. If you recently modified your A record, please wait for it to propagate (some DNS propagation checkers are available online). (If you know what you are doing, use '--no-checks' to turn off those checks.)", "certmanager_domain_dns_ip_differs_from_public_ip": "The DNS 'A' record for the domain '{domain:s}' is different from this server IP. If you recently modified your A record, please wait for it to propagate (some DNS propagation checkers are available online). (If you know what you are doing, use '--no-checks' to turn off those checks.)",
"certmanager_domain_http_not_working": "It seems the domain {domain:s} cannot be accessed through HTTP. Check that your DNS and NGINX configuration is correct", "certmanager_domain_http_not_working": "It seems the domain {domain:s} cannot be accessed through HTTP. Check that your DNS and NGINX configuration is correct",
"certmanager_domain_not_resolved_locally": "The domain {domain:s} cannot be resolved from inside your YunoHost server. This might happen if you recently modified your DNS record. If so, please wait a few hours for it to propagate. If the issue persists, consider adding {domain:s} to /etc/hosts. (If you know what you are doing, use '--no-checks' to turn off those checks.)",
"certmanager_domain_unknown": "Unknown domain '{domain:s}'", "certmanager_domain_unknown": "Unknown domain '{domain:s}'",
"certmanager_error_no_A_record": "No DNS 'A' record found for '{domain:s}'. You need to make your domain name point to your machine to be able to install a Let's Encrypt certificate. (If you know what you are doing, use '--no-checks' to turn off those checks.)", "certmanager_error_no_A_record": "No DNS 'A' record found for '{domain:s}'. You need to make your domain name point to your machine to be able to install a Let's Encrypt certificate. (If you know what you are doing, use '--no-checks' to turn off those checks.)",
"certmanager_hit_rate_limit": "Too many certificates already issued for this exact set of domains {domain:s} recently. Please try again later. See https://letsencrypt.org/docs/rate-limits/ for more details", "certmanager_hit_rate_limit": "Too many certificates already issued for this exact set of domains {domain:s} recently. Please try again later. See https://letsencrypt.org/docs/rate-limits/ for more details",
@ -158,12 +151,10 @@
"diagnosis_debian_version_error": "Could not retrieve the Debian version: {error}", "diagnosis_debian_version_error": "Could not retrieve the Debian version: {error}",
"diagnosis_kernel_version_error": "Could not retrieve kernel version: {error}", "diagnosis_kernel_version_error": "Could not retrieve kernel version: {error}",
"diagnosis_monitor_disk_error": "Could not monitor disks: {error}", "diagnosis_monitor_disk_error": "Could not monitor disks: {error}",
"diagnosis_monitor_network_error": "Could not monitor network: {error}",
"diagnosis_monitor_system_error": "Could not monitor system: {error}", "diagnosis_monitor_system_error": "Could not monitor system: {error}",
"diagnosis_no_apps": "No installed application", "diagnosis_no_apps": "No installed application",
"dpkg_is_broken": "You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running `sudo dpkg --configure -a`.", "dpkg_is_broken": "You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running `sudo dpkg --configure -a`.",
"dpkg_lock_not_available": "This command can't be ran right now because another program seems to be using the lock of dpkg (the system package manager)", "dpkg_lock_not_available": "This command can't be ran right now because another program seems to be using the lock of dpkg (the system package manager)",
"dnsmasq_isnt_installed": "Dnsmasq does not seem to be installed, please run 'apt-get remove bind9 && apt-get install it'",
"domain_cannot_remove_main": "Cannot remove main domain. Set one first", "domain_cannot_remove_main": "Cannot remove main domain. Set one first",
"domain_cert_gen_failed": "Could not generate certificate", "domain_cert_gen_failed": "Could not generate certificate",
"domain_created": "Domain created", "domain_created": "Domain created",
@ -172,15 +163,11 @@
"domain_deletion_failed": "Could not delete domain", "domain_deletion_failed": "Could not delete domain",
"domain_dns_conf_is_just_a_recommendation": "This command shows you the *recommended* configuration. It does not actually set up the DNS configuration for you. It is your responsability to configure your DNS zone in your registrar according to this recommendation.", "domain_dns_conf_is_just_a_recommendation": "This command shows you the *recommended* configuration. It does not actually set up the DNS configuration for you. It is your responsability to configure your DNS zone in your registrar according to this recommendation.",
"domain_dyndns_already_subscribed": "You have already subscribed to a DynDNS domain", "domain_dyndns_already_subscribed": "You have already subscribed to a DynDNS domain",
"domain_dyndns_dynette_is_unreachable": "Could not reach YunoHost dynette, either your YunoHost is not correctly connected to the Internet, or the dynette server is down. Error: {error}",
"domain_dyndns_invalid": "This domain can not be used with DynDNS",
"domain_dyndns_root_unknown": "Unknown DynDNS root domain", "domain_dyndns_root_unknown": "Unknown DynDNS root domain",
"domain_exists": "The domain already exists", "domain_exists": "The domain already exists",
"domain_hostname_failed": "Could not set new hostname. This might cause an issue later (it might be fine).", "domain_hostname_failed": "Could not set new hostname. This might cause an issue later (it might be fine).",
"domain_uninstall_app_first": "One or more apps are installed on this domain. Please uninstall them before proceeding to domain removal", "domain_uninstall_app_first": "One or more apps are installed on this domain. Please uninstall them before proceeding to domain removal",
"domain_unknown": "Unknown domain", "domain_unknown": "Unknown domain",
"domain_zone_exists": "DNS zone file already exists",
"domain_zone_not_found": "DNS zone file not found for domain {:s}",
"domains_available": "Available domains:", "domains_available": "Available domains:",
"done": "Done", "done": "Done",
"downloading": "Downloading…", "downloading": "Downloading…",
@ -194,6 +181,7 @@
"dyndns_key_generating": "Generating DNS key… It may take a while.", "dyndns_key_generating": "Generating DNS key… It may take a while.",
"dyndns_key_not_found": "DNS key not found for the domain", "dyndns_key_not_found": "DNS key not found for the domain",
"dyndns_no_domain_registered": "No domain registered with DynDNS", "dyndns_no_domain_registered": "No domain registered with DynDNS",
"dyndns_provider_unreachable": "Unable to reach Dyndns provider {provider}: either your YunoHost is not correctly connected to the internet or the dynette server is down.",
"dyndns_registered": "DynDNS domain registered", "dyndns_registered": "DynDNS domain registered",
"dyndns_registration_failed": "Could not register DynDNS domain: {error:s}", "dyndns_registration_failed": "Could not register DynDNS domain: {error:s}",
"dyndns_domain_not_provided": "DynDNS provider {provider:s} cannot provide domain {domain:s}.", "dyndns_domain_not_provided": "DynDNS provider {provider:s} cannot provide domain {domain:s}.",
@ -210,7 +198,6 @@
"firewall_reload_failed": "Could not reload the firewall", "firewall_reload_failed": "Could not reload the firewall",
"firewall_reloaded": "Firewall reloaded", "firewall_reloaded": "Firewall reloaded",
"firewall_rules_cmd_failed": "Some firewall rules commands have failed. More info in log.", "firewall_rules_cmd_failed": "Some firewall rules commands have failed. More info in log.",
"format_datetime_short": "%m/%d/%Y %I:%M %p",
"global_settings_bad_choice_for_enum": "Bad choice for setting {setting:s}, received '{choice:s}', but available choices are: {available_choices:s}", "global_settings_bad_choice_for_enum": "Bad choice for setting {setting:s}, received '{choice:s}', but available choices are: {available_choices:s}",
"global_settings_bad_type_for_setting": "Bad type for setting {setting:s}, received {received_type:s}, expected {expected_type:s}", "global_settings_bad_type_for_setting": "Bad type for setting {setting:s}, received {received_type:s}, expected {expected_type:s}",
"global_settings_cant_open_settings": "Could not open settings file, reason: {reason:s}", "global_settings_cant_open_settings": "Could not open settings file, reason: {reason:s}",
@ -240,7 +227,6 @@
"group_deleted": "Group '{group}' deleted", "group_deleted": "Group '{group}' deleted",
"group_deletion_failed": "Could not delete the group '{group}'", "group_deletion_failed": "Could not delete the group '{group}'",
"group_deletion_not_allowed": "The group {group:s} cannot be deleted manually.", "group_deletion_not_allowed": "The group {group:s} cannot be deleted manually.",
"group_info_failed": "Could not present group info",
"group_unknown": "The group '{group:s}' is unknown", "group_unknown": "The group '{group:s}' is unknown",
"group_updated": "Group '{group}' updated", "group_updated": "Group '{group}' updated",
"group_update_failed": "Could not update the group '{group}'", "group_update_failed": "Could not update the group '{group}'",
@ -251,7 +237,6 @@
"hook_name_unknown": "Unknown hook name '{name:s}'", "hook_name_unknown": "Unknown hook name '{name:s}'",
"installation_complete": "Installation complete", "installation_complete": "Installation complete",
"installation_failed": "Something went wrong with the installation", "installation_failed": "Something went wrong with the installation",
"invalid_url_format": "Something is wrong with the URL",
"ip6tables_unavailable": "You cannot play with ip6tables here. You are either in a container or your kernel does not support it", "ip6tables_unavailable": "You cannot play with ip6tables here. You are either in a container or your kernel does not support it",
"iptables_unavailable": "You cannot play with iptables here. You are either in a container or your kernel does not support it", "iptables_unavailable": "You cannot play with iptables here. You are either in a container or your kernel does not support it",
"log_corrupted_md_file": "The YAML metadata file associated with logs is damaged: '{md_file}\nError: {error}'", "log_corrupted_md_file": "The YAML metadata file associated with logs is damaged: '{md_file}\nError: {error}'",
@ -403,24 +388,18 @@
"network_check_mx_ko": "DNS MX record is not set", "network_check_mx_ko": "DNS MX record is not set",
"network_check_smtp_ko": "Outbound e-mail (SMTP port 25) seems to be blocked by your network", "network_check_smtp_ko": "Outbound e-mail (SMTP port 25) seems to be blocked by your network",
"network_check_smtp_ok": "Outbound e-mail (SMTP port 25) is not blocked", "network_check_smtp_ok": "Outbound e-mail (SMTP port 25) is not blocked",
"new_domain_required": "You must provide the new main domain",
"no_appslist_found": "No app list found",
"no_internet_connection": "Server not connected to the Internet", "no_internet_connection": "Server not connected to the Internet",
"no_ipv6_connectivity": "IPv6 connectivity is not available",
"no_restore_script": "No restore script found for the app '{app:s}'",
"not_enough_disk_space": "Not enough free space on '{path:s}'", "not_enough_disk_space": "Not enough free space on '{path:s}'",
"operation_interrupted": "The operation was manually interrupted?", "operation_interrupted": "The operation was manually interrupted?",
"package_not_installed": "Package '{pkgname}' is not installed", "package_not_installed": "Package '{pkgname}' is not installed",
"package_unexpected_error": "An unexpected error occurred processing the package '{pkgname}'", "package_unexpected_error": "An unexpected error occurred processing the package '{pkgname}'",
"package_unknown": "Unknown package '{pkgname}'", "package_unknown": "Unknown package '{pkgname}'",
"packages_upgrade_critical_later": "Critical packages ({packages:s}) will be upgraded later",
"packages_upgrade_failed": "Could not upgrade all the packages", "packages_upgrade_failed": "Could not upgrade all the packages",
"password_listed": "This password is among the most used password in the world. Please choose something more unique.", "password_listed": "This password is among the most used password in the world. Please choose something more unique.",
"password_too_simple_1": "The password needs to be at least 8 characters long", "password_too_simple_1": "The password needs to be at least 8 characters long",
"password_too_simple_2": "The password needs to be at least 8 characters long and contain a digit, upper and lower characters", "password_too_simple_2": "The password needs to be at least 8 characters long and contain a digit, upper and lower characters",
"password_too_simple_3": "The password needs to be at least 8 characters long and contain a digit, upper, lower and special characters", "password_too_simple_3": "The password needs to be at least 8 characters long and contain a digit, upper, lower and special characters",
"password_too_simple_4": "The password needs to be at least 12 characters long and contain a digit, upper, lower and special characters", "password_too_simple_4": "The password needs to be at least 12 characters long and contain a digit, upper, lower and special characters",
"path_removal_failed": "Could not remove path {:s}",
"pattern_backup_archive_name": "Must be a valid filename with max 30 characters, alphanumeric and -_. characters only", "pattern_backup_archive_name": "Must be a valid filename with max 30 characters, alphanumeric and -_. characters only",
"pattern_domain": "Must be a valid domain name (e.g. my-domain.org)", "pattern_domain": "Must be a valid domain name (e.g. my-domain.org)",
"pattern_email": "Must be a valid email address (e.g. someone@domain.org)", "pattern_email": "Must be a valid email address (e.g. someone@domain.org)",
@ -468,7 +447,6 @@
"regenconf_dry_pending_applying": "Checking pending configuration which would have been applied for category '{category}'…", "regenconf_dry_pending_applying": "Checking pending configuration which would have been applied for category '{category}'…",
"regenconf_failed": "Could not regenerate the configuration for category(s): {categories}", "regenconf_failed": "Could not regenerate the configuration for category(s): {categories}",
"regenconf_pending_applying": "Applying pending configuration for category '{category}'…", "regenconf_pending_applying": "Applying pending configuration for category '{category}'…",
"restore_action_required": "You must pick something to restore",
"restore_already_installed_app": "An app with the ID '{app:s}' is already installed", "restore_already_installed_app": "An app with the ID '{app:s}' is already installed",
"restore_app_failed": "Could not restore the app '{app:s}'", "restore_app_failed": "Could not restore the app '{app:s}'",
"restore_cleaning_failed": "Could not clean up the temporary restoration directory", "restore_cleaning_failed": "Could not clean up the temporary restoration directory",
@ -478,7 +456,6 @@
"restore_failed": "Could not restore system", "restore_failed": "Could not restore system",
"restore_hook_unavailable": "The restoration script for '{part:s}' not available on your system and not in the archive either", "restore_hook_unavailable": "The restoration script for '{part:s}' not available on your system and not in the archive either",
"restore_may_be_not_enough_disk_space": "Your system seems does not have enough space (free: {free_space:d} B, needed space: {needed_space:d} B, security margin: {margin:d} B)", "restore_may_be_not_enough_disk_space": "Your system seems does not have enough space (free: {free_space:d} B, needed space: {needed_space:d} B, security margin: {margin:d} B)",
"restore_mounting_archive": "Mounting archive into '{path:s}'",
"restore_not_enough_disk_space": "Not enough space (space: {free_space:d} B, needed space: {needed_space:d} B, security margin: {margin:d} B)", "restore_not_enough_disk_space": "Not enough space (space: {free_space:d} B, needed space: {needed_space:d} B, security margin: {margin:d} B)",
"restore_nothings_done": "Nothing was restored", "restore_nothings_done": "Nothing was restored",
"restore_removing_tmp_dir_failed": "Could not remove an old temporary directory", "restore_removing_tmp_dir_failed": "Could not remove an old temporary directory",
@ -530,7 +507,6 @@
"service_reloaded_or_restarted": "'{service:s}' service reloaded or restarted", "service_reloaded_or_restarted": "'{service:s}' service reloaded or restarted",
"service_start_failed": "Could not start the service '{service:s}'\n\nRecent service logs:{logs:s}", "service_start_failed": "Could not start the service '{service:s}'\n\nRecent service logs:{logs:s}",
"service_started": "'{service:s}' service started", "service_started": "'{service:s}' service started",
"service_status_failed": "Could not determine status of the service '{service:s}'",
"service_stop_failed": "Could not stop the service '{service:s}'\n\nRecent service logs:{logs:s}", "service_stop_failed": "Could not stop the service '{service:s}'\n\nRecent service logs:{logs:s}",
"service_stopped": "'{service:s}' service stopped", "service_stopped": "'{service:s}' service stopped",
"service_unknown": "Unknown service '{service:s}'", "service_unknown": "Unknown service '{service:s}'",

View file

@ -472,7 +472,7 @@ def app_change_url(operation_logger, app, domain, path):
raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id()) raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id())
if not os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "change_url")): if not os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "change_url")):
raise YunohostError("app_change_no_change_url_script", app_name=app) raise YunohostError("app_change_url_no_script", app_name=app)
old_domain = app_setting(app, "domain") old_domain = app_setting(app, "domain")
old_path = app_setting(app, "path") old_path = app_setting(app, "path")
@ -590,7 +590,7 @@ def app_upgrade(app=[], url=None, file=None):
try: try:
app_list() app_list()
except YunohostError: except YunohostError:
raise YunohostError('app_no_upgrade') raise YunohostError('apps_already_up_to_date')
not_upgraded_apps = [] not_upgraded_apps = []
@ -611,7 +611,7 @@ def app_upgrade(app=[], url=None, file=None):
raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id()) raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id())
if len(apps) == 0: if len(apps) == 0:
raise YunohostError('app_no_upgrade') raise YunohostError('apps_already_up_to_date')
if len(apps) > 1: if len(apps) > 1:
logger.info(m18n.n("app_upgrade_several_apps", apps=", ".join(apps))) logger.info(m18n.n("app_upgrade_several_apps", apps=", ".join(apps)))

View file

@ -584,10 +584,7 @@ def tools_upgrade(operation_logger, apps=None, system=False):
upgradable_apps = [app["id"] for app in _list_upgradable_apps()] upgradable_apps = [app["id"] for app in _list_upgradable_apps()]
if not upgradable_apps: if not upgradable_apps or (len(apps) and all(app not in upgradable_apps for app in apps)):
logger.info(m18n.n("app_no_upgrade"))
return
elif len(apps) and all(app not in upgradable_apps for app in apps):
logger.info(m18n.n("apps_already_up_to_date")) logger.info(m18n.n("apps_already_up_to_date"))
return return
@ -657,7 +654,7 @@ def tools_upgrade(operation_logger, apps=None, system=False):
) )
returncode = call_async_output(dist_upgrade, callbacks, shell=True) returncode = call_async_output(dist_upgrade, callbacks, shell=True)
if returncode != 0: if returncode != 0:
logger.warning('tools_upgrade_regular_packages_failed', logger.warning(m18n.n('tools_upgrade_regular_packages_failed'),
packages_list=', '.join(noncritical_packages_upgradable)) packages_list=', '.join(noncritical_packages_upgradable))
operation_logger.error(m18n.n('packages_upgrade_failed')) operation_logger.error(m18n.n('packages_upgrade_failed'))
raise YunohostError(m18n.n('packages_upgrade_failed')) raise YunohostError(m18n.n('packages_upgrade_failed'))

View file

@ -5,23 +5,37 @@ import glob
import json import json
import yaml import yaml
ignore = [ "service_description_",
"migration_description_",
"global_settings_setting_",
"password_too_simple_",
"password_listed",
"backup_method_",
"backup_applying_method_",
"confirm_app_install_",
"log_",
]
############################################################################### ###############################################################################
# Find used keys in python code # # Find used keys in python code #
############################################################################### ###############################################################################
# This regex matches « foo » in patterns like « m18n.n( "foo" » # This regex matches « foo » in patterns like « m18n.n( "foo" »
p = re.compile(r'm18n\.n\(\s*[\"\']([a-zA-Z1-9_]+)[\"\']') p1 = re.compile(r'm18n\.n\(\s*[\"\']([a-zA-Z0-9_]+)[\"\']')
p2 = re.compile(r'YunohostError\([\'\"]([a-zA-Z0-9_]+)[\'\"]')
python_files = glob.glob("/vagrant/yunohost/src/yunohost/*.py") python_files = glob.glob("../src/yunohost/*.py")
python_files.extend(glob.glob("/vagrant/yunohost/src/yunohost/utils/*.py")) python_files.extend(glob.glob("../src/yunohost/utils/*.py"))
python_files.append("/vagrant/yunohost/bin/yunohost") python_files.extend(glob.glob("../src/yunohost/data_migrations/*.py"))
python_files.append("../bin/yunohost")
python_keys = set() python_keys = set()
for python_file in python_files: for python_file in python_files:
with open(python_file) as f: content = open(python_file).read()
keys_in_file = p.findall(f.read()) for match in p1.findall(content):
for key in keys_in_file: python_keys.add(match)
python_keys.add(key) for match in p2.findall(content):
python_keys.add(match)
############################################################################### ###############################################################################
# Find keys used in actionmap # # Find keys used in actionmap #
@ -42,19 +56,20 @@ for _, category in actionmap.items():
actionmap_keys.add(argument["extra"]["password"]) actionmap_keys.add(argument["extra"]["password"])
if "ask" in argument["extra"]: if "ask" in argument["extra"]:
actionmap_keys.add(argument["extra"]["ask"]) actionmap_keys.add(argument["extra"]["ask"])
if "comment" in argument["extra"]:
actionmap_keys.add(argument["extra"]["comment"])
if "pattern" in argument["extra"]: if "pattern" in argument["extra"]:
actionmap_keys.add(argument["extra"]["pattern"][1]) actionmap_keys.add(argument["extra"]["pattern"][1])
if "help" in argument["extra"]: if "help" in argument["extra"]:
print argument["extra"]["help"] print argument["extra"]["help"]
# These keys are used but difficult to parse
actionmap_keys.add("admin_password") actionmap_keys.add("admin_password")
############################################################################### ###############################################################################
# Load en locale json keys # # Load en locale json keys #
############################################################################### ###############################################################################
en_locale_file = "/vagrant/yunohost/locales/en.json" en_locale_file = "../locales/en.json"
with open(en_locale_file) as f: with open(en_locale_file) as f:
en_locale_json = json.loads(f.read()) en_locale_json = json.loads(f.read())
@ -72,11 +87,15 @@ keys_defined_but_not_used = en_locale_keys.difference(used_keys)
if len(keys_used_but_not_defined) != 0: if len(keys_used_but_not_defined) != 0:
print "> Error ! Those keys are used in some files but not defined :" print "> Error ! Those keys are used in some files but not defined :"
for key in sorted(keys_used_but_not_defined): for key in sorted(keys_used_but_not_defined):
if any(key.startswith(i) for i in ignore):
continue
print " - %s" % key print " - %s" % key
if len(keys_defined_but_not_used) != 0: if len(keys_defined_but_not_used) != 0:
print "> Warning ! Those keys are defined but seems unused :" print "> Warning ! Those keys are defined but seems unused :"
for key in sorted(keys_defined_but_not_used): for key in sorted(keys_defined_but_not_used):
if any(key.startswith(i) for i in ignore):
continue
print " - %s" % key print " - %s" % key