Local suggestions rendering screwed up with sharing

Bug #406772 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

This is really a symptom of bug 401639.

Milo Casagrande notes this, which may possibly be an example of the obsolete field still being used:

"Was looking through Karmic translations today, and found this one:

" https://translations.edge.launchpad.net/ubuntu/karmic/+source/knetworkmanager/+pots/knetworkmanager/it/4/+translate

"The first suggestion, reported in Jaunty, says:

"Suggestions knetworkmanager in Ubuntu Jaunty package "knetworkmanager"
by Claudio Arseni on 2009-03-27

"but if you click on the link, it takes you to the Karmic translation.
Hovering the mouse on it. it has karmic in all the URL."

Also note that the description for the suggestion is "Suggestions [package] by [person]," which is gobbledygook. In this case, it should say simply "Suggested by [person]" like it does if you look at the suggestion in Jaunty. I think this goes wrong because of the pofile attribute still being used.

The pofile attribute is used in two ways:

1. convert_translationmessage_to_submission uses it to figure out whether the suggestion is local.

With message sharing, a local suggestion can seem non-local in this way: its pofile field points to Jaunty but we're looking at it in Karmic. Using browser_pofile instead should fix that, though I think the proper check would have to be that suggestion.potemplate be either None or the same as the template you're looking at, and suggestion.language be the one you're translating to. (And if the UI supported variants, it'd have to check for that too).

2. The render-suggestion macro links to the POFile if the message is not local to the POFile you're looking at.

This is where the gobbledygook comes from: the message is not recognized as being local. The link's content uses TranslationMessage.pofile.potemplate (so convert_translationmessage_to_submission ought to give the Submission a template reference, not a pofile one, though it doesn't really matter in this case) but actually links to the TranslationMessage.

(Another sidenote: TranslationMessageSuggestions.isFromSamePOFile uses the pofile attribute, but it itself isn't used.)

Changed in rosetta:
milestone: 2.2.8 → 3.0
Changed in rosetta:
milestone: 3.0 → 3.1.10
Changed in rosetta:
milestone: 3.1.10 → none
Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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