Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Change hard-coded logs to translated. #24

Open
derrix060 opened this issue Oct 1, 2018 · 7 comments
Open

Change hard-coded logs to translated. #24

derrix060 opened this issue Oct 1, 2018 · 7 comments

Comments

@derrix060
Copy link
Owner

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

@modelmat
Copy link
Collaborator

modelmat commented Oct 3, 2018

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

@derrix060
Copy link
Owner Author

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.

@modelmat
Copy link
Collaborator

modelmat commented Oct 3, 2018

So for raised errors too?

@derrix060
Copy link
Owner Author

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

@derrix060
Copy link
Owner Author

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

@modelmat
Copy link
Collaborator

modelmat commented Oct 3, 2018

yes, I am working on it too.

@modelmat
Copy link
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants