# Path: mezzanine/core/translation.py
# class TranslatedRichText(TranslationOptions):
#     fields = ("content",)
# 
# Path: mezzanine/galleries/models.py
# class Gallery(Page, RichText, BaseGallery):
#     """
#     Page bucket for gallery photos.
#     """
# 
#     class Meta:
#         verbose_name = _("Gallery")
#         verbose_name_plural = _("Galleries")
# 
# class GalleryImage(Orderable):
# 
#     gallery = models.ForeignKey(
#         "Gallery", on_delete=models.CASCADE, related_name="images"
#     )
#     file = FileField(
#         _("File"),
#         max_length=200,
#         format="Image",
#         upload_to=upload_to("galleries.GalleryImage.file", "galleries"),
#     )
#     description = models.CharField(_("Description"), max_length=1000, blank=True)
# 
#     class Meta:
#         verbose_name = _("Image")
#         verbose_name_plural = _("Images")
# 
#     def __str__(self):
#         return self.description
# 
#     def save(self, *args, **kwargs):
#         """
#         If no description is given when created, create one from the
#         file name.
#         """
#         if not self.id and not self.description:
#             name = force_str(self.file)
#             name = name.rsplit("/", 1)[-1].rsplit(".", 1)[0]
#             name = name.replace("'", "")
#             name = "".join(c if c not in punctuation else " " for c in name)
#             # str.title() doesn't deal with unicode very well.
#             # http://bugs.python.org/issue6412
#             name = "".join(
#                 s.upper() if i == 0 or name[i - 1] == " " else s
#                 for i, s in enumerate(name)
#             )
#             self.description = name
#         super().save(*args, **kwargs)


from modeltranslation.translator import TranslationOptions, translator
from mezzanine.core.translation import TranslatedRichText
from mezzanine.galleries.models import Gallery, GalleryImage



class TranslatedGallery(TranslatedRichText):
    fields = ()


class TranslatedGalleryImage(TranslationOptions):

# Path: mezzanine/core/translation.py
# class TranslatedRichText(TranslationOptions):
#     fields = ("content",)
# 
# Path: mezzanine/galleries/models.py
# class Gallery(Page, RichText, BaseGallery):
#     """
#     Page bucket for gallery photos.
#     """
# 
#     class Meta:
#         verbose_name = _("Gallery")
#         verbose_name_plural = _("Galleries")
# 
# class GalleryImage(Orderable):
# 
#     gallery = models.ForeignKey(
#         "Gallery", on_delete=models.CASCADE, related_name="images"
#     )
#     file = FileField(
#         _("File"),
#         max_length=200,
#         format="Image",
#         upload_to=upload_to("galleries.GalleryImage.file", "galleries"),
#     )
#     description = models.CharField(_("Description"), max_length=1000, blank=True)
# 
#     class Meta:
#         verbose_name = _("Image")
#         verbose_name_plural = _("Images")
# 
#     def __str__(self):
#         return self.description
# 
#     def save(self, *args, **kwargs):
#         """
#         If no description is given when created, create one from the
#         file name.
#         """
#         if not self.id and not self.description:
#             name = force_str(self.file)
#             name = name.rsplit("/", 1)[-1].rsplit(".", 1)[0]
#             name = name.replace("'", "")
#             name = "".join(c if c not in punctuation else " " for c in name)
#             # str.title() doesn't deal with unicode very well.
#             # http://bugs.python.org/issue6412
#             name = "".join(
#                 s.upper() if i == 0 or name[i - 1] == " " else s
#                 for i, s in enumerate(name)
#             )
#             self.description = name
#         super().save(*args, **kwargs)


# Path: mezzanine/galleries/translation.py
from modeltranslation.translator import TranslationOptions, translator
from mezzanine.core.translation import TranslatedRichText
from mezzanine.galleries.models import Gallery, GalleryImage




class TranslatedGallery(TranslatedRichText):
    fields = ()


class TranslatedGalleryImage(TranslationOptions):

    fields = ("description",)