Comment 3 for bug 362848

Revision history for this message
Данило Шеган (danilo) wrote :

Also affects bzr imports and exports. I.e. we've gotten reports on monajat (https://translations.edge.launchpad.net/monajat/trunk/+translations), with their bzr export and import (i.e. see how we export "Unknown" Last-Translator, then re-import it and lose the credits in rev 50 of lp:~sabily.team/monajat/translations).

The good way to fix this would be to use the Launchpad user homepage link (i.e. https://launchpad.net/~username) in the Last-Translator instead of an email and then parse that on import (including full URL so it's more specific than just "username").

To change what's exported, look at lib/lp/translations/model/pofile.py POFileToTranslationFileDataAdapter.header property (search for email = 'Unknown'). One would get the full user path using canonical_url(self._pofile.lasttranslator), and then they'd have to parse that in POHeader.getLastTranslator() in lib/lp/translations/utilities/gettext_po_parser.py. Appropriate unit tests would be needed as well, but one can read about our processes up on https://dev.launchpad.net/ or ask on #launchpad-dev on FreeNode IRC.