# Path: airy/core/conf.py
# class Settings(object):
#     def __init__(self, **entries):
#     def __getattribute__(self, name):
# def _ensure_defaults(dsettings, options, project_root, config_filename):
# def _preconfigure(project_root, config_filename='settings.py', argv=[]):
# 
# Path: airy/utils/encoding.py
# def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'):
#     """
#     Similar to smart_unicode, except that lazy instances are resolved to
#     strings, rather than kept as lazy objects.
# 
#     If strings_only is True, don't convert (some) non-string-like objects.
#     """
#     # Handle the common case first, saves 30-40% in performance when s
#     # is an instance of unicode. This function gets called often in that
#     # setting.
#     if isinstance(s, unicode):
#         return s
#     if strings_only and is_protected_type(s):
#         return s
#     try:
#         if not isinstance(s, basestring,):
#             if hasattr(s, '__unicode__'):
#                 s = unicode(s)
#             else:
#                 try:
#                     s = unicode(str(s), encoding, errors)
#                 except UnicodeEncodeError:
#                     if not isinstance(s, Exception):
#                         raise
#                     # If we get to here, the caller has passed in an Exception
#                     # subclass populated with non-ASCII data without special
#                     # handling to display as a string. We need to handle this
#                     # without raising a further exception. We do an
#                     # approximation to what the Exception's standard str()
#                     # output should be.
#                     s = ' '.join([force_unicode(arg, encoding, strings_only,
#                             errors) for arg in s])
#         elif not isinstance(s, unicode):
#             # Note: We use .decode() here, instead of unicode(s, encoding,
#             # errors), so that if s is a SafeString, it ends up being a
#             # SafeUnicode at the end.
#             s = s.decode(encoding, errors)
#     except UnicodeDecodeError, e:
#         if not isinstance(s, Exception):
#             raise DjangoUnicodeDecodeError(s, *e.args)
#         else:
#             # If we get to here, the caller has passed in an Exception
#             # subclass populated with non-ASCII bytestring data without a
#             # working unicode method. Try to handle this without raising a
#             # further exception by individually forcing the exception args
#             # to unicode.
#             s = ' '.join([force_unicode(arg, encoding, strings_only,
#                     errors) for arg in s])
#     return s
# 
# 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 warnings
from airy.core.conf import settings
from airy.utils.encoding import force_unicode
from airy.utils.safestring import mark_safe, SafeData
    return force_unicode(gettext(message))

gettext_noop = gettext_lazy = _ = gettext

def to_locale(language):
    p = language.find('-')
    if p >= 0:
        return language[:p].lower()+'_'+language[p+1:].upper()
    else:
        return language.lower()

def get_language_from_request(request):
    return settings.LANGUAGE_CODE

# get_date_formats and get_partial_date_formats aren't used anymore by Django
# but are kept for backward compatibility.
def get_date_formats():
    warnings.warn(
        '`django.utils.translation.get_date_formats` is deprecated. '
        'Please update your code to use the new i18n aware formatting.',
        DeprecationWarning
    )
    return settings.DATE_FORMAT, settings.DATETIME_FORMAT, settings.TIME_FORMAT

def get_partial_date_formats():
    warnings.warn(
        '`django.utils.translation.get_partial_date_formats` is deprecated. '
        'Please update your code to use the new i18n aware formatting.',
        DeprecationWarning
    )

# Path: airy/core/conf.py
# class Settings(object):
#     def __init__(self, **entries):
#     def __getattribute__(self, name):
# def _ensure_defaults(dsettings, options, project_root, config_filename):
# def _preconfigure(project_root, config_filename='settings.py', argv=[]):
# 
# Path: airy/utils/encoding.py
# def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'):
#     """
#     Similar to smart_unicode, except that lazy instances are resolved to
#     strings, rather than kept as lazy objects.
# 
#     If strings_only is True, don't convert (some) non-string-like objects.
#     """
#     # Handle the common case first, saves 30-40% in performance when s
#     # is an instance of unicode. This function gets called often in that
#     # setting.
#     if isinstance(s, unicode):
#         return s
#     if strings_only and is_protected_type(s):
#         return s
#     try:
#         if not isinstance(s, basestring,):
#             if hasattr(s, '__unicode__'):
#                 s = unicode(s)
#             else:
#                 try:
#                     s = unicode(str(s), encoding, errors)
#                 except UnicodeEncodeError:
#                     if not isinstance(s, Exception):
#                         raise
#                     # If we get to here, the caller has passed in an Exception
#                     # subclass populated with non-ASCII data without special
#                     # handling to display as a string. We need to handle this
#                     # without raising a further exception. We do an
#                     # approximation to what the Exception's standard str()
#                     # output should be.
#                     s = ' '.join([force_unicode(arg, encoding, strings_only,
#                             errors) for arg in s])
#         elif not isinstance(s, unicode):
#             # Note: We use .decode() here, instead of unicode(s, encoding,
#             # errors), so that if s is a SafeString, it ends up being a
#             # SafeUnicode at the end.
#             s = s.decode(encoding, errors)
#     except UnicodeDecodeError, e:
#         if not isinstance(s, Exception):
#             raise DjangoUnicodeDecodeError(s, *e.args)
#         else:
#             # If we get to here, the caller has passed in an Exception
#             # subclass populated with non-ASCII bytestring data without a
#             # working unicode method. Try to handle this without raising a
#             # further exception by individually forcing the exception args
#             # to unicode.
#             s = ' '.join([force_unicode(arg, encoding, strings_only,
#                     errors) for arg in s])
#     return s
# 
# 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_null.py
import warnings
from airy.core.conf import settings
from airy.utils.encoding import force_unicode
from airy.utils.safestring import mark_safe, SafeData

    return force_unicode(gettext(message))

gettext_noop = gettext_lazy = _ = gettext

def to_locale(language):
    p = language.find('-')
    if p >= 0:
        return language[:p].lower()+'_'+language[p+1:].upper()
    else:
        return language.lower()

def get_language_from_request(request):
    return settings.LANGUAGE_CODE

# get_date_formats and get_partial_date_formats aren't used anymore by Django
# but are kept for backward compatibility.
def get_date_formats():
    warnings.warn(
        '`django.utils.translation.get_date_formats` is deprecated. '
        'Please update your code to use the new i18n aware formatting.',
        DeprecationWarning
    )
    return settings.DATE_FORMAT, settings.DATETIME_FORMAT, settings.TIME_FORMAT

def get_partial_date_formats():
    warnings.warn(
        '`django.utils.translation.get_partial_date_formats` is deprecated. '
        'Please update your code to use the new i18n aware formatting.',
        DeprecationWarning
    )

    return settings.YEAR_MONTH_FORMAT, settings.MONTH_DAY_FORMAT