Code review comment for lp:~dreis-pt/contract-management/7.0-project_sla-dr

Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

> > project_sla/project_sla_control.py:104:17: Xml Tag Has Empty Body
> > project_sla/project_sla_control.py:104:17: Xml Tag Has Empty Body
> > project_sla/project_sla_control.py:65:20: _description not translated
> > project_sla/project_sla_control.py:292:20: _description not translated
>
> Hmm, didn't find XML tags on those .py files, and I found the translation
> strings in the .pot file. Can you check this again?
>
Sorry, copy Paste error.
project_sla/project_sla_demo.xml:104:17: Xml Tag Has Empty Body
project_sla/project_sla_demo.xml:127:17: Xml Tag Has Empty Body

As for translating _description, if it's not done here (_description = _('...')), then it won't be translated in python code (ex: mail_thread widget -- though that one has a soon-to-be-fixed bug too https://bugs.launchpad.net/openobject-addons/+bug/1262000).
Essentially if you invoke _(self.pool.get('project.sla')._description), it will not check the pot file because it doesn't include the following for 'SLA Definition':
#, python-format

> > Out of curiosity, I noticed that you're using CamelCase for your class
> names,
> > is there a reason for that?
>
> I'm using it because [PEP8](http://www.python.org/dev/peps/pep-0008/#class-
> names) states that "class names should normally use the CapWords convention",
> and I don't any reason to not follow it.

Glad to hear that. I think I'll start using that convention too.

« Back to merge proposal