1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from modeltranslation.translator import translator, TranslationOptions
7 from catalogue.models import Collection, Tag, Source
8 from infopages.models import InfoPage
9 from chunks.models import Chunk
11 class InfoPageTranslationOptions(TranslationOptions):
12 fields = ('title', 'left_column', 'right_column')
14 class TagTranslationOptions(TranslationOptions):
15 fields = ('name', 'description', 'wiki_link')
17 class CollectionTranslationOptions(TranslationOptions):
18 fields = ('title', 'description')
20 class SourceTranslationOptions(TranslationOptions):
23 class ChunkTranslationOptions(TranslationOptions):
26 translator.register(InfoPage, InfoPageTranslationOptions)
27 translator.register(Tag, TagTranslationOptions)
28 translator.register(Collection, CollectionTranslationOptions)
29 translator.register(Source, SourceTranslationOptions)
30 translator.register(Chunk, ChunkTranslationOptions)