onedriveClient icon indicating copy to clipboard operation
onedriveClient copied to clipboard

Change hard-coded logs to translated.

Open derrix060 opened this issue 7 years ago • 7 comments

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

derrix060 avatar Oct 01 '18 08:10 derrix060

How can this be done with docstrings, and should this be done for when errors are raised?

modelmat avatar Oct 03 '18 02:10 modelmat

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.

derrix060 avatar Oct 03 '18 06:10 derrix060

So for raised errors too?

modelmat avatar Oct 03 '18 06:10 modelmat

Yes. All messages that a normal user can view...

derrix060 avatar Oct 03 '18 08:10 derrix060

Do you want to work on this one? I can assign it for you

derrix060 avatar Oct 03 '18 08:10 derrix060

yes, I am working on it too.

modelmat avatar Oct 03 '18 08:10 modelmat

Ah fudge. Reinstalled linux and accidentally deleted all my hours of progress... oh well.

modelmat avatar Oct 10 '18 12:10 modelmat