Ejemplo n.º 1
0
 def test_template_tag_set_default_locale(self):
     """The default language should always have every tag."""
     ok_(template_has_tag('the_dude', 'en-US', 'active'))
Ejemplo n.º 2
0
def l10n_has_tag(ctx, tag, langfile=None):
    """Return boolean whether the given template's lang files have the given tag."""
    if langfile:
        return lang_file_has_tag(langfile, ctx['LANG'], tag)
    else:
        return template_has_tag(ctx['template'], ctx['LANG'], tag)
Ejemplo n.º 3
0
 def test_template_tag_set_default_locale(self):
     """The default language should always have every tag."""
     ok_(template_has_tag('the_dude', 'en-US', 'active'))
Ejemplo n.º 4
0
def l10n_has_tag(ctx, tag, langfile=None):
    """Return boolean whether the given template's lang files have the given tag."""
    if langfile:
        return lang_file_has_tag(langfile, ctx['LANG'], tag)
    else:
        return template_has_tag(ctx['template'], ctx['LANG'], tag)