Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Stale / undefined i18n strings #793

Merged
merged 2 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"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_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_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.",
Expand All @@ -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_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_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_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",
Expand All @@ -51,6 +49,7 @@
"app_upgrade_failed": "Could not upgrade {app:s}",
"app_upgrade_some_app_failed": "Some applications could not be 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_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.",
Expand All @@ -75,7 +74,6 @@
"ask_password": "Password",
"ask_path": "Path",
"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_app_failed": "Could not back up the app '{app:s}'",
"backup_applying_method_borg": "Sending all files to backup into borg-backup repository…",
Expand All @@ -84,7 +82,6 @@
"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_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_unknown": "Unknown local backup archive named '{name:s}'",
"backup_archive_open_failed": "Could not open the backup archive",
Expand All @@ -97,16 +94,13 @@
"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_created": "Backup created",
"backup_creating_archive": "Creating 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_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_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_deleted": "Backup deleted",
"backup_extracting_archive": "Extracting backup archive…",
"backup_hook_unknown": "The backup hook '{hook:s}' is unknown",
"backup_invalid_archive": "This is not a backup archive",
"backup_method_borg_finished": "Backup into Borg finished",
Expand Down Expand Up @@ -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_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_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_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",
Expand All @@ -158,12 +151,10 @@
"diagnosis_debian_version_error": "Could not retrieve the Debian version: {error}",
"diagnosis_kernel_version_error": "Could not retrieve kernel version: {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_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_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_cert_gen_failed": "Could not generate certificate",
"domain_created": "Domain created",
Expand All @@ -172,15 +163,11 @@
"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_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_exists": "The domain already exists",
"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_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:",
"done": "Done",
"downloading": "Downloading…",
Expand All @@ -194,6 +181,7 @@
"dyndns_key_generating": "Generating DNS key… It may take a while.",
"dyndns_key_not_found": "DNS key not found for the domain",
"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_registration_failed": "Could not register DynDNS domain: {error:s}",
"dyndns_domain_not_provided": "DynDNS provider {provider:s} cannot provide domain {domain:s}.",
Expand All @@ -210,7 +198,6 @@
"firewall_reload_failed": "Could not reload the firewall",
"firewall_reloaded": "Firewall reloaded",
"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_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}",
Expand Down Expand Up @@ -240,7 +227,6 @@
"group_deleted": "Group '{group}' deleted",
"group_deletion_failed": "Could not delete the group '{group}'",
"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_updated": "Group '{group}' updated",
"group_update_failed": "Could not update the group '{group}'",
Expand All @@ -251,7 +237,6 @@
"hook_name_unknown": "Unknown hook name '{name:s}'",
"installation_complete": "Installation complete",
"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",
"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}'",
Expand Down Expand Up @@ -403,24 +388,18 @@
"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_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_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}'",
"operation_interrupted": "The operation was manually interrupted?",
"package_not_installed": "Package '{pkgname}' is not installed",
"package_unexpected_error": "An unexpected error occurred processing the 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",
"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_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_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_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)",
Expand Down Expand Up @@ -468,7 +447,6 @@
"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_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_app_failed": "Could not restore the app '{app:s}'",
"restore_cleaning_failed": "Could not clean up the temporary restoration directory",
Expand All @@ -478,7 +456,6 @@
"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_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_nothings_done": "Nothing was restored",
"restore_removing_tmp_dir_failed": "Could not remove an old temporary directory",
Expand Down Expand Up @@ -530,7 +507,6 @@
"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_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_stopped": "'{service:s}' service stopped",
"service_unknown": "Unknown service '{service:s}'",
Expand Down
6 changes: 3 additions & 3 deletions src/yunohost/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

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_path = app_setting(app, "path")
Expand Down Expand Up @@ -590,7 +590,7 @@ def app_upgrade(app=[], url=None, file=None):
try:
app_list()
except YunohostError:
raise YunohostError('app_no_upgrade')
raise YunohostError('apps_already_up_to_date')

not_upgraded_apps = []

Expand All @@ -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())

if len(apps) == 0:
raise YunohostError('app_no_upgrade')
raise YunohostError('apps_already_up_to_date')
if len(apps) > 1:
logger.info(m18n.n("app_upgrade_several_apps", apps=", ".join(apps)))

Expand Down
7 changes: 2 additions & 5 deletions src/yunohost/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,7 @@ def tools_upgrade(operation_logger, apps=None, system=False):

upgradable_apps = [app["id"] for app in _list_upgradable_apps()]

if not upgradable_apps:
logger.info(m18n.n("app_no_upgrade"))
return
elif len(apps) and all(app not in upgradable_apps for app in apps):
if not upgradable_apps or (len(apps) and all(app not in upgradable_apps for app in apps)):
logger.info(m18n.n("apps_already_up_to_date"))
return

Expand Down Expand Up @@ -657,7 +654,7 @@ def tools_upgrade(operation_logger, apps=None, system=False):
)
returncode = call_async_output(dist_upgrade, callbacks, shell=True)
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))
operation_logger.error(m18n.n('packages_upgrade_failed'))
raise YunohostError(m18n.n('packages_upgrade_failed'))
Expand Down
Loading