YunoHost / issues

General issue tracker for the YunoHost project
72 stars 8 forks source link

Please fix "Failed to format translated string 'backup_applying_method_custom'" #2406

Open olberger opened 4 months ago

olberger commented 4 months ago

Whenever testing backups with something like sudo yunohost backup create -n auto_monitorix --method borg_app --apps monitorix one sees messages in the form of:

Warning: Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'…' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Warning: Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'…' with arguments '()' and '{}', raising  error: KeyError('method') (don't panic this is just a warning)

and:

Warning: Failed to format translated string 'backup_method_custom_finished': 'Custom backup method '{method}' finished' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Warning: Failed to format translatable string 'backup_method_custom_finished': 'Custom backup method '{method}' finished' with arguments '()' and '{}', raising  error: KeyError('method') (don't panic this is just a warning)

AFAIU, this is located in https://github.com/YunoHost/yunohost/blob/06dc3da3f4095d32b2846461e848be197f74da38/src/backup.py#L769 where one arg would be missing in the messages...

This isn't such a big deal, but additional useless messages in trying to debug backups (failing ones ;) won't help anyone, so the less clutter there is on the console, the better.

I'm running:

yunohost --version
yunohost: 
  repo: stable
  version: 11.2.12
yunohost-admin: 
  repo: stable
  version: 11.2.6
moulinette: 
  repo: stable
  version: 11.2.1
ssowat: 
  repo: stable
  version: 11.2.1.1

Thanks in advance.

olberger commented 4 months ago

Maybe that makes no sense to have an additional {method} parameter in the message, since the method is custom, which is already in the message key ?