""" This module holds the managers and querysets for the ``translation`` app. """

from django.db import models
from mtp.apps.sync.managers import SyncableQuerySet


class TranslatableLanguageManager(models.Manager):
    """ The Manager for the ``mtp.apps.translation.models.TranslatableLanguage`` model. """

    pass


class TranslatableLanguageQuerySet(SyncableQuerySet, models.QuerySet):
    """ The QuerySet for the ``mtp.apps.translation.models.TranslatableLanguage`` model. """

    def enabled(self):
        """ Filter only ``TranslatableLanguage`` enabled instances.

        Returns
        -------
        QuerySet of ``mtp.apps.translation.models.TranslatableLanguage``
        """
        return self.filter(enabled=True)
