# Path: mkdocs/commands/babel.py
# DEFAULT_MAPPING_FILE = path.normpath(path.join(
#     path.abspath(path.dirname(__file__)), '../themes/babel.cfg'
# ))
# class ThemeMixin:
# class compile_catalog(babel.compile_catalog, ThemeMixin):
# class extract_messages(babel.extract_messages, ThemeMixin):
# class init_catalog(babel.init_catalog, ThemeMixin):
# class update_catalog(babel.update_catalog, ThemeMixin):
#     def get_theme_dir(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):


import unittest
from distutils.dist import Distribution
from distutils.errors import DistutilsOptionError
from os import path
from mkdocs.commands import babel
        '''
        cmd = babel.init_catalog(dist)
        cmd.initialize_options()
        cmd.theme = 'mkdocs'
        cmd.locale = 'en'
        cmd.finalize_options()
        self.assertEqual(cmd.input_file, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/messages.pot'))
        self.assertEqual(cmd.output_dir, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/locales'))

    def test_init_catalog_default_theme(self):
        dist = Distribution()
        dist.entry_points = '''
            [mkdocs.themes]
            mkdocs = mkdocs.themes.mkdocs
        '''
        cmd = babel.init_catalog(dist)
        cmd.initialize_options()
        cmd.locale = 'en'
        self.assertIsNone(cmd.theme)
        cmd.finalize_options()
        self.assertEqual(cmd.theme, 'mkdocs')
        self.assertEqual(cmd.input_file, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/messages.pot'))
        self.assertEqual(cmd.output_dir, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/locales'))

    def test_init_catalog_ignore_theme(self):
        dist = Distribution()
        dist.entry_points = '''
            [mkdocs.themes]
            mkdocs = mkdocs.themes.mkdocs
        '''

# Path: mkdocs/commands/babel.py
# DEFAULT_MAPPING_FILE = path.normpath(path.join(
#     path.abspath(path.dirname(__file__)), '../themes/babel.cfg'
# ))
# class ThemeMixin:
# class compile_catalog(babel.compile_catalog, ThemeMixin):
# class extract_messages(babel.extract_messages, ThemeMixin):
# class init_catalog(babel.init_catalog, ThemeMixin):
# class update_catalog(babel.update_catalog, ThemeMixin):
#     def get_theme_dir(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):
#     def initialize_options(self):
#     def finalize_options(self):


# Path: mkdocs/tests/babel_cmd_tests.py
import unittest
from distutils.dist import Distribution
from distutils.errors import DistutilsOptionError
from os import path
from mkdocs.commands import babel

        '''
        cmd = babel.init_catalog(dist)
        cmd.initialize_options()
        cmd.theme = 'mkdocs'
        cmd.locale = 'en'
        cmd.finalize_options()
        self.assertEqual(cmd.input_file, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/messages.pot'))
        self.assertEqual(cmd.output_dir, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/locales'))

    def test_init_catalog_default_theme(self):
        dist = Distribution()
        dist.entry_points = '''
            [mkdocs.themes]
            mkdocs = mkdocs.themes.mkdocs
        '''
        cmd = babel.init_catalog(dist)
        cmd.initialize_options()
        cmd.locale = 'en'
        self.assertIsNone(cmd.theme)
        cmd.finalize_options()
        self.assertEqual(cmd.theme, 'mkdocs')
        self.assertEqual(cmd.input_file, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/messages.pot'))
        self.assertEqual(cmd.output_dir, path.join(BASE_DIR, 'mkdocs', 'themes', 'mkdocs/locales'))

    def test_init_catalog_ignore_theme(self):
        dist = Distribution()
        dist.entry_points = '''
            [mkdocs.themes]
            mkdocs = mkdocs.themes.mkdocs
        '''

        cmd = babel.init_catalog(dist)