# Path: easymode/utils/languagecode.py
# def get_language_codes():
#     """
#     Retrieves all the language codes defined in ``settings.LANGUAGES``.
#     
#     >>> settings.LANGUAGES = (('en','English'),('de','German'),('nl-be','Belgium dutch'),('fr-be','Belgium french'),)
#     >>> sorted( get_language_codes() )
#     ['de', 'en', 'fr-be', 'nl-be']
#     
#     :rtype: A :class:`list` of language codes.
#     """
#     return dict(settings.LANGUAGES).keys()
# 
# Path: easymode/utils/polibext.py
# def po_to_unicode(po_obj):
#     def __init__(self, stream, fpath=None, encoding='utf-8', wrapwidth=78):
# class PoStream(polib._POFileParser):


import os
import re
import subprocess
import codecs
import logging
import StringIO
import unicodedata
import easymode.tree.introspection
    import polib
from datetime import datetime
from django.conf import settings
from django.core.management.base import CommandError
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import templatize, to_locale, get_language
    from django.utils.timezone import tzinfo
    from django.utils import tzinfo
from django.template.loader import render_to_string
from easymode.utils import mutex
from easymode.utils.languagecode import get_language_codes
from easymode.utils import polibext
"""


try:
except ImportError:



try:
except ImportError:
    raise ImproperlyConfigured(
        """
        Please install either django-rosetta: 
        http://code.google.com/p/django-rosetta/
        or polib:
        http://bitbucket.org/izi/polib/src/
        otherwise easymode.i18n.gettext won't work"""
    )

__all__ = ('MakeModelMessages', 'XGETTEXT_REENCODES_UTF8')


source_re = re.compile(r'#: .*?:(\d+)', re.UNICODE)

# check if we have a crap version of xgettext
XGETTEXT_REENCODES_UTF8 = False
p = subprocess.Popen('xgettext --version', shell=True, stdin=subprocess.PIPE,
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(msg, err) = p.communicate()
match = re.search(r'(?P<major>\d+)\.(?P<minor>\d+)', msg)

# Path: easymode/utils/languagecode.py
# def get_language_codes():
#     """
#     Retrieves all the language codes defined in ``settings.LANGUAGES``.
#     
#     >>> settings.LANGUAGES = (('en','English'),('de','German'),('nl-be','Belgium dutch'),('fr-be','Belgium french'),)
#     >>> sorted( get_language_codes() )
#     ['de', 'en', 'fr-be', 'nl-be']
#     
#     :rtype: A :class:`list` of language codes.
#     """
#     return dict(settings.LANGUAGES).keys()
# 
# Path: easymode/utils/polibext.py
# def po_to_unicode(po_obj):
#     def __init__(self, stream, fpath=None, encoding='utf-8', wrapwidth=78):
# class PoStream(polib._POFileParser):


# Path: easymode/i18n/gettext.py
import os
import re
import subprocess
import codecs
import logging
import StringIO
import unicodedata
import easymode.tree.introspection
    import polib
from datetime import datetime
from django.conf import settings
from django.core.management.base import CommandError
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import templatize, to_locale, get_language
    from django.utils.timezone import tzinfo
    from django.utils import tzinfo
from django.template.loader import render_to_string
from easymode.utils import mutex
from easymode.utils.languagecode import get_language_codes
from easymode.utils import polibext

"""


try:
except ImportError:



try:
except ImportError:
    raise ImproperlyConfigured(
        """
        Please install either django-rosetta: 
        http://code.google.com/p/django-rosetta/
        or polib:
        http://bitbucket.org/izi/polib/src/
        otherwise easymode.i18n.gettext won't work"""
    )

__all__ = ('MakeModelMessages', 'XGETTEXT_REENCODES_UTF8')


source_re = re.compile(r'#: .*?:(\d+)', re.UNICODE)

# check if we have a crap version of xgettext
XGETTEXT_REENCODES_UTF8 = False
p = subprocess.Popen('xgettext --version', shell=True, stdin=subprocess.PIPE,
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(msg, err) = p.communicate()
match = re.search(r'(?P<major>\d+)\.(?P<minor>\d+)', msg)

if match: