Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1020)  |  Call(1020)  |  Derive(0)  |  Import(0)
Add or update the message with the specified ID.

>>> catalog = Catalog()
>>> catalog.add(u'foo')
<Message ...>
>>> catalog[u'foo']
<Message u'foo' (flags: [])>

This method simply constructs a `Message` object with the given
arguments and invokes `__setitem__` with that object.(more...)

src/p/o/PO-Projects-0.3.5.1/po_projects/management/commands/popo.py   PO-Projects(Download)
        for entry in catalog.translationmsg_set.all().order_by('id'):
            locations = [tuple(item) for item in json.loads(entry.template.locations)]
            forged_catalog.add(entry.template.message, string=entry.message, locations=locations, flags=entry.template.flags)
 
        print "after add:", len(forged_catalog)

src/f/j/fjord-HEAD/vendor/packages/Babel/babel/messages/frontend.py   fjord(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(dirname, filename))
                    catalog.add(message, None, [(filepath, lineno)],
                                auto_comments=comments, context=context)
 
            for filename, lineno, message, comments, context in extracted:
                filepath = os.path.normpath(os.path.join(dirname, filename))
                catalog.add(message, None, [(filepath, lineno)],
                            auto_comments=comments, context=context)
 

src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/babel/messages/frontend.py   ZenPacks.zenoss.OpenStack(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(dirname, filename))
                    catalog.add(message, None, [(filepath, lineno)],
                                auto_comments=comments, context=context)
 
            for filename, lineno, message, comments, context in extracted:
                filepath = os.path.normpath(os.path.join(dirname, filename))
                catalog.add(message, None, [(filepath, lineno)],
                            auto_comments=comments, context=context)
 

src/b/a/Babel-1.3/babel/messages/frontend.py   Babel(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(dirname, filename))
                    catalog.add(message, None, [(filepath, lineno)],
                                auto_comments=comments, context=context)
 
            for filename, lineno, message, comments, context in extracted:
                filepath = os.path.normpath(os.path.join(dirname, filename))
                catalog.add(message, None, [(filepath, lineno)],
                            auto_comments=comments, context=context)
 

src/p/o/PO-Projects-0.3.5.1/po_projects/models.py   PO-Projects(Download)
 
        for entry in self.templatemsg_set.all().order_by('id'):
            forged_catalog.add(entry.message, string=None, locations=entry.get_locations_set(), flags=entry.get_flags_set())
 
        return forged_catalog
        for entry in self.translationmsg_set.all().order_by('id'):
            locations = [tuple(item) for item in json.loads(entry.template.locations)]
            forged_catalog.add(entry.template.message, string=entry.message, locations=locations, flags=entry.get_flags())
 
        return forged_catalog

src/g/r/grow-0.0.27/grow/pods/translations.py   grow(Download)
            lineno, string, comments, context = message
            added_message = catalog_obj.add(
                string, None, [(pod_path, lineno)], auto_comments=comments,
                context=context)
            extracted.append(added_message)
        context = None
        added_message = catalog_obj.add(
            item, None, [(path, 0)], auto_comments=comments, context=context)
        if added_message not in extracted:
          extracted.append(added_message)

src/p/y/pygrow-HEAD/grow/pods/translations.py   pygrow(Download)
            lineno, string, comments, context = message
            added_message = catalog_obj.add(
                string, None, [(pod_path, lineno)], auto_comments=comments,
                context=context)
            extracted.append(added_message)
        context = None
        added_message = catalog_obj.add(
            item, None, [(path, 0)], auto_comments=comments, context=context)
        if added_message not in extracted:
          extracted.append(added_message)

src/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/babel/messages/frontend.py   microblog(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(dirname, filename))
                    catalog.add(message, None, [(filepath, lineno)],
                                auto_comments=comments, context=context)
 
            for filename, lineno, message, comments, context in extracted:
                filepath = os.path.normpath(os.path.join(dirname, filename))
                catalog.add(message, None, [(filepath, lineno)],
                            auto_comments=comments, context=context)
 

src/p/r/proofofexistence-HEAD/babel/messages/frontend.py   proofofexistence(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(dirname, filename))
                    catalog.add(message, None, [(filepath, lineno)],
                                auto_comments=comments, context=context)
 
            for filename, lineno, message, comments, context in extracted:
                filepath = os.path.normpath(os.path.join(dirname, filename))
                catalog.add(message, None, [(filepath, lineno)],
                            auto_comments=comments, context=context)
 

src/o/p/Optimus-0.6.9/optimus/i18n.py   Optimus(Download)
                for filename, lineno, message, comments, context in extracted:
                    filepath = os.path.normpath(os.path.join(os.path.basename(self.settings.SOURCES_DIR), filename))
                    self._catalog_template.add(message, None, [(filepath, lineno)], auto_comments=comments, context=context)
 
            outfile = open(self.get_template_path(), 'wb')

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8  Next