← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~henninge/launchpad/recife-rename-from-upstream into lp:~launchpad/launchpad/recife

 

Henning Eggers has proposed merging lp:~henninge/launchpad/recife-rename-from-upstream into lp:~launchpad/launchpad/recife.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


Rename TranslationImportQueueEntry.from_upstream to TranslationImportQueueEntry.by_maintainer. It was previously (6 months ago or so) renamed from is_published to from_upstream but the new name fits its purpose best.

-- 
https://code.launchpad.net/~henninge/launchpad/recife-rename-from-upstream/+merge/39980
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~henninge/launchpad/recife-rename-from-upstream into lp:~launchpad/launchpad/recife.
=== modified file 'lib/lp/soyuz/interfaces/sourcepackagerelease.py'
--- lib/lp/soyuz/interfaces/sourcepackagerelease.py	2010-09-06 10:40:54 +0000
+++ lib/lp/soyuz/interfaces/sourcepackagerelease.py	2010-11-03 15:48:52 +0000
@@ -194,13 +194,13 @@
         argument remains untouched.
         """
 
-    def attachTranslationFiles(tarball_alias, from_upstream, importer=None):
+    def attachTranslationFiles(tarball_alias, by_maintainer, importer=None):
         """Attach a tarball with translations to be imported into Rosetta.
 
         :tarball_alias: is a Librarian alias that references to a tarball with
             translations.
-        :from_upstream: indicates if the imported files are from an upstream
-            project.
+        :by_maintainer: indicates if the imported files where uploaded by
+            the maintainer of the project or package.
         :importer: is the person that did the import.
 
         raise DownloadFailed if we are not able to fetch the file from

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py	2010-09-06 10:40:54 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py	2010-11-03 15:48:52 +0000
@@ -592,7 +592,7 @@
 
         return change
 
-    def attachTranslationFiles(self, tarball_alias, from_upstream,
+    def attachTranslationFiles(self, tarball_alias, by_maintainer,
                                importer=None):
         """See ISourcePackageRelease."""
         tarball = tarball_alias.read()
@@ -603,7 +603,7 @@
         queue = getUtility(ITranslationImportQueue)
 
         queue.addOrUpdateEntriesFromTarball(
-            tarball, from_upstream, importer,
+            tarball, by_maintainer, importer,
             sourcepackagename=self.sourcepackagename,
             distroseries=self.upload_distroseries,
             filename_filter=_filter_ubuntu_translation_file)

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2010-10-18 16:36:46 +0000
+++ lib/lp/testing/factory.py	2010-11-03 15:48:52 +0000
@@ -2529,7 +2529,7 @@
                                         potemplate=None, content=None,
                                         uploader=None, pofile=None,
                                         format=None, status=None,
-                                        from_upstream=False):
+                                        by_maintainer=False):
         """Create a `TranslationImportQueueEntry`."""
         if path is None:
             path = self.getUniqueString() + '.pot'
@@ -2571,7 +2571,7 @@
             path=path, productseries=productseries, distroseries=distroseries,
             sourcepackagename=sourcepackagename, importer=uploader,
             content=content_reference, status=status, format=format,
-            from_upstream=from_upstream)
+            by_maintainer=by_maintainer)
 
     def makeMailingList(self, team, owner):
         """Create a mailing list for the team."""

=== modified file 'lib/lp/translations/browser/pofile.py'
--- lib/lp/translations/browser/pofile.py	2010-10-14 08:04:21 +0000
+++ lib/lp/translations/browser/pofile.py	2010-11-03 15:48:52 +0000
@@ -718,8 +718,8 @@
                 " recognised as a file that can be imported.")
             return
 
-        # Uploads on this form are never from upstream.
-        from_upstream = False
+        # Uploads on this form are never done by the maintainer.
+        by_maintainer = False
 
         if self.context.path is None:
             # The POFile is a dummy one, we use the filename as the path.
@@ -728,7 +728,7 @@
             path = self.context.path
         # Add it to the queue.
         translation_import_queue.addOrUpdateEntry(
-            path, content, from_upstream, self.user,
+            path, content, by_maintainer, self.user,
             sourcepackagename=self.context.potemplate.sourcepackagename,
             distroseries=self.context.potemplate.distroseries,
             productseries=self.context.potemplate.productseries,

=== modified file 'lib/lp/translations/browser/translationimportqueue.py'
--- lib/lp/translations/browser/translationimportqueue.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/browser/translationimportqueue.py	2010-11-03 15:48:52 +0000
@@ -507,10 +507,10 @@
             self.context.path = path
             # We got a path to store as the new one for the POFile.
             pofile.setPathIfUnique(path)
-        elif self.context.from_upstream:
-            # This entry comes from upstream, which means that the path we
-            # got is exactly the right one. If it's different from what
-            # pofile has, that would mean that either the entry changed
+        elif self.context.by_maintainer:
+            # This entry was uploaded by the maintainer, which means that the
+            # path we got is exactly the right one. If it's different from
+            # what pofile has, that would mean that either the entry changed
             # its path since previous upload or that we had to guess it
             # and now that we got the right path, we should fix it.
             pofile.setPathIfUnique(self.context.path)

=== modified file 'lib/lp/translations/doc/poexport-language-pack.txt'
--- lib/lp/translations/doc/poexport-language-pack.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/poexport-language-pack.txt	2010-11-03 15:48:52 +0000
@@ -183,9 +183,9 @@
 
     >>> en_US_xpi =  get_en_US_xpi_file_to_import('en-US')
     >>> translation_import_queue = getUtility(ITranslationImportQueue)
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> template_entry = translation_import_queue.addOrUpdateEntry(
-    ...     firefox_template.path, en_US_xpi.read(), from_upstream,
+    ...     firefox_template.path, en_US_xpi.read(), by_maintainer,
     ...     mark, distroseries=series, sourcepackagename=spn,
     ...     potemplate=firefox_template)
 
@@ -194,7 +194,7 @@
     >>> es_xpi = get_en_US_xpi_file_to_import('en-US')
     >>> firefox_es_translation = firefox_template.newPOFile('es')
     >>> translation_entry = translation_import_queue.addOrUpdateEntry(
-    ...     'es.xpi', es_xpi.read(), from_upstream,
+    ...     'es.xpi', es_xpi.read(), by_maintainer,
     ...     mark, distroseries=series, sourcepackagename=spn,
     ...     potemplate=firefox_template,
     ...     pofile=firefox_es_translation)

=== modified file 'lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt'
--- lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt	2010-11-03 15:48:52 +0000
@@ -62,7 +62,7 @@
 
     >>> pofile = potemplate.newPOFile('cy')
 
-And now, we import a .po file, as not coming from upstream, that lacks the
+And now, we import a .po file, not uploaded by the maintainer, that lacks the
 header 'X-Rosetta-Export-Date'. That header is the one that notes that the
 file comes from a previous export from Rosetta and when did it happen.
 
@@ -76,9 +76,9 @@
     ... msgid "foo"
     ... msgstr "blah"
     ... '''
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 
@@ -146,9 +146,9 @@
 
 Now, attach the file again, but this time as coming from upstream.
 
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 

=== modified file 'lib/lp/translations/doc/poimport-pofile-old-po-imported.txt'
--- lib/lp/translations/doc/poimport-pofile-old-po-imported.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/poimport-pofile-old-po-imported.txt	2010-11-03 15:48:52 +0000
@@ -77,9 +77,9 @@
     ... msgid "foo"
     ... msgstr "blah"
     ... ''' % datetime.datetime.now(UTC).isoformat()
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 
@@ -125,9 +125,9 @@
     ... msgid "foo"
     ... msgstr "blah"
     ... ''' % datetime.datetime.now(UTC).isoformat()
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 
@@ -186,11 +186,11 @@
     <BLANKLINE>
 
 Finally we are going to import the same po file with the old
-'PO-Revision-Date' field but mark it as a file coming from upstream.
+'PO-Revision-Date' field but mark it as a file uploaded by the maintainer.
 
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 

=== modified file 'lib/lp/translations/doc/poimport-pofile-syntax-error.txt'
--- lib/lp/translations/doc/poimport-pofile-syntax-error.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/poimport-pofile-syntax-error.txt	2010-11-03 15:48:52 +0000
@@ -73,9 +73,9 @@
     ... msgid "foo"
     ... msgstr blah"
     ... ''' % datetime.datetime.now(UTC).isoformat()
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
 
@@ -138,9 +138,9 @@
     ... msgid "\xa9 Yoyodine Industries"
     ... msgstr ""
     ... '''.encode('utf-8')
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate, pofile=pofile)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
     >>> transaction.commit()

=== modified file 'lib/lp/translations/doc/poimport-potemplate-syntax-error.txt'
--- lib/lp/translations/doc/poimport-potemplate-syntax-error.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/poimport-potemplate-syntax-error.txt	2010-11-03 15:48:52 +0000
@@ -58,9 +58,9 @@
     ... msgid "foo"
     ... msgstr ""
     ... '''
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     potemplate.path, potemplate_contents, from_upstream, person,
+    ...     potemplate.path, potemplate_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate)
     >>> transaction.commit()
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -120,9 +120,9 @@
     ... msgid "\xa9 Yoyodine Industries"
     ... msgstr ""
     ... '''.encode('utf-8')
-    >>> from_upstream = False
+    >>> by_maintainer = False
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     potemplate.path, potemplate_contents, from_upstream, person,
+    ...     potemplate.path, potemplate_contents, by_maintainer, person,
     ...     productseries=series, potemplate=potemplate)
     >>> transaction.commit()
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)

=== modified file 'lib/lp/translations/doc/poimport.txt'
--- lib/lp/translations/doc/poimport.txt	2010-10-19 03:14:46 +0000
+++ lib/lp/translations/doc/poimport.txt	2010-11-03 15:48:52 +0000
@@ -703,7 +703,7 @@
 Upstream import notifications
 -----------------------------
 
-Add an upstream POFile import (i.e. from a package or bzr branch),
+Add a maintainer POFile import (i.e. from a package or bzr branch),
 approve and import it.
 
     >>> pofile_contents = r'''
@@ -719,9 +719,9 @@
     ... msgstr "blah"
     ... '''
     >>> pofile = factory.makePOFile('sr', potemplate=potemplate)
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     distroseries=distroseries, sourcepackagename=sourcepackagename,
     ...     potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()
@@ -742,7 +742,7 @@
 
     >>> pofile_contents = pofile_contents[:-2]
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, from_upstream, person,
+    ...     pofile.path, pofile_contents, by_maintainer, person,
     ...     distroseries=distroseries, sourcepackagename=sourcepackagename,
     ...     potemplate=potemplate, pofile=pofile)
     >>> transaction.commit()

=== modified file 'lib/lp/translations/doc/rosetta-karma.txt'
--- lib/lp/translations/doc/rosetta-karma.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/rosetta-karma.txt	2010-11-03 15:48:52 +0000
@@ -51,9 +51,9 @@
 automatic imports from Ubuntu. In this case, we shouldn't give any kind
 of karma to that user.
 
-    >>> comes_from_upstream = True
+    >>> uploaded_by_maintainer = True
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     potemplate.path, potemplate_contents, comes_from_upstream,
+    ...     potemplate.path, potemplate_contents, uploaded_by_maintainer,
     ...     rosetta_experts, productseries=potemplate.productseries,
     ...     potemplate=potemplate)
 
@@ -88,7 +88,7 @@
 
     >>> potemplate = POTemplate.get(1)
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     potemplate.path, potemplate_contents, comes_from_upstream,
+    ...     potemplate.path, potemplate_contents, uploaded_by_maintainer,
     ...     foo_bar, productseries=potemplate.productseries,
     ...     potemplate=potemplate)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -144,7 +144,7 @@
 Do the import.
 
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, comes_from_upstream,
+    ...     pofile.path, pofile_contents, uploaded_by_maintainer,
     ...     rosetta_experts, productseries=potemplate.productseries,
     ...     potemplate=potemplate, pofile=pofile)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -171,7 +171,7 @@
     >>> potemplate = POTemplate.get(1)
     >>> pofile = potemplate.getPOFileByLang('es')
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, comes_from_upstream, foo_bar,
+    ...     pofile.path, pofile_contents, uploaded_by_maintainer, foo_bar,
     ...     productseries=potemplate.productseries, potemplate=potemplate,
     ...     pofile=pofile)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -208,7 +208,7 @@
     >>> potemplate = POTemplate.get(1)
     >>> pofile = potemplate.getPOFileByLang('es')
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, not comes_from_upstream, foo_bar,
+    ...     pofile.path, pofile_contents, not uploaded_by_maintainer, foo_bar,
     ...     productseries=potemplate.productseries, potemplate=potemplate,
     ...     pofile=pofile)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -240,7 +240,7 @@
     >>> potemplate = POTemplate.get(1)
     >>> pofile = potemplate.getPOFileByLang('es')
     >>> entry = translation_import_queue.addOrUpdateEntry(
-    ...     pofile.path, pofile_contents, not comes_from_upstream, foo_bar,
+    ...     pofile.path, pofile_contents, not uploaded_by_maintainer, foo_bar,
     ...     productseries=potemplate.productseries, potemplate=potemplate,
     ...     pofile=pofile)
     >>> entry.setStatus(RosettaImportStatus.APPROVED, rosetta_experts)
@@ -293,13 +293,13 @@
     >>> potmsgset = potemplate.getPOTMsgSetByMsgIDText(u'foo')
     >>> new_translations = {0: 'bar'}
     >>> fuzzy = False
-    >>> from_upstream = False
+    >>> by_maintainer = False
 
 And we can see as he won't get any karma activity from that, otherwise it'd be
 printed after the call to updateTranslationSet().
 
     >>> translationmessage = potmsgset.updateTranslation(
-    ...     pofile, no_priv, new_translations, from_upstream,
+    ...     pofile, no_priv, new_translations, by_maintainer,
     ...     lock_timestamp=datetime.datetime.now(UTC))
     >>> flush_database_caches()
 
@@ -314,7 +314,7 @@
     >>> pofile = potemplate.getPOFileByLang('es')
     >>> potmsgset = potemplate.getPOTMsgSetByMsgIDText(u'foo')
     >>> translationmessage = potmsgset.updateTranslation(
-    ...     pofile, no_priv, new_translations, from_upstream,
+    ...     pofile, no_priv, new_translations, by_maintainer,
     ...     lock_timestamp=datetime.datetime.now(UTC))
     Karma added: action=translationsuggestionadded, product=evolution
     >>> transaction.commit()
@@ -333,7 +333,7 @@
     >>> potmsgset = potemplate.getPOTMsgSetByMsgIDText(u'foo')
     >>> new_translations = {0: u'somethingelse'}
     >>> translationmessage = potmsgset.updateTranslation(
-    ...     pofile, kurem, new_translations, from_upstream,
+    ...     pofile, kurem, new_translations, by_maintainer,
     ...     lock_timestamp=datetime.datetime.now(UTC))
     Karma added: action=translationsuggestionapproved, product=evolution
     Karma added: action=translationreview, product=evolution
@@ -348,7 +348,7 @@
     >>> potmsgset = potemplate.getPOTMsgSetByMsgIDText(u'foo')
     >>> new_translations = {0: u'changed again'}
     >>> translationmessage = potmsgset.updateTranslation(
-    ...     pofile, kurem, new_translations, from_upstream,
+    ...     pofile, kurem, new_translations, by_maintainer,
     ...     lock_timestamp=datetime.datetime.now(UTC))
     Karma added: action=translationsuggestionapproved, product=evolution
     >>> transaction.commit()

=== modified file 'lib/lp/translations/doc/translationimportqueue.txt'
--- lib/lp/translations/doc/translationimportqueue.txt	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/doc/translationimportqueue.txt	2010-11-03 15:48:52 +0000
@@ -155,11 +155,11 @@
     >>> transaction.commit()
     >>> previous_date_status_changed = entry.date_status_changed
 
-Do the new upload. It will be an upstream upload.
+Do the new upload. It will be an upload by the maintainer.
 
-    >>> from_upstream = True
+    >>> by_maintainer = True
     >>> po_sr_entry = translationimportqueue.addOrUpdateEntry(
-    ...     u'po/sr.po', 'foo', from_upstream, rosetta_experts,
+    ...     u'po/sr.po', 'foo', by_maintainer, rosetta_experts,
     ...      distroseries=hoary_distroseries,
     ...      sourcepackagename=evolution_sourcepackagename)
 
@@ -222,11 +222,11 @@
     >>> guessed_pofile == pofile
     True
 
-And because it's an upstream upload, the IPOFile in our database got
+And because it's an upload by the maintainer, the IPOFile in our database got
 its path changed to the one noted by this upload instead of having the
 one we set a couple of lines ago (u'po/sr-old.pot'):
 
-    >>> po_sr_entry.from_upstream
+    >>> po_sr_entry.by_maintainer
     True
     >>> pofile.path == po_sr_entry.path
     True
@@ -1121,7 +1121,7 @@
     ...     }
     >>> tarfile_content = LaunchpadWriteTarFile.files_to_string(
     ...     test_tar_content)
-    >>> from_upstream = True
+    >>> by_maintainer = True
 
 We will need this helper function to print the queue content.
 
@@ -1154,7 +1154,7 @@
 product. There will be three new entries from the tarball.
 
     >>> translationimportqueue.addOrUpdateEntriesFromTarball(
-    ...     tarfile_content, from_upstream, rosetta_experts,
+    ...     tarfile_content, by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries,
     ...     potemplate=evolution_22_test_template)
     (3, [])
@@ -1189,7 +1189,7 @@
     Foo template
 
     >>> entry = translationimportqueue.addOrUpdateEntry(
-    ...     "foo.pot", "New content", from_upstream, rosetta_experts,
+    ...     "foo.pot", "New content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries,
     ...     potemplate=evolution_22_test_template)
     >>> entry = removeSecurityProxy(entry)
@@ -1203,7 +1203,7 @@
 on a best match basis. The entry is updated.
 
     >>> entry = translationimportqueue.addOrUpdateEntry(
-    ...     "foo.pot", "Even newer content", from_upstream, rosetta_experts,
+    ...     "foo.pot", "Even newer content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries)
     >>> entry = removeSecurityProxy(entry)
     >>> transaction.commit()
@@ -1220,7 +1220,7 @@
     Spanish translation
 
     >>> entry = removeSecurityProxy(translationimportqueue.addOrUpdateEntry(
-    ...     "es.po", "New po content", from_upstream, rosetta_experts,
+    ...     "es.po", "New po content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries))
     >>> transaction.commit()
     >>> entry is existing_entry
@@ -1232,7 +1232,7 @@
 we get again three more entries.
 
     >>> translationimportqueue.addOrUpdateEntriesFromTarball(
-    ...     tarfile_content, from_upstream, rosetta_experts,
+    ...     tarfile_content, by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries,
     ...     potemplate=evolution_22_template)
     (3, [])
@@ -1255,7 +1255,7 @@
 updated.
 
     >>> print queue.addOrUpdateEntry(
-    ...     "foo.pot", "Latest content", from_upstream, rosetta_experts,
+    ...     "foo.pot", "Latest content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries)
     None
 
@@ -1263,11 +1263,11 @@
 then to a specific template.
 
     >>> existing_entry = queue.addOrUpdateEntry(
-    ...     "bar.pot", "Bar content", from_upstream, rosetta_experts,
+    ...     "bar.pot", "Bar content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries)
     >>> existing_entry = removeSecurityProxy(existing_entry)
     >>> entry = queue.addOrUpdateEntry(
-    ...     "bar.pot", "Bar content", from_upstream, rosetta_experts,
+    ...     "bar.pot", "Bar content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries,
     ...     potemplate=evolution_22_template)
 
@@ -1283,7 +1283,7 @@
 When uploading to the prouct now, the best matching entry is updated.
 
     >>> entry = queue.addOrUpdateEntry(
-    ...     "bar.pot", "New bar content", from_upstream, rosetta_experts,
+    ...     "bar.pot", "New bar content", by_maintainer, rosetta_experts,
     ...     productseries=evolution_productseries)
     >>> entry = removeSecurityProxy(entry)
     >>> transaction.commit()
@@ -1320,7 +1320,7 @@
 filter, so there seem to be only 2 files in the tarball.
 
     >>> translationimportqueue.addOrUpdateEntriesFromTarball(
-    ...     tarfile_content, from_upstream, rosetta_experts,
+    ...     tarfile_content, by_maintainer, rosetta_experts,
     ...     productseries=netapplet_trunk,
     ...     filename_filter=swizzle_filename)
     (2, [])

=== modified file 'lib/lp/translations/interfaces/translationimportqueue.py'
--- lib/lp/translations/interfaces/translationimportqueue.py	2010-08-23 08:35:29 +0000
+++ lib/lp/translations/interfaces/translationimportqueue.py	2010-11-03 15:48:52 +0000
@@ -252,8 +252,10 @@
         required=False,
         vocabulary="SourcePackageName")
 
-    from_upstream = Bool(
-        title=_("This import comes from an upstream project."),
+    by_maintainer = Bool(
+        title=_(
+            "This upload was done by the maintainer "
+            "of the project or package."),
         description=_(
             "If checked, the translations in this import will be marked "
             "as is_current_upstream."),
@@ -386,15 +388,15 @@
     def countEntries():
         """Return the number of `TranslationImportQueueEntry` records."""
 
-    def addOrUpdateEntry(path, content, from_upstream, importer,
+    def addOrUpdateEntry(path, content, by_maintainer, importer,
         sourcepackagename=None, distroseries=None, productseries=None,
         potemplate=None, pofile=None, format=None):
         """Return a new or updated entry of the import queue.
 
-        :arg path: is the path, with the filename, of the file imported.
+        :arg path: is the path, with the filename, of the uploaded file.
         :arg content: is the file content.
-        :arg from_upstream: indicates if the imported file is coming from an
-            upstream project.
+        :arg by_maintainer: indicates if the file was uploaded by the
+            maintainer of the project or package.
         :arg importer: is the person that did the import.
         :arg sourcepackagename: is the link of this import with source
             package.
@@ -409,14 +411,14 @@
         only one of them can be specified.
         """
 
-    def addOrUpdateEntriesFromTarball(content, from_upstream, importer,
+    def addOrUpdateEntriesFromTarball(content, by_maintainer, importer,
         sourcepackagename=None, distroseries=None, productseries=None,
         potemplate=None, filename_filter=None, approver_factory=None):
         """Add all .po or .pot files from the tarball at :content:.
 
         :arg content: is a tarball stream.
-        :arg from_upstream: indicates if the imported file is coming from an
-            upstream project.
+        :arg by_maintainer: indicates if the file was uploaded by the
+            maintainer of the project or package.
         :arg importer: is the person that did the import.
         :arg sourcepackagename: is the link of this import with source
             package.

=== modified file 'lib/lp/translations/model/pofile.py'
--- lib/lp/translations/model/pofile.py	2010-10-19 12:52:33 +0000
+++ lib/lp/translations/model/pofile.py	2010-11-03 15:48:52 +0000
@@ -1185,10 +1185,10 @@
             entry_to_import.setStatus(RosettaImportStatus.FAILED,
                                       rosetta_experts)
         else:
-            if (entry_to_import.from_upstream and
+            if (entry_to_import.by_maintainer and
                 not needs_notification_for_imported):
-                # If it's an upstream upload (i.e. from a package or bzr
-                # branch), do not send success notifications unless they
+                # If it's an upload by the maintainer of the project or
+                # package, do not send success notifications unless they
                 # are needed.
                 subject = None
 
@@ -1196,8 +1196,8 @@
                                       rosetta_experts)
             # Assign karma to the importer if this is not an automatic import
             # (all automatic imports come from the rosetta expert user) and
-            # comes from upstream.
-            if (entry_to_import.from_upstream and
+            # was done by the maintainer.
+            if (entry_to_import.by_maintainer and
                 entry_to_import.importer.id != rosetta_experts.id):
                 entry_to_import.importer.assignKarma(
                     'translationimportupstream',

=== modified file 'lib/lp/translations/model/translationimportqueue.py'
--- lib/lp/translations/model/translationimportqueue.py	2010-08-23 08:35:29 +0000
+++ lib/lp/translations/model/translationimportqueue.py	2010-11-03 15:48:52 +0000
@@ -158,7 +158,7 @@
     distroseries = Reference(distroseries_id, 'DistroSeries.id')
     productseries_id = Int(name='productseries', allow_none=True)
     productseries = Reference(productseries_id, 'ProductSeries.id')
-    from_upstream = BoolCol(notNull=True)
+    by_maintainer = BoolCol(notNull=True)
     pofile = ForeignKey(foreignKey='POFile', dbName='pofile',
         notNull=False, default=None)
     potemplate = ForeignKey(foreignKey='POTemplate',
@@ -487,12 +487,12 @@
             if pofile.canEditTranslations(self.importer):
                 pofile.owner = self.importer
 
-        if self.from_upstream:
-            # This entry comes from upstream, which means that the path we got
-            # is exactly the right one. If it's different from what pofile
-            # has, that would mean that either the entry changed its path
-            # since previous upload or that we had to guess it and now that we
-            # got the right path, we should fix it.
+        if self.by_maintainer:
+            # This was uploaded by the maintainer, which means that the path
+            # we got is exactly the right one. If it's different from what
+            # pofile has, that would mean that either the entry changed its
+            # path since previous upload or that we had to guess it and now
+            # that we got the right path, we should fix it.
             pofile.setPathIfUnique(self.path)
 
         if (sourcepackagename is None and
@@ -914,7 +914,7 @@
         return (
             format, translation_importer.getTranslationFormatImporter(format))
 
-    def addOrUpdateEntry(self, path, content, from_upstream, importer,
+    def addOrUpdateEntry(self, path, content, by_maintainer, importer,
                          sourcepackagename=None, distroseries=None,
                          productseries=None, potemplate=None, pofile=None,
                          format=None):
@@ -950,13 +950,13 @@
             entry = TranslationImportQueueEntry(path=path, content=alias,
                 importer=importer, sourcepackagename=sourcepackagename,
                 distroseries=distroseries, productseries=productseries,
-                from_upstream=from_upstream, potemplate=potemplate,
+                by_maintainer=by_maintainer, potemplate=potemplate,
                 pofile=pofile, format=format)
         else:
             # It's an update.
             entry.setErrorOutput(None)
             entry.content = alias
-            entry.from_upstream = from_upstream
+            entry.by_maintainer = by_maintainer
             if potemplate is not None:
                 # Only set the linked IPOTemplate object if it's not None.
                 entry.potemplate = potemplate
@@ -1017,7 +1017,7 @@
 
         return True
 
-    def addOrUpdateEntriesFromTarball(self, content, from_upstream, importer,
+    def addOrUpdateEntriesFromTarball(self, content, by_maintainer, importer,
         sourcepackagename=None, distroseries=None, productseries=None,
         potemplate=None, filename_filter=None, approver_factory=None):
         """See ITranslationImportQueue."""
@@ -1058,7 +1058,7 @@
 
             path = upload_files[tarinfo.name]
             entry = approver.approve(self.addOrUpdateEntry(
-                path, file_content, from_upstream, importer,
+                path, file_content, by_maintainer, importer,
                 sourcepackagename=sourcepackagename,
                 distroseries=distroseries, productseries=productseries,
                 potemplate=potemplate))

=== modified file 'lib/lp/translations/utilities/gettext_po_importer.py'
--- lib/lp/translations/utilities/gettext_po_importer.py	2010-08-23 08:35:29 +0000
+++ lib/lp/translations/utilities/gettext_po_importer.py	2010-11-03 15:48:52 +0000
@@ -32,7 +32,7 @@
         self.productseries = None
         self.distroseries = None
         self.sourcepackagename = None
-        self.from_upstream = False
+        self.by_maintainer = False
         self.content = None
 
     def getFormat(self, file_contents):
@@ -55,7 +55,7 @@
         self.distroseries = translation_import_queue_entry.distroseries
         self.sourcepackagename = (
             translation_import_queue_entry.sourcepackagename)
-        self.from_upstream = translation_import_queue_entry.from_upstream
+        self.by_maintainer = translation_import_queue_entry.by_maintainer
 
         librarian_client = getUtility(ILibrarianClient)
         self.content = librarian_client.getFileByAlias(

=== modified file 'lib/lp/translations/utilities/mozilla_xpi_importer.py'
--- lib/lp/translations/utilities/mozilla_xpi_importer.py	2010-08-23 08:35:29 +0000
+++ lib/lp/translations/utilities/mozilla_xpi_importer.py	2010-11-03 15:48:52 +0000
@@ -380,7 +380,7 @@
         self.productseries = None
         self.distroseries = None
         self.sourcepackagename = None
-        self.from_upstream = False
+        self.by_maintainer = False
         self._translation_file = None
 
     def getFormat(self, file_contents):
@@ -406,7 +406,7 @@
         self.distroseries = translation_import_queue_entry.distroseries
         self.sourcepackagename = (
             translation_import_queue_entry.sourcepackagename)
-        self.from_upstream = translation_import_queue_entry.from_upstream
+        self.by_maintainer = translation_import_queue_entry.by_maintainer
 
         librarian_client = getUtility(ILibrarianClient)
         content = librarian_client.getFileByAlias(

=== modified file 'lib/lp/translations/utilities/tests/helpers.py'
--- lib/lp/translations/utilities/tests/helpers.py	2010-08-23 08:35:29 +0000
+++ lib/lp/translations/utilities/tests/helpers.py	2010-11-03 15:48:52 +0000
@@ -26,7 +26,7 @@
 
 
 def import_pofile_or_potemplate(file_contents, person,
-    pofile=None, potemplate=None, from_upstream=True):
+    pofile=None, potemplate=None, by_maintainer=True):
     """Import a `POFile` or `POTemplate` from the given string.
 
     :param file_contents: text of "file" to import.
@@ -34,24 +34,26 @@
     :param pofile: if uploading a `POFile`, file to import to; None otherwise.
     :param potemplate: if uploading a `POTemplate`, file to import to; None
         otherwise.
+    :param by_maintainer: true if this file was uplaoded by the maintainer
+        of the project or package.
     :return: `TranslationImportQueueEntry` as added to the import queue.
     """
     translation_import_queue = getUtility(ITranslationImportQueue)
     if pofile is not None:
         if pofile.potemplate.distroseries is None:
             entry = translation_import_queue.addOrUpdateEntry(
-                pofile.path, file_contents, from_upstream, person,
+                pofile.path, file_contents, by_maintainer, person,
                 productseries=pofile.potemplate.productseries, pofile=pofile)
         else:
             entry = translation_import_queue.addOrUpdateEntry(
-                pofile.path, file_contents, from_upstream, person,
+                pofile.path, file_contents, by_maintainer, person,
                 distroseries=pofile.potemplate.distroseries,
                 sourcepackagename=pofile.potemplate.sourcepackagename,
                 pofile=pofile)
         target = pofile
     else:
-        # A POTemplate can only be 'upstream', so setting the
-        # from_upstream flag makes no difference.
+        # A POTemplate can only be uploaded by the maintainer, so setting the
+        # by_maintainer flag makes no difference.
         if potemplate.distroseries is None:
             entry = translation_import_queue.addOrUpdateEntry(
                 potemplate.path, file_contents, True, person,

=== modified file 'lib/lp/translations/utilities/tests/import-flags.txt'
--- lib/lp/translations/utilities/tests/import-flags.txt	2010-03-24 14:25:52 +0000
+++ lib/lp/translations/utilities/tests/import-flags.txt	2010-11-03 15:48:52 +0000
@@ -223,7 +223,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_update1,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=False)
+    ...                                     by_maintainer=False)
     >>> print entry.status.name
     IMPORTED
     >>> flush_database_caches()
@@ -289,7 +289,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_imported_update,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=True)
+    ...                                     by_maintainer=True)
     >>> print entry.status.name
     IMPORTED
     >>> flush_database_caches()
@@ -361,7 +361,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_update2,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=False)
+    ...                                     by_maintainer=False)
     >>> print entry.status.name
     IMPORTED
     >>> flush_database_caches()
@@ -430,7 +430,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_update3,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=False)
+    ...                                     by_maintainer=False)
     >>> print entry.status.name
     IMPORTED
 
@@ -501,7 +501,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_update3,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=False)
+    ...                                     by_maintainer=False)
     >>> print entry.status.name
     IMPORTED
 
@@ -528,7 +528,7 @@
 
     >>> entry = import_pofile_or_potemplate(test_translation_update3,
     ...                                     carlos, pofile=firefox_serbian,
-    ...                                     from_upstream=True)
+    ...                                     by_maintainer=True)
     >>> print entry.status.name
     IMPORTED
 

=== modified file 'lib/lp/translations/utilities/tests/test_file_importer.py'
--- lib/lp/translations/utilities/tests/test_file_importer.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/utilities/tests/test_file_importer.py	2010-11-03 15:48:52 +0000
@@ -115,29 +115,29 @@
     """Class test for translation importer component"""
     layer = ZopelessDatabaseLayer
 
-    def _createFileImporters(self, pot_content, po_content, from_upstream):
+    def _createFileImporters(self, pot_content, po_content, by_maintainer):
         """Create queue entries from POT and PO content strings.
         Create importers from the entries."""
         pot_importer = self._createPOTFileImporter(
-            pot_content, from_upstream)
+            pot_content, by_maintainer)
         po_importer = self._createPOFileImporter(
-            pot_importer, po_content, from_upstream)
+            pot_importer, po_content, by_maintainer)
         return (pot_importer, po_importer)
 
-    def _createPOTFileImporter(self, pot_content, from_upstream):
+    def _createPOTFileImporter(self, pot_content, by_maintainer):
         """Create queue entries from POT content string.
         Create an importer from the entry."""
         potemplate = self.factory.makePOTemplate()
         template_entry = self.translation_import_queue.addOrUpdateEntry(
             potemplate.path, pot_content,
-            from_upstream, self.importer_person,
+            by_maintainer, self.importer_person,
             productseries=potemplate.productseries,
             potemplate=potemplate)
         self.fake_librarian.pretendCommit()
         return POTFileImporter(template_entry, GettextPOImporter(), None)
 
     def _createPOFileImporter(self,
-            pot_importer, po_content, from_upstream, existing_pofile=None,
+            pot_importer, po_content, by_maintainer, existing_pofile=None,
             person=None):
         """Create a PO entry from content, relating to a template_entry.
         Create an importer for the entry."""
@@ -149,7 +149,7 @@
             pofile = existing_pofile
         person = person or self.importer_person
         translation_entry = self.translation_import_queue.addOrUpdateEntry(
-            pofile.path, po_content, from_upstream, person,
+            pofile.path, po_content, by_maintainer, person,
             productseries=potemplate.productseries, pofile=pofile)
         self.fake_librarian.pretendCommit()
         return POFileImporter(translation_entry, GettextPOImporter(), None)
@@ -231,14 +231,14 @@
             "FileImporter.getOrCreatePOTMessageSet did not get an existing "
             "IPOTMsgSet object from the database.")
 
-    def _test_storeTranslationsInDatabase_empty(self, from_upstream=True):
+    def _test_storeTranslationsInDatabase_empty(self, by_maintainer=True):
         """Check whether we store empty messages appropriately."""
         # Construct a POFile importer.
         pot_importer = self._createPOTFileImporter(
-            TEST_TEMPLATE_EXPORTED, from_upstream=True)
+            TEST_TEMPLATE_EXPORTED, by_maintainer=True)
         importer = self._createPOFileImporter(
             pot_importer, TEST_TRANSLATION_EXPORTED,
-            from_upstream=from_upstream, person=self.importer_person)
+            by_maintainer=by_maintainer, person=self.importer_person)
 
         # Empty message to import.
         message = TranslationMessageData()
@@ -252,12 +252,12 @@
         self.assertIs(None, translation)
 
     def test_storeTranslationsInDatabase_empty_imported(self):
-        """Storing empty messages for published imports appropriately."""
-        self._test_storeTranslationsInDatabase_empty(from_upstream=True)
+        """Storing empty messages for maintainer uploads appropriately."""
+        self._test_storeTranslationsInDatabase_empty(by_maintainer=True)
 
     def test_storeTranslationsInDatabase_empty_user(self):
         """Store empty messages for user uploads appropriately."""
-        self._test_storeTranslationsInDatabase_empty(from_upstream=False)
+        self._test_storeTranslationsInDatabase_empty(by_maintainer=False)
 
     def test_FileImporter_storeTranslationsInDatabase_privileges(self):
         """Test `storeTranslationsInDatabase` privileges."""
@@ -291,7 +291,7 @@
                 context=message.context))
 
         po_importer = self._createPOFileImporter(
-            pot_importer, TEST_TRANSLATION_EXPORTED, from_upstream=True,
+            pot_importer, TEST_TRANSLATION_EXPORTED, by_maintainer=True,
             person=unprivileged_person)
 
         entry = removeSecurityProxy(
@@ -542,7 +542,7 @@
         self.translation_import_queue = getUtility(ITranslationImportQueue)
         self.importer_person = self.factory.makePerson()
 
-    def _make_queue_entry(self, from_upstream):
+    def _make_queue_entry(self, by_maintainer):
         pofile = self.factory.makePOFile('eo')
         # Create a header with a newer date than what is found in
         # TEST_TRANSLATION_FILE.
@@ -550,7 +550,7 @@
                          "Content-Type: text/plain; charset=UTF-8\n")
         po_content = TEST_TRANSLATION_FILE % ("", "foo", "bar")
         queue_entry = self.translation_import_queue.addOrUpdateEntry(
-            pofile.path, po_content, from_upstream, self.importer_person,
+            pofile.path, po_content, by_maintainer, self.importer_person,
             productseries=pofile.potemplate.productseries, pofile=pofile)
         self.fake_librarian.pretendCommit()
         return queue_entry
@@ -608,7 +608,7 @@
         self.upstream_template = self.factory.makePOTemplate(
                 productseries=self.upstream_productseries)
 
-    def _makeImportEntry(self, side, from_upstream=False, uploader=None,
+    def _makeImportEntry(self, side, by_maintainer=False, uploader=None,
                          no_upstream=False):
         if side == self.UPSTREAM:
             potemplate = self.upstream_template
@@ -635,7 +635,7 @@
         pofile = self.factory.makePOFile(
             self.language.code, potemplate=potemplate, create_sharing=True)
         entry = self.factory.makeTranslationImportQueueEntry(
-            potemplate=potemplate, from_upstream=from_upstream,
+            potemplate=potemplate, by_maintainer=by_maintainer,
             uploader=uploader, content=self.POFILE)
         entry.potemplate = potemplate
         entry.pofile = pofile
@@ -693,7 +693,7 @@
     def test_share_with_other_side_ubuntu_from_package(self):
         # An ubuntu queue entry that is imported from an upstream package
         # will be shared with upstream.
-        entry = self._makeImportEntry(self.UBUNTU, from_upstream=True)
+        entry = self._makeImportEntry(self.UBUNTU, by_maintainer=True)
         importer = POFileImporter(
             entry, importers[TranslationFileFormat.PO], None)
         self.assertTrue(

=== modified file 'lib/lp/translations/utilities/tests/test_gettext_po_importer.py'
--- lib/lp/translations/utilities/tests/test_gettext_po_importer.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/utilities/tests/test_gettext_po_importer.py	2010-11-03 15:48:52 +0000
@@ -57,20 +57,20 @@
         # Add a new entry for testing purposes. It's a template one.
         self.translation_import_queue = getUtility(ITranslationImportQueue)
         template_path = 'po/testing.pot'
-        from_upstream = True
+        by_maintainer = True
         personset = getUtility(IPersonSet)
         importer = personset.getByName('carlos')
         productset = getUtility(IProductSet)
         firefox = productset.getByName('firefox')
         productseries = firefox.getSeries('trunk')
         template_entry = self.translation_import_queue.addOrUpdateEntry(
-            template_path, test_template, from_upstream, importer,
+            template_path, test_template, by_maintainer, importer,
             productseries=productseries)
 
         # Add another one, a translation file.
         pofile_path = 'po/es.po'
         translation_entry = self.translation_import_queue.addOrUpdateEntry(
-            pofile_path, test_translation_file, from_upstream, importer,
+            pofile_path, test_translation_file, by_maintainer, importer,
             productseries=productseries)
 
         transaction.commit()

=== modified file 'lib/lp/translations/utilities/tests/test_kde_po_importer.py'
--- lib/lp/translations/utilities/tests/test_kde_po_importer.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/utilities/tests/test_kde_po_importer.py	2010-11-03 15:48:52 +0000
@@ -71,20 +71,20 @@
         # Add a new entry for testing purposes. It's a template one.
         self.translation_import_queue = getUtility(ITranslationImportQueue)
         template_path = 'po/testing.pot'
-        from_upstream = True
+        by_maintainer = True
         personset = getUtility(IPersonSet)
         importer = personset.getByName('carlos')
         productset = getUtility(IProductSet)
         firefox = productset.getByName('firefox')
         firefox_trunk = firefox.getSeries('trunk')
         template_entry = self.translation_import_queue.addOrUpdateEntry(
-            template_path, test_kde_template, from_upstream, importer,
+            template_path, test_kde_template, by_maintainer, importer,
             productseries=firefox_trunk)
 
         # Add another one, a translation file.
         pofile_path = 'po/sr.po'
         translation_entry = self.translation_import_queue.addOrUpdateEntry(
-            pofile_path, test_kde_translation_file, from_upstream, importer,
+            pofile_path, test_kde_translation_file, by_maintainer, importer,
             productseries=firefox_trunk)
 
         # Add a non-KDE PO file which gets recognized as regular PO file
@@ -93,7 +93,7 @@
         firefox_10 = firefox.getSeries('1.0')
         gettext_template_entry = (
             self.translation_import_queue.addOrUpdateEntry(
-                template_path, test_template, from_upstream, importer,
+                template_path, test_template, by_maintainer, importer,
                 productseries=firefox_10))
 
         transaction.commit()

=== modified file 'lib/lp/translations/utilities/tests/test_xpi_import.py'
--- lib/lp/translations/utilities/tests/test_xpi_import.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_import.py	2010-11-03 15:48:52 +0000
@@ -79,7 +79,7 @@
             file_contents=es_xpi.read(),
             person=self.importer,
             pofile=self.spanish_firefox,
-            from_upstream=True)
+            by_maintainer=True)
 
     def _assertXpiMessageInvariant(self, message):
         """Check whether invariant part of all messages are correct."""

=== modified file 'lib/lp/translations/utilities/tests/test_xpi_po_exporter.py'
--- lib/lp/translations/utilities/tests/test_xpi_po_exporter.py	2010-10-18 16:36:46 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_po_exporter.py	2010-11-03 15:48:52 +0000
@@ -81,9 +81,9 @@
 
         # Attach it to the import queue.
         translation_import_queue = getUtility(ITranslationImportQueue)
-        from_upstream = True
+        by_maintainer = True
         entry = translation_import_queue.addOrUpdateEntry(
-            self.firefox_template.path, en_US_xpi.read(), from_upstream,
+            self.firefox_template.path, en_US_xpi.read(), by_maintainer,
             self.importer, productseries=self.firefox_template.productseries,
             potemplate=self.firefox_template)
 

=== modified file 'lib/lp/translations/utilities/translation_import.py'
--- lib/lp/translations/utilities/translation_import.py	2010-10-14 08:24:55 +0000
+++ lib/lp/translations/utilities/translation_import.py	2010-11-03 15:48:52 +0000
@@ -468,8 +468,8 @@
             ITranslationSideTraitsSet).getForTemplate(self.potemplate)
         if traits.side == TranslationSide.UPSTREAM:
             return True
-        # Check from_upstream.
-        if self.translation_import_queue_entry.from_upstream:
+        # Maintainer uploads are always shared with Ubuntu.
+        if self.translation_import_queue_entry.by_maintainer:
             return True
         # Find the sharing POFile and check permissions.
         productseries = self.potemplate.distroseries.getSourcePackage(
@@ -500,8 +500,8 @@
             self.pofile.language.code == 'en')
 
     def _storeCredits(self, potmsgset, credits):
-        """Store credits but only from upstream."""
-        if not self.translation_import_queue_entry.from_upstream:
+        """Store credits but only those provided by the maintainer."""
+        if not self.translation_import_queue_entry.by_maintainer:
             return None
         return potmsgset.setCurrentTranslation(
             self.pofile, self.last_translator, credits,
@@ -587,7 +587,7 @@
         if validation_ok and self.is_editor:
             return self._approveMessage(potmsgset, new_message, message_data)
 
-        if self.translation_import_queue_entry.from_upstream:
+        if self.translation_import_queue_entry.by_maintainer:
             # XXX: henninge 2010-09-21: Mixed models!
             # This is mimicking the old behavior to still mark these messages
             # as "imported". Will have to be removed when
@@ -756,7 +756,7 @@
         # Update translation_message's comments and flags.
         if translation_message is not None:
             translation_message.comment = message.comment
-            if self.translation_import_queue_entry.from_upstream:
+            if self.translation_import_queue_entry.by_maintainer:
                 translation_message.was_obsolete_in_last_import = (
                     message.is_obsolete)
 
@@ -781,10 +781,10 @@
         if upload_header is not None:
             # Check whether we are importing a new version.
             if self.pofile.isTranslationRevisionDateOlder(upload_header):
-                if translation_import_queue_entry.from_upstream:
-                    # Upstream files can be older than the last import
-                    # and still be imported. They don't update header
-                    # information, though, so this is deleted here.
+                if translation_import_queue_entry.by_maintainer:
+                    # Files uploaded by the maintainer can be older than the
+                    # last import and still be imported. They don't update
+                    # header information, though, so this is deleted here.
                     self.translation_file.header = None
                 else:
                     # The new imported file is older than latest one imported,
@@ -804,10 +804,10 @@
             self.lock_timestamp = (
                 upload_header.launchpad_export_date)
 
-        if (not self.translation_import_queue_entry.from_upstream and
+        if (not self.translation_import_queue_entry.by_maintainer and
             self.lock_timestamp is None):
             # We got a translation file from offline translation (not from
-            # upstream) and it misses the export time so we don't have a
+            # the maintainer) and it misses the export time so we don't have a
             # way to figure whether someone changed the same translations
             # while the offline work was done.
             raise NotExportedFromLaunchpad
@@ -826,11 +826,10 @@
             self.last_translator = (
                 self.translation_import_queue_entry.importer)
 
-        if self.translation_import_queue_entry.from_upstream:
-            # An unprivileged user wouldn't have been able to upload an
-            # upstream file in the first place.  But for Soyuz uploads,
-            # the "importer" reflects the package upload, not the
-            # translations upload.  So don't check for editing rights.
+        if self.translation_import_queue_entry.by_maintainer:
+            # The maintainer always has edit rights.
+            # For Soyuz uploads, the "importer" reflects the package upload
+            # not the translations upload.
             self.is_editor = True
         else:
             # Use the importer rights to make sure the imported
@@ -840,9 +839,9 @@
                 self.pofile.canEditTranslations(
                     self.translation_import_queue_entry.importer))
 
-        from_upstream = self.translation_import_queue_entry.from_upstream
+        by_maintainer = self.translation_import_queue_entry.by_maintainer
         self.pofile_in_db = ExistingPOFileInDatabase(
-            self.pofile, is_current_upstream=from_upstream)
+            self.pofile, is_current_upstream=by_maintainer)
 
     def _getPersonByEmail(self, email, name=None):
         """Return the person for given email.
@@ -876,7 +875,7 @@
         """See FileImporter."""
         # Mark this message as seen in the import
         self.pofile_in_db.markMessageAsSeen(message)
-        if self.translation_import_queue_entry.from_upstream:
+        if self.translation_import_queue_entry.by_maintainer:
             if self.pofile_in_db.isAlreadyTranslatedTheSameUpstream(message):
                 return
         else:
@@ -900,7 +899,7 @@
         # Update translation_message's comments and flags.
         if translation_message is not None:
             translation_message.comment = message.comment
-            if self.translation_import_queue_entry.from_upstream:
+            if self.translation_import_queue_entry.by_maintainer:
                 translation_message.was_obsolete_in_last_import = (
                     message.is_obsolete)