~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/model/potmsgset.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-03 11:23:34 UTC
  • mfrom: (13457.6.16 upgrade-stderr)
  • Revision ID: launchpad@pqm.canonical.com-20110803112334-acnupsa7jmzmdeet
[r=stevenk][bug=819751] Fix the implementation of several methods in
 LoggingUIFactory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from sqlobject import (
20
20
    ForeignKey,
 
21
    IntCol,
21
22
    SQLObjectNotFound,
22
23
    StringCol,
23
24
    )
35
36
from zope.interface import implements
36
37
from zope.security.proxy import removeSecurityProxy
37
38
 
38
 
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
39
 
from lp.services.config import config
40
 
from lp.services.database.constants import DEFAULT
41
 
from lp.services.database.lpstorm import IStore
42
 
from lp.services.database.sqlbase import (
 
39
from canonical.config import config
 
40
from canonical.database.constants import DEFAULT
 
41
from canonical.database.sqlbase import (
43
42
    cursor,
44
43
    quote,
45
44
    SQLBase,
46
45
    sqlvalues,
47
46
    )
48
 
from lp.services.helpers import shortlist
 
47
from canonical.launchpad.helpers import shortlist
 
48
from canonical.launchpad.interfaces.lpstorm import IStore
 
49
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
49
50
from lp.services.propertycache import get_property_cache
50
51
from lp.translations.interfaces.potmsgset import (
51
52
    IPOTMsgSet,
138
139
        notNull=True)
139
140
    msgid_plural = ForeignKey(foreignKey='POMsgID', dbName='msgid_plural',
140
141
        notNull=False, default=DEFAULT)
 
142
    sequence = IntCol(dbName='sequence')
141
143
    commenttext = StringCol(dbName='commenttext', notNull=False)
142
144
    filereferences = StringCol(dbName='filereferences', notNull=False)
143
145
    sourcecomment = StringCol(dbName='sourcecomment', notNull=False)
1215
1217
 
1216
1218
    def setSequence(self, potemplate, sequence):
1217
1219
        """See `IPOTMsgSet`."""
 
1220
        self.sequence = sequence
1218
1221
        translation_template_item = TranslationTemplateItem.selectOneBy(
1219
1222
            potmsgset=self, potemplate=potemplate)
1220
1223
        if translation_template_item is not None: