PO export with Last-Translator " <Unknown>" email address

Bug #362848 reported by Adi Roiban
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

I think that if a LP user choose not to publish it's email address, an .po file export having this account as last translator will generate and " <Unknown>" email address for the Last-Translator header.

I have attached and exported .po file for German Ubuntu Start Page translation.

The problem with this export is that if I upload this .po file I get the credit for the translation.

Maybe Rosetta should export the .po file using a generic email address containing the internal userid / openid, and when this po is uploaded again in rosetta, recognize the email as a special one and give the correct credits :)

Ex. <email address hidden>

Cheers,

See also
========

bug 967936 - our use of email addresses leads to disclosure (which we probably don't explicitly warn users about)

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

I think this is hard to decide on. I don't think either way is "correct", and is mostly a matter of preference. We do not, in general, offer those PO files for download, and maybe we should just put a LP user name in there (i.e. something like https://launchpad.net/~user), but that would break every software handling Last-Translator field.

Of course, dealing with imports is going to be a nice excercise, and this would require a lot of effort, for somewhat dubious gain (i.e. I am not sure it's the right thing to do, even if someone asks for it to be done; what we are definitely doing wrong is not allowing a person to choose their email address that should be in such PO files, but that would be as hard, if not harder to implement).

Changed in rosetta:
importance: Undecided → Wishlist
status: New → Triaged
tags: added: code-integration
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.

Revision history for this message
Robert Collins (lifeless) wrote :

Rather than ~username, which is mutable, perhaps we could use some persistent id (I think we have one for openid).

Changed in launchpad:
importance: Wishlist → Low
description: updated
Curtis Hovey (sinzui)
tags: added: translations-branch
removed: code-integration
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.