Remove [I]POTMsgSet.sequence

Bug #401618 reported by Jeroen T. Vermeulen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Данило Шеган

Bug Description

We've still got "sequence" in POTMsgSet and IPOTMsgSet. We should remove them soon, because they are no longer in use.

Or shouldn't be, at least. Getting rid of them may expose more problems like bug 388473.

Related branches

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

We still have it in a surprising number of places; a simple "grep -rIi potmsgset.sequence lib scripts cronscripts" reveals a bunch.

Most of these are simple to fix, but the ZCML path_expression for TranslationMessage also relies on it.

Changed in rosetta:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Данило Шеган (danilo)
milestone: none → 2.2.8
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The hardest case I ran into when I looked into this was in lib/lp/translations/browser/configure.zcml, which uses path_expression="string:${sequence}" to navigate from a POFile to a TranslationMessage.

I tried wrapping the TranslationMessage as used in browser code in a little "TM-in-POFile" class that delegates ITranslationMessage to the TranslationMessage but also remembers the message's sequence number in the given POFile. That patch grew very quickly though, and also replaced TranslationMessage.pofile, setPOFile, and browser_pofile.

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

Alternative and simpler approach is to use something like @stepthrough to implement traversal in code.

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
assignee: Данило Шеган (danilo) → nobody
tags: added: tech-debt
tags: added: message-sharing
Changed in launchpad:
assignee: nobody → Данило Шеган (danilo)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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