Enable sharing between products and Ubuntu
Bug #545354 reported by
Ursula Junque
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Henning Eggers |
Bug Description
One more of the "bridging the gap" series: enabling message sharing between project and package series.
See the spec: https:/
Related branches
lp:~henninge/launchpad/bug-545354-enable-sharing
- Edwin Grubbs (community): Approve
-
Diff: 918 lines (+666/-82)5 files modifieddatabase/schema/security.cfg (+1/-0)
lib/lp/translations/doc/potemplate.txt (+7/-3)
lib/lp/translations/interfaces/potemplate.py (+23/-0)
lib/lp/translations/model/potemplate.py (+161/-65)
lib/lp/translations/tests/test_shared_potemplate.py (+474/-14)
Changed in rosetta: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Ursula Junque (ursinha) |
Changed in rosetta: | |
assignee: | Ursula Junque (ursinha) → nobody |
Changed in rosetta: | |
assignee: | nobody → Henning Eggers (henninge) |
description: | updated |
Changed in rosetta: | |
status: | In Progress → Fix Committed |
milestone: | none → 10.06 |
tags: | added: qa-needstesting |
tags: | removed: qa-needstesting |
Changed in rosetta: | |
status: | Fix Committed → Fix Released |
tags: | added: upstream-translations-sharing |
To post a comment you must log in.
OK, after a first attempt, some thinking, and talking to people I came up with the following:
- Sharing translations within a DistributionSou rcePackage (as POTemplateShari ngSubset does now) is dangerous because it simply is the tuple (distribution, sourcepackagena me) and the sourcepackagename may refer to different applications in different series of the distriubtion. Example: The game "chromium" became "chromium-bsu" when "chromium" was introduced for the browser. Accordingly, packaging links are always to SourcePackages (distroseries, sourcepackename ) and may link to different products. The outcome might be that we'd be sharing translations between different products. Ouch.
Actually, this problem questions the whole concept of the DistributionSou rcePackage and this might have to investigated separately.
- The original idea was to use the packing properties provided by the registry classes which may cover up the fact that packaging links used to not get copied when a new distroseries was created. Actually, most of them don't, only SourcePackage. packaging does AFAICT and SourcePackage. prodcutseries does not even use it. Most properties simply query the Packaging table which may be the result of sinzui's work and the fact that the packaging links are now being copied when a new distroseries is created. So we should simply query the Packaging table, too.
- A source package may be linked to only one productseries but each productseries within a product can be linked to a different source package within the same distroseries, in addition to the same or even a different source package in another distroseries. See the attached screenshot for a constructed example. The outcome is that the safest bet is to always follow packaging links from the product side to get the collection of sharing productseries and sourcepackages. As a side effect we also catch package renames between distroseries (but not template renames, obviously).
- Since the current interface of POTemplateShari ngSubset takes a (distribution, sourcepackagena me) tuple (i.e. a DistributionSou rcePackage) but the Packaging table links to (distroseries, sourcepackagena me) tuples (i.e. SourcePackages). So it needs to pick a distroseries to determine the correct product to share with. I will use distribution. translation_ focus for this and fall back to distribution. currentseries. The fall back is more a formal thing because translation_focus is set for Ubuntu and that is the only distribution for which packaging is supported, anyway.
So, I have a plan. ;-)