kpsul/gestioncof/cms/translation.py

42 lines
842 B
Python
Raw Normal View History

2017-08-07 23:31:27 +02:00
from modeltranslation.decorators import register
from modeltranslation.translator import TranslationOptions
2019-01-06 00:17:57 +01:00
from .models import (
COFActuIndexPage,
COFActuPage,
COFDirectoryEntryPage,
COFDirectoryPage,
COFPage,
COFRootPage,
)
2017-08-07 23:31:27 +02:00
2017-08-09 00:07:56 +02:00
@register(COFRootPage)
class COFRootPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ("introduction",)
2017-08-09 00:07:56 +02:00
2019-01-06 00:17:57 +01:00
2017-08-07 23:31:27 +02:00
@register(COFPage)
class COFPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ("body",)
2017-08-09 00:07:56 +02:00
2019-01-06 00:17:57 +01:00
2017-08-09 00:07:56 +02:00
@register(COFActuIndexPage)
class COFActuIndexPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ()
2017-08-09 00:07:56 +02:00
2019-01-06 00:17:57 +01:00
2017-08-09 00:07:56 +02:00
@register(COFActuPage)
class COFActuPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ("chapo", "body")
2017-08-09 00:07:56 +02:00
2019-01-06 00:17:57 +01:00
2017-08-09 00:07:56 +02:00
@register(COFDirectoryPage)
class COFDirectoryPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ("introduction",)
2019-01-06 00:17:57 +01:00
2017-08-09 00:07:56 +02:00
@register(COFDirectoryEntryPage)
class COFDirectoryEntryPageTr(TranslationOptions):
2019-01-06 00:25:41 +01:00
fields = ("body", "links")