onedriveClient
onedriveClient copied to clipboard
Change hard-coded logs to translated.
This is not something urgent but will be good once the project starts to get big. The idea is to use the pre-existent translate method. Example:
How it is:
def add_watch(self, repo, local_abspath):
logging.debug('Adding watcher for "%s"', local_abspath)
How should be:
def add_watch(self, repo, local_abspath):
logging.debug(translator['od_watcher.add_watch.add_watch.log']', local_abspath)
To see more examples, search for translator on od_pref.py
How can this be done with docstrings, and should this be done for when errors are raised?
I don't think it should be done with docstrings. Docstrings are for developers only, and I think should be in English. These messages are for loggings and errors.
So for raised errors too?
Yes. All messages that a normal user can view...
Do you want to work on this one? I can assign it for you
yes, I am working on it too.
Ah fudge. Reinstalled linux and accidentally deleted all my hours of progress... oh well.