← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~danilo/launchpad/pass-language-to-getdummy into lp:launchpad/devel

 

Данило Шеган has proposed merging lp:~danilo/launchpad/pass-language-to-getdummy into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


= Pass language directly to getDummyPOFile =

In most of our actual code where we use IPOTemplate.getDummyPOFile, we
already have an ILanguage and we pass in language.code to
getDummyPOFile.  Then getDummyPOFile refetches the language from the DB
thus doing a needless query.

Since this is an annoyance with what I am trying to do for
ITranslatedLanguage interface (make sure "pofiles" attribute always does
a single query), I've decided to split it out into separate branch and
fix it.

A few tests needed fixing, and I've added minimal documentation for the
method, and a minimal test.

I am only fixing getDummyPOFile, but other methods like newPOFile and
getPOFileByLang could use with a similar fix. For some other time,
though.

= Tests =

bin/test -cvvt getDummyPOFile -t doc.potemplate.txt

= Lint =

There's a million complaints from Curtis' new linter ("uses moin
headers" for every touched doctest, and a million line checks).  I am
not bothering with them right now because that should be *another*
branch, and I've already got side-tracked twice with pre-requisite
branches for what I am actually working on.
-- 
https://code.launchpad.net/~danilo/launchpad/pass-language-to-getdummy/+merge/30681
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/pass-language-to-getdummy into lp:launchpad/devel.



Follow ups