← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~danilo/launchpad/translator_count_removal into lp:launchpad/devel

 

Данило Шеган has proposed merging lp:~danilo/launchpad/translator_count_removal into lp:launchpad/devel with lp:~danilo/launchpad/translatedlanguage as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


= Remove unused field =

DistroSeriesLanguage has a translator_count which is not used anywhere. Get rid of it.

There are neither any tests for it.

(there is a translator_count on IRosettaApplication which *is* used, so I am not getting rid of that)
-- 
https://code.launchpad.net/~danilo/launchpad/translator_count_removal/+merge/30931
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/translator_count_removal into lp:launchpad/devel.
=== modified file 'lib/lp/translations/interfaces/distroserieslanguage.py'
--- lib/lp/translations/interfaces/distroserieslanguage.py	2009-12-16 15:21:36 +0000
+++ lib/lp/translations/interfaces/distroserieslanguage.py	2010-07-26 12:26:20 +0000
@@ -35,9 +35,6 @@
         "language. This includes only the real pofiles where translations "
         "exist.")
 
-    translator_count = Attribute("The number of registered translators "
-        "for this language in the distribution.")
-
     contributor_count = Attribute("The number of contributors in total "
         "for this language in the distribution.")
 

=== modified file 'lib/lp/translations/model/distroserieslanguage.py'
--- lib/lp/translations/model/distroserieslanguage.py	2009-09-11 06:57:21 +0000
+++ lib/lp/translations/model/distroserieslanguage.py	2010-07-26 12:26:20 +0000
@@ -88,13 +88,6 @@
             distinct=True)
 
     @property
-    def translator_count(self):
-        translators = set()
-        for translator in self.translators:
-            translators = translators.union(translator.allmembers)
-        return len(translators)
-
-    @property
     def contributor_count(self):
         return self.contributorcount
 
@@ -156,7 +149,6 @@
         self.distroseries = distroseries
         self.messageCount = distroseries.messagecount
         self.dateupdated = datetime.now(tz=pytz.timezone('UTC'))
-        self.translator_count = 0
         self.contributor_count = 0
         self.title = '%s translations of %s %s' % (
             self.language.englishname,