Ejemplo n.º 1
0
    def test_with_args(self):
        kwds = generate_keywords({
            # Add a new one
            'foo': None,
            # Override an existing one
            '_': (1, 2)
        })

        assert kwds['foo'] is None
        assert kwds['_'] == (1, 2)
Ejemplo n.º 2
0
    def test_with_args(self):
        kwds = generate_keywords({
            # Add a new one
            "foo": None,
            # Override an existing one
            "_": (1, 2),
        })

        assert kwds["foo"] is None
        assert kwds["_"] == (1, 2)
Ejemplo n.º 3
0
    def test_with_args(self):
        kwds = generate_keywords({
            # Add a new one
            'foo': None,
            # Override an existing one
            '_': (1, 2)
        })

        assert kwds['foo'] is None
        assert kwds['_'] == (1, 2)
Ejemplo n.º 4
0
 def test_basic(self):
     # Get the keywords and then do a spot check for the keywords that are
     # important that we're likely to be using. We don't do a full
     # comparison because Babel can change and we don't want our tests
     # breaking if breaking isn't helpful.
     kwds = generate_keywords()
     assert kwds['_'] is None
     assert kwds['_lazy'] is None
     assert kwds['gettext'] is None
     assert kwds['ngettext'] == (1, 2)
     assert kwds['pgettext'] == ((1, 'c'), 2)
Ejemplo n.º 5
0
 def test_basic(self):
     # Get the keywords and then do a spot check for the keywords that are
     # important that we're likely to be using. We don't do a full
     # comparison because Babel can change and we don't want our tests
     # breaking if breaking isn't helpful.
     kwds = generate_keywords()
     assert kwds["_"] is None
     assert kwds["_lazy"] is None
     assert kwds["gettext"] is None
     assert kwds["ngettext"] == (1, 2)
     assert kwds["pgettext"] == ((1, "c"), 2)
Ejemplo n.º 6
0
from puente.utils import generate_keywords

# Name for .pot file--should be 'django'
TEXT_DOMAIN = 'django'

# Keywords indicating gettext calls
KEYWORDS = generate_keywords()

# Prefixes that indicate a comment tag intended for localizers
COMMENT_TAGS = ['L10n:', 'L10N:', 'l10n:', 'l10N:', 'Translators:']

# Tells the extract script what files to look for L10n in and what
# function handles the extraction.
# Map of domain to list of (match, extractor)
DOMAIN_METHODS = None

# The basedir of this project to extract strings from
BASE_DIR = None

# If you set this, we'll use it. Otherwise we assume you're using django-jinja
# and we'll pick up the settings from the first template handler specified.
JINJA2_CONFIG = None

# The name of the project.
PROJECT = 'PROJECT'

# The version of the project.
VERSION = '1.0'

# Email address or url for reporting msgid-related bugs to.
MSGID_BUGS_ADDRESS = ''
Ejemplo n.º 7
0
from puente.utils import generate_keywords


# Name for .pot file--should be 'django'
TEXT_DOMAIN = 'django'

# Keywords indicating gettext calls
KEYWORDS = generate_keywords()

# Prefixes that indicate a comment tag intended for localizers
COMMENT_TAGS = ['L10n:', 'L10N:', 'l10n:', 'l10N:', 'Translators:']

# Tells the extract script what files to look for L10n in and what
# function handles the extraction.
# Map of domain to list of (match, extractor)
DOMAIN_METHODS = None

# The basedir of this project to extract strings from
BASE_DIR = None

# If you set this, we'll use it. Otherwise we assume you're using django-jinja
# and we'll pick up the settings from the first template handler specified.
JINJA2_CONFIG = None

# The name of the project.
PROJECT = 'PROJECT'

# The version of the project.
VERSION = '1.0'

# Email address or url for reporting msgid-related bugs to.