"""Registering translated models for the ``hero_slider`` app.""" from simple_translation.translation_pool import translation_pool from .models import ( Nationality, NationalityTranslation, LinkType, LinkTypeTranslation, Person, PersonTranslation, Role, RoleTranslation, ) translation_pool.register_translation(Nationality, NationalityTranslation) translation_pool.register_translation(LinkType, LinkTypeTranslation) translation_pool.register_translation(Person, PersonTranslation) translation_pool.register_translation(Role, RoleTranslation)
"""Registering translated models for the ``multilingual_events`` app.""" from simple_translation.translation_pool import translation_pool from . import models translation_pool.register_translation( models.EventCategory, models.EventCategoryTitle) translation_pool.register_translation(models.Event, models.EventTitle)
"""Registering translated models for the ``hero_slider`` app.""" from simple_translation.translation_pool import translation_pool from . import models translation_pool.register_translation( models.SliderItem, models.SliderItemTitle) translation_pool.register_translation( models.SliderItemCategory, models.SliderItemCategoryTitle)
from cmsplugin_blog.models import Entry, EntryTitle from simple_translation.translation_pool import translation_pool translation_pool.register_translation(Entry, EntryTitle)
"""Registering translated models for the ``cmsplugin_blog_seo_addons`` app.""" from simple_translation.translation_pool import translation_pool from .models import SEOAddon, SEOAddonTranslation translation_pool.register_translation(SEOAddon, SEOAddonTranslation)
"""Registering translated models for the ``cmsplugin_blog_categories`` app.""" from simple_translation.translation_pool import translation_pool from cmsplugin_blog_categories.models import Category, CategoryTitle translation_pool.register_translation(Category, CategoryTitle)
"""Registering translated models for the ``tagging_translated`` app.""" from simple_translation.translation_pool import translation_pool from tagging.models import Tag from .models import TagTitle translation_pool.register_translation(Tag, TagTitle)
from simple_translation.translation_pool import translation_pool from wlansi_store import models translation_pool.register_translation(models.Product, models.ProductTitle)
"""Registration of models for simple-translation.""" from simple_translation.translation_pool import translation_pool from document_library.models import ( Document, DocumentCategory, DocumentCategoryTitle, DocumentTitle, ) translation_pool.register_translation(Document, DocumentTitle) translation_pool.register_translation(DocumentCategory, DocumentCategoryTitle)
"""Translations for the ``review`` app.""" from simple_translation.translation_pool import translation_pool from . import models translation_pool.register_translation(models.RatingCategory, models.RatingCategoryTranslation)
from simple_translation.translation_pool import translation_pool from ...models_mixins import ( SimpleTranslationMixin, SimpleTranslationPublishedManager, ) class DummyProfile(SimpleTranslationMixin, models.Model): """Just a dummy profile model for testing purposes.""" user = models.ForeignKey('auth.User') dummy_field = models.CharField( verbose_name=_('Dummy Field'), max_length=128, ) objects = SimpleTranslationPublishedManager() class DummyProfileTranslation(models.Model): """Just a translation of the dummy profile.""" dummy_translation = models.CharField(max_length=128) is_published = models.BooleanField(default=True) language = models.CharField(max_length=8, default='en') dummyprofile = models.ForeignKey(DummyProfile) translation_pool.register_translation(DummyProfile, DummyProfileTranslation)
"""Registration of models of the ``enquiry`` app.""" from simple_translation.translation_pool import translation_pool from enquiry.models import ( Answer, AnswerTrans, Enquiry, EnquiryTrans, ) translation_pool.register_translation(Answer, AnswerTrans) translation_pool.register_translation(Enquiry, EnquiryTrans)
from simple_translation.translation_pool import translation_pool from treemenus.models import MenuItem from models import MenuItemExt translation_pool.register_translation(MenuItem, MenuItemExt)
"""Registering translated models for the ``roadmap`` app.""" from simple_translation.translation_pool import translation_pool from .models import Event, EventTranslation, Milestone, MilestoneTranslation translation_pool.register_translation(Event, EventTranslation) translation_pool.register_translation(Milestone, MilestoneTranslation)
"""Registration of models for simple-translation.""" from simple_translation.translation_pool import translation_pool from .models import NewsEntry, NewsEntryTitle translation_pool.register_translation(NewsEntry, NewsEntryTitle)