diff --git a/locales/en.json b/locales/en.json index 7633ad681..f949d3a5c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -126,7 +126,7 @@ "service_no_log" : "No log to display for service '{:s}'", "service_cmd_exec_failed" : "Unable to execute command '{:s}'", "services_configured": "Configuration successfully generated", - "service_configuration_conflict": "The file {file:s} has been changed since its last generation. Please apply the modifications manually or use the option --force (it will erase all the modifications previously done to the file).", + "service_configuration_conflict": "The file {file:s} has been changed since its last generation. Please apply the modifications manually or use 'sudo yunohost service regenconf --force --service {service:s}' (it will erase all the modifications previously done to the file).", "no_such_conf_file": "Unable to copy the file {file:s}: the file does not exist", "service_add_configuration": "Adding the configuration file {file:s}", "show_diff": "Here are the differences:\n{diff:s}", diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 4cedfb35e..55df025c7 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -472,7 +472,7 @@ def service_saferemove(service, conf_file, force=False): os.remove(conf_backup_file) if len(previous_hash) == 32 or previous_hash[-32:] != current_hash: logger.warning(m18n.n('service_configuration_conflict', - file=conf_file)) + file=conf_file, service=service)) _save_services(services) @@ -539,7 +539,7 @@ def service_safecopy(service, new_conf_file, conf_file, force=False): new_hash = previous_hash if (len(previous_hash) == 32 or previous_hash[-32:] != current_hash): logger.warning('{0} {1}'.format( - m18n.n('service_configuration_conflict', file=conf_file), + m18n.n('service_configuration_conflict', file=conf_file, service=service), m18n.n('show_diff', diff=''.join(diff)))) # Remove the backup file if the configuration has not changed