Merge lp:~adiroiban/launchpad/bug-512307 into lp:launchpad
Proposed by
Adi Roiban
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~adiroiban/launchpad/bug-512307 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
246 lines (+111/-19) 5 files modified
lib/lp/translations/browser/language.py (+26/-3) lib/lp/translations/browser/tests/language-views.txt (+73/-7) lib/lp/translations/stories/standalone/xx-pofile-details.txt (+4/-3) lib/lp/translations/templates/language-portlet-top-contributors.pt (+2/-2) lib/lp/translations/templates/pofile-details.pt (+6/-4) |
||||
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-512307 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+20442@code.launchpad.net |
Commit message
Filter merge accounts from overall language contributors.
To post a comment you must log in.
= Bug 512307= /translations. launchpad. net/+languages/ st we can see that Leonardo Gregianin appears twice, one with this current account (leogregianin) and an old merged one, (leogregianin- merged.
On https:/
We should not show merged accounts.
In bug 121520 , we fixed some placed where merged accounts were displayed, but missed language- portlet- top-contributor s.pt
== Proposed fix ==
Only show top 20 contributors and if we have a merged account in the top, replace it with the target account.
== Pre-implementation notes ==
My initial proposed fix was to just filter the merge account, but since by doing this we will no longer have a top 20, Jeroen asked to replace merged account with they target.
== Implementation details ==
Top contributors for a language, depends on the full contributors list and this is generated by cronjobs that compute the KarmaCache tables. I talked with Danilo and for writing the tests he suggest to fake the generation of language contributors.
In lib/lp/ translations/ templates/ pofile- details. pt I have done a small cleanup for my fix for bug 121520, since for merged account it generates empty <li> tags.
== Tests ==
lp-test -t language-views -t pofile-details
== Demo and Q/A ==
Since overall language statistics depends on KarmaCache and user preferences it is hard to test it on a local branch.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ browser/ language. py translations/ browser/ tests/language- views.txt translations/ stories/ standalone/ xx-pofile- details. txt translations/ templates/ language- portlet- top-contributor s.pt translations/ templates/ pofile- details. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/