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

All Samples(153)  |  Call(86)  |  Derive(0)  |  Import(67)
Representation of a message catalog.

src/f/i/FireCheckIn-HEAD/kay/management/extract_messages.py   FireCheckIn(Download)
kay.setup_syspath()
 
from babel.messages import Catalog
from babel.messages.extract import extract_from_dir
from babel.messages.pofile import write_po
    methods = JSMETHODS
 
  catalog = Catalog(msgid_bugs_address=BUGS_ADDRESS,
                    copyright_holder=COPYRIGHT, charset='utf-8')
 

src/k/a/kay-HEAD/kay/management/extract_messages.py   kay(Download)
kay.setup_syspath()
 
from babel.messages import Catalog
from babel.messages.extract import extract_from_dir
from babel.messages.pofile import write_po
    methods = JSMETHODS
 
  catalog = Catalog(msgid_bugs_address=BUGS_ADDRESS,
                    copyright_holder=COPYRIGHT, charset='utf-8')
 

src/o/p/openlibrary-HEAD/openlibrary/i18n/__init__.py   openlibrary(Download)
import babel
from babel.support import Translations
from babel.messages import Catalog
from babel.messages.pofile import read_po, write_po
from babel.messages.mofile import write_mo
def extract_messages(dirs):
    catalog = Catalog(
        project='Open Library',
        copyright_holder='Internet Archive'
    )

src/a/n/android2po-1.2.0/android2po/commands.py   android2po(Download)
    import StringIO
from lxml import etree
from babel.messages import pofile, Catalog
 
from . import convert
                # Idially, we'd refactor convert.py so that we can use a
                # dict to represent a resource XML file.
                xmldata = po2xml(self.env, action, Catalog(locale=language.code))
                write_file(self, language_xml, xml2string(xmldata, action),
                           action=False)

src/a/n/android2po-HEAD/android2po/commands.py   android2po(Download)
    import StringIO
from lxml import etree
from babel.messages import pofile, Catalog
 
from . import convert
                # Idially, we'd refactor convert.py so that we can use a
                # dict to represent a resource XML file.
                xmldata = po2xml(self.env, action, Catalog(locale=language.code))
                write_file(self, language_xml, xml2string(xmldata, action),
                           action=False)

src/m/e/mediadrop-HEAD/mediadrop/lib/tests/translator_test.py   mediadrop(Download)
import shutil
 
from babel.messages import Catalog
from babel.messages.mofile import write_mo
 
        assert_false(os.path.exists(mo_filename))
 
        catalog = Catalog(locale=locale, domain=domain, fuzzy=False)
        for message_id, translation in messages.items():
            catalog.add(message_id, translation)

src/w/e/webapp-improved-HEAD/lib/babel/babel/tests/support.py   webapp-improved(Download)
 
from babel import support
from babel.messages import Catalog
from babel.messages.mofile import write_mo
 
            (('foo1', 'foos1'), {'string': ('VohCTXD1', 'VohsCTXD1'), 'context': 'foo'}),
        ]
        catalog1 = Catalog(locale='en_GB', domain='messages')
        catalog2 = Catalog(locale='en_GB', domain='messages1')
        for ids, kwargs in messages1:

src/f/j/fjord-HEAD/vendor/packages/Babel/tests/test_support.py   fjord(Download)
 
from babel import support
from babel.messages import Catalog
from babel.messages.mofile import write_mo
from babel._compat import BytesIO
            (('foo1', 'foos1'), {'string': ('VohCTXD1', 'VohsCTXD1'), 'context': 'foo'}),
        ]
        catalog1 = Catalog(locale='en_GB', domain='messages')
        catalog2 = Catalog(locale='en_GB', domain='messages1')
        for ids, kwargs in messages1:
            messages_dir = os.path.join(tempdir, 'fr', 'LC_MESSAGES')
            os.makedirs(messages_dir)
            catalog = Catalog(locale='fr', domain='messages')
            catalog.add('foo', 'bar')
            with open(os.path.join(messages_dir, 'messages.mo'), 'wb') as f:
    def setUp(self):
        fp = BytesIO()
        write_mo(fp, Catalog(locale='de'))
        fp.seek(0)
        self.translations = support.Translations(fp=fp)

src/p/l/plexnet-HEAD/third_party/python/babel/tests/support.py   plexnet(Download)
 
from babel import support
from babel.messages import Catalog
from babel.messages.mofile import write_mo
 
            (('foo1', 'foos1'), {'string': ('VohCTXD1', 'VohsCTXD1'), 'context': 'foo'}),
        ]
        catalog1 = Catalog(locale='en_GB', domain='messages')
        catalog2 = Catalog(locale='en_GB', domain='messages1')
        for ids, kwargs in messages1:

src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/tests/test_support.py   ZenPacks.zenoss.OpenStack(Download)
 
from babel import support
from babel.messages import Catalog
from babel.messages.mofile import write_mo
from babel._compat import BytesIO
            (('foo1', 'foos1'), {'string': ('VohCTXD1', 'VohsCTXD1'), 'context': 'foo'}),
        ]
        catalog1 = Catalog(locale='en_GB', domain='messages')
        catalog2 = Catalog(locale='en_GB', domain='messages1')
        for ids, kwargs in messages1:
            messages_dir = os.path.join(tempdir, 'fr', 'LC_MESSAGES')
            os.makedirs(messages_dir)
            catalog = Catalog(locale='fr', domain='messages')
            catalog.add('foo', 'bar')
            with open(os.path.join(messages_dir, 'messages.mo'), 'wb') as f:
    def setUp(self):
        fp = BytesIO()
        write_mo(fp, Catalog(locale='de'))
        fp.seek(0)
        self.translations = support.Translations(fp=fp)

  1 | 2 | 3 | 4 | 5  Next