Clean up IHasTranslationTemplates

Bug #605924 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Henning Eggers

Bug Description

The IHasTranslationTemplates interface contains too much crud.

A few things in particular that we should clean up follow.

Return values: some methods return lists, others result sets. A bit of consistency would be nice.

Obsolete templates: the pre-existing behaviour is to consider all templates obsolete if their containing product or distribution has translations disabled. It should be up to the browser code to show templates only to authorized visitors if translations are disabled; only POTemplate.iscurrent should determine whether a template is current or obsolete.

Related branches

tags: added: tech-debt
Changed in rosetta:
status: New → Triaged
importance: Undecided → Low
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Henning Eggers (henninge)
Revision history for this message
Henning Eggers (henninge) wrote :

My plan for fixing this:
Return values: Return templates as result sets. This only affects getTranslationTemplateFormats and getObsoleteTranslationTemplates where each one only has one call site. These could easily be listified there but getObsoleteTranslationTemplates is only used to check its length for >0 ... So I will convert that to has_obsolete_translation_templates.

Obsolete templates: My plan now is to remove that and see which tests fail. The solution is pretty clear, finding all the right places is the work here.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.04
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
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.