Hi Jeroen, Thanks for all the multiple drive-by's! r=me, but two thoughts. The first is general - is there not a better way to handle these translation credits so that they're not translatable messages at all? I guess not, otherwise you would have done it. Second thought: you said in your cover letter that "translations are made by persons, not teams", but translations are still displayed for other teams - just not the rosetta experts, is that right? (eg. http://pastebin.ubuntu.com/328399/), if so, why? (just for my understanding) > === modified file 'lib/lp/translations/browser/person.py' > --- lib/lp/translations/browser/person.py 2009-09-17 20:11:48 +0000 > +++ lib/lp/translations/browser/person.py 2009-11-26 10:47:06 +0000 > @@ -215,6 +215,8 @@ > @property > def person_is_translator(self): > """Is this person active in translations?""" > + if self.context.isTeam(): > + return False > person = ITranslationsPerson(self.context) > history = person.getTranslationHistory(self.history_horizon).any() > return history is not None > > === modified file 'lib/lp/translations/doc/pofile.txt' > --- lib/lp/translations/doc/pofile.txt 2009-10-29 17:46:00 +0000 > +++ lib/lp/translations/doc/pofile.txt 2009-11-26 10:47:06 +0000 > @@ -1031,8 +1031,17 @@ > The 'contributors' property of a POFile returns all the people who contributed > translations to it. > > - >>> [person.name for person in evolution_es.contributors] > - [u'carlos', u'mark', u'no-priv'] > + >>> def print_names(persons): > + ... """Print name for each of `persons`.""" > + ... for person in persons: > + ... print person.name > + ... print "--" > + > + >>> print_names(evolution_es.contributors) > + carlos > + mark > + no-priv > + -- > > If you have a distroseries and want to know all the people who contributed > translations on a given language for that distroseries, you can use > @@ -1042,9 +1051,16 @@ > >>> from lp.registry.model.distroseries import DistroSeries > >>> hoary = DistroSeries.selectOneBy(name="hoary") > >>> spanish = Language.selectOneBy(code="es") > - >>> [p.name for p in hoary.getPOFileContributorsByLanguage(spanish)] > - [u'jorge-gonzalez-gonzalez', u'carlos', u'valyag', u'danner', u'name16', > - u'name12', u'ubuntu-translators', u'tsukimi'] > + >>> print_names(hoary.getPOFileContributorsByLanguage(spanish)) > + jorge-gonzalez-gonzalez > + carlos > + valyag > + danner > + name16 > + name12 > + ubuntu-translators > + tsukimi > + -- > > # We can see that there is another translator that doesn't appear in > # previous list because the template he translated is not current. > @@ -1052,8 +1068,9 @@ > >>> non_current_pofile.potemplate.iscurrent > False > > - >>> [p.name for p in non_current_pofile.contributors] > - [u'jordi'] > + >>> print_names(non_current_pofile.contributors) > + jordi > + -- > > >>> non_current_pofile.potemplate.distroseries == hoary > True > @@ -1061,6 +1078,17 @@ > >>> non_current_pofile.language == spanish > True > > +The rosetta_experts team is special: it never shows up in contributors > +lists. > + > + >>> experts_pofile = factory.makePOFile('nl') > + >>> experts_message = factory.makeTranslationMessage( > + ... pofile=experts_pofile, translator=rosetta_experts, > + ... reviewer=rosetta_experts, translations=['hi']) > + > + >>> print_names(experts_pofile.contributors) > + -- > + > > == getPOTMsgSetTranslated == > > @@ -1191,7 +1219,6 @@ > Happy translator > Launchpad Contributions: > Carlos ... > - Rosetta Administrators... > > Emails of translators just has the dummy translation. > > @@ -1210,7 +1237,7 @@ > > >>> print alsa_translation.prepareTranslationCredits( > ... emails_of_translators) > - ,,