# Path: airy/utils/safestring.py
# def mark_safe(s):
#     """
#     Explicitly mark a string as safe for (HTML) output purposes. The returned
#     object can be used everywhere a string or unicode object is appropriate.
# 
#     Can be called multiple times on a single string.
#     """
#     if isinstance(s, SafeData):
#         return s
#     if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
#         return SafeString(s)
#     if isinstance(s, (unicode, Promise)):
#         return SafeUnicode(s)
#     return SafeString(str(s))
# 
# class SafeData(object):
#     pass


import locale
import os
import re
import sys
import warnings
import gettext as gettext_module
from cStringIO import StringIO
from threading import local
from airy.utils.importlib import import_module
from airy.utils.safestring import mark_safe, SafeData
    from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.core.conf import settings
        from airy.core.conf import settings
            from airy.core.conf import settings
        from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.template import (Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK,
            TOKEN_COMMENT, TRANSLATOR_COMMENT_MARK)
    from airy.core.conf import settings
    from airy.core.conf import settings
"""Translation helper functions."""




# Translations are cached in a dictionary for every language+app tuple.
# The active translations are stored by threadid to make them thread local.
_translations = {}
_active = local()

# The default translation is based on the settings file.
_default = None

# This is a cache for normalized accept-header languages to prevent multiple
# file lookups when checking the same locale on repeated requests.
_accepted = {}

# magic gettext number to separate context from message
CONTEXT_SEPARATOR = u"\x04"

# Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9.
accept_language_re = re.compile(r'''

# Path: airy/utils/safestring.py
# def mark_safe(s):
#     """
#     Explicitly mark a string as safe for (HTML) output purposes. The returned
#     object can be used everywhere a string or unicode object is appropriate.
# 
#     Can be called multiple times on a single string.
#     """
#     if isinstance(s, SafeData):
#         return s
#     if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
#         return SafeString(s)
#     if isinstance(s, (unicode, Promise)):
#         return SafeUnicode(s)
#     return SafeString(str(s))
# 
# class SafeData(object):
#     pass


# Path: airy/utils/translation/trans_real.py
import locale
import os
import re
import sys
import warnings
import gettext as gettext_module
from cStringIO import StringIO
from threading import local
from airy.utils.importlib import import_module
from airy.utils.safestring import mark_safe, SafeData
    from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.core.conf import settings
        from airy.core.conf import settings
            from airy.core.conf import settings
        from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.core.conf import settings
    from airy.template import (Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK,
            TOKEN_COMMENT, TRANSLATOR_COMMENT_MARK)
    from airy.core.conf import settings
    from airy.core.conf import settings

"""Translation helper functions."""




# Translations are cached in a dictionary for every language+app tuple.
# The active translations are stored by threadid to make them thread local.
_translations = {}
_active = local()

# The default translation is based on the settings file.
_default = None

# This is a cache for normalized accept-header languages to prevent multiple
# file lookups when checking the same locale on repeated requests.
_accepted = {}

# magic gettext number to separate context from message
CONTEXT_SEPARATOR = u"\x04"

# Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9.
accept_language_re = re.compile(r'''

        ([A-Za-z]{1,8}(?:-[A-Za-z]{1,8})*|\*)   # "en", "en-au", "x-y-z", "*"