Esempio n. 1
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import Spacer

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS + \
                     conf.SPACERPLUGIN_TRANSLATED_FIELDS


class SpacerTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('slider')
    translator.register(Spacer, SpacerTranslationOptions)
Esempio n. 2
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import Section


translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.SECTIONPLUGIN_TRANSLATED_FIELDS


class SectionTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('section')
    translator.register(Section, SectionTranslationOptions)
Esempio n. 3
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from djangocms_baseplugins.image.models import Image
from . import conf

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.IMAGEPLUGIN_TRANSLATED_FIELDS


class ImageTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('image')
    translator.register(Image, ImageTranslationOptions)
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import TeaserSection

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.TEASERSECTIONPLUGIN_TRANSLATED_FIELDS


class TeaserSectionTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('teaser_section')
    translator.register(TeaserSection, TeaserSectionTranslationOptions)
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import TweetEmbed

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS + \
                     conf.TWEETEMBEDPLUGIN_TRANSLATED_FIELDS


class TweetEmbedTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('twitter')
    translator.register(TweetEmbed, TweetEmbedTranslationOptions)
Esempio n. 6
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import Video

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.VIDEOPLUGIN_TRANSLATED_FIELDS


class VideoTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('video')
    translator.register(Video, VideoTranslationOptions)
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from .models import LoginForm

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS


class LoginFormTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('loginform')
    translator.register(LoginForm, LoginFormTranslationOptions)
Esempio n. 8
0
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from djangocms_baseplugins.download.models import Download, DownloadSection
from . import conf

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.DOWNLOADPLUGIN_TRANSLATED_FIELDS


class DownloadTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('download')
    translator.register(Download, DownloadTranslationOptions)

section_translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                             + conf.DOWNLOADPLUGIN_TRANSLATED_FIELDS


class DownloadSectionTranslationOptions(TranslationOptions):
    fields = section_translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('download')
    translator.register(DownloadSection, DownloadSectionTranslationOptions)
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from djangocms_baseplugins.inline_gallery.models import InlineGallery
from . import conf

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.INLINEGALLERYPLUGIN_TRANSLATED_FIELDS


class InlineGalleryTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('inline_gallery')
    translator.register(InlineGallery, InlineGalleryTranslationOptions)
Esempio n. 10
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from djangocms_baseplugins.inline_download.models import InlineDownload, InlineDownloadEntry
from . import conf

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS + \
                     conf.INLINEDOWNLOADPLUGIN_TRANSLATED_FIELDS


class InlineDownloadTranslationOptions(TranslationOptions):
    fields = translation_fields


translation_fields = conf.INLINEDOWNLOADPLUGIN_ENTRY_TRANSLATED_FIELDS


class InlineDownloadEntryTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('inline_download')
    translator.register(InlineDownload, InlineDownloadTranslationOptions)
    translator.register(InlineDownloadEntry, InlineDownloadEntryTranslationOptions)
Esempio n. 11
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import Text

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.TEXTPLUGIN_TRANSLATED_FIELDS


class TextTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('text')
    translator.register(Text, TextTranslationOptions)
Esempio n. 12
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import Contact

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.CONTACTPLUGIN_TRANSLATED_FIELDS


class ContactTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('contact')
    translator.register(Contact, ContactTranslationOptions)
Esempio n. 13
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from djangocms_baseplugins.person.models import Person, PersonSection
from . import conf

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.PERSONPLUGIN_TRANSLATED_FIELDS


class PersonTranslationOptions(TranslationOptions):
    fields = translation_fields


translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.PERSONSECTIONPLUGIN_TRANSLATED_FIELDS


class PersonSectionTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('person')
    translator.register(Person, PersonTranslationOptions)
    translator.register(PersonSection, PersonSectionTranslationOptions)
Esempio n. 14
0
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules
from . import conf
from .models import HtmlBlock

translation_fields = defaults.DJANGOCMS_BASEPLUGINS_TRANSLATED_FIELDS \
                     + conf.HTMLBLOCKPLUGIN_TRANSLATED_FIELDS


class HtmlBlockTranslationOptions(TranslationOptions):
    fields = translation_fields


if getattr(settings, 'DJANGOCMS_BASEPLUGINS_TRANSLATE', None):
    check_in_migration_modules('htmlblock')
    translator.register(HtmlBlock, HtmlBlockTranslationOptions)