Similarly to bug #408528 in Soyuz, when we are importing translations from people who have not registered in Launchpad (i.e. there is no Person record for them), but who do have an account (i.e. there is Account and EmailAddress record for them), imports fail with
Traceback (most recent call last):
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/scripts/po_import.py", line 104, in run
(mail_subject, mail_body) = (
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/model/pofile.py", line 1026, in importFromQueue
errors, warnings = (
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 335, in importFile
file_importer = POFileImporter(
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 692, in __init__
self.last_translator = self._getPersonByEmail(email, name)
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 741, in _getPersonByEmail
displayname=name, comment=comment)
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/registry/model/person.py", line 2459, in createPersonAndEmail
email = getUtility(IEmailAddressSet).new(
File "/srv/launchpad.net/production/launchpad-rev-8325/lib/canonical/launchpad/database/emailaddress.py", line 116, in new
raise EmailAddressAlreadyTaken(
EmailAddressAlreadyTaken: The email address '...' is already registered.
Discussing this with Salgado, the problem is that we are using Account/Person split to indicate if someone has explicitely registered to use Launchpad or not. Yet, in Translations we do need Person records, so we need to create them anyway.
Proper, long-term fix will involve adding separate field to person records indicating whether that person is using LP or not (i.e. it was created automatically). As a short-term fix, we can add Person records with a new creation rationale like POFILEIMPORT_NOTYETUSINGLAUNCHPAD (and equate it to POFILEIMPORT wherever we are using POFILEIMPORT).
Work-around for users: modify Last-Translator to use a different email address, preferrably of the same person. Note that translations will be creditted to Last-Translator, so if you get it wrong, a wrong person might get the credit for somebody else's work.
Similarly to bug #408528 in Soyuz, when we are importing translations from people who have not registered in Launchpad (i.e. there is no Person record for them), but who do have an account (i.e. there is Account and EmailAddress record for them), imports fail with
Traceback (most recent call last): .net/production /launchpad- rev-8325/ lib/lp/ translations/ scripts/ po_import. py", line 104, in run .net/production /launchpad- rev-8325/ lib/lp/ translations/ model/pofile. py", line 1026, in importFromQueue .net/production /launchpad- rev-8325/ lib/lp/ translations/ utilities/ translation_ import. py", line 335, in importFile .net/production /launchpad- rev-8325/ lib/lp/ translations/ utilities/ translation_ import. py", line 692, in __init__ last_translator = self._getPerson ByEmail( email, name) .net/production /launchpad- rev-8325/ lib/lp/ translations/ utilities/ translation_ import. py", line 741, in _getPersonByEmail =name, comment=comment) .net/production /launchpad- rev-8325/ lib/lp/ registry/ model/person. py", line 2459, in createPersonAnd Email IEmailAddressSe t).new( .net/production /launchpad- rev-8325/ lib/canonical/ launchpad/ database/ emailaddress. py", line 116, in new eadyTaken( eadyTaken: The email address '...' is already registered.
File "/srv/launchpad
(mail_subject, mail_body) = (
File "/srv/launchpad
errors, warnings = (
File "/srv/launchpad
file_importer = POFileImporter(
File "/srv/launchpad
self.
File "/srv/launchpad
displayname
File "/srv/launchpad
email = getUtility(
File "/srv/launchpad
raise EmailAddressAlr
EmailAddressAlr
Discussing this with Salgado, the problem is that we are using Account/Person split to indicate if someone has explicitely registered to use Launchpad or not. Yet, in Translations we do need Person records, so we need to create them anyway.
Proper, long-term fix will involve adding separate field to person records indicating whether that person is using LP or not (i.e. it was created automatically). As a short-term fix, we can add Person records with a new creation rationale like POFILEIMPORT_ NOTYETUSINGLAUN CHPAD (and equate it to POFILEIMPORT wherever we are using POFILEIMPORT).
To help with a test case, we have seen this with French upload at https:/ /translations. launchpad. net/felo/ +imports
Work-around for users: modify Last-Translator to use a different email address, preferrably of the same person. Note that translations will be creditted to Last-Translator, so if you get it wrong, a wrong person might get the credit for somebody else's work.