diff --git a/cmsplugin_filer_file/__init__.py b/cmsplugin_filer_file/__init__.py new file mode 100644 index 00000000..0b2f79db --- /dev/null +++ b/cmsplugin_filer_file/__init__.py @@ -0,0 +1 @@ +__version__ = "1.1.3" diff --git a/cmsplugin_filer_file/cms_plugins.py b/cmsplugin_filer_file/cms_plugins.py new file mode 100644 index 00000000..44270bfe --- /dev/null +++ b/cmsplugin_filer_file/cms_plugins.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.template.loader import select_template +from django.templatetags.static import static +from django.utils.translation import ugettext_lazy as _ + +from cms.plugin_pool import plugin_pool +from cms.plugin_base import CMSPluginBase + +from .conf import settings +from .forms import FilerFileForm +from .models import FilerFile + + +class FilerFilePlugin(CMSPluginBase): + form = FilerFileForm + module = 'Filer' + model = FilerFile + name = _("File") + TEMPLATE_NAME = 'cmsplugin_filer_file/plugins/file/%s.html' + render_template = TEMPLATE_NAME % 'default' + text_enabled = True + + fieldsets = ( + (None, { + 'fields': [ + 'title', 'file', 'target_blank' + ] + }), + (_('Advanced'), { + 'classes': ['collapse', ], + 'fields': [ + 'link_attributes', + ] + }) + ) + + if settings.CMSPLUGIN_FILER_FILE_STYLE_CHOICES: + fieldsets[0][1]['fields'].append('style') + + def render(self, context, instance, placeholder): + context['object'] = instance + return super(FilerFilePlugin, self).render(context, instance, placeholder) + + def get_render_template(self, context, instance, placeholder): + template = select_template(( + 'cmsplugin_filer_file/plugins/file.html', # backwards compatibility. deprecated! + self.TEMPLATE_NAME % instance.style, + self.TEMPLATE_NAME % 'default', + )) + return template + + def icon_src(self, instance): + file_icon = instance.get_icon_url() + + if file_icon: + return file_icon + return static("filer/icons/file_%sx%s.png" % (32, 32,)) + +plugin_pool.register_plugin(FilerFilePlugin) diff --git a/cmsplugin_filer_file/conf.py b/cmsplugin_filer_file/conf.py new file mode 100644 index 00000000..c6540397 --- /dev/null +++ b/cmsplugin_filer_file/conf.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +from django.conf import settings # NOQA +from appconf import AppConf + + +class CmspluginFilerFolderAppConf(AppConf): + STYLE_CHOICES = ( + # ('default', _('Default')), # define your styles here. + ) + DEFAULT_STYLE = '' + + def configure(self): + # set DEFAULT_STYLE to '' if it is not in STYLE_CHOICES + if not self.configured_data['DEFAULT_STYLE'] in [s for s, l in self.configured_data['STYLE_CHOICES']]: + self.configured_data['DEFAULT_STYLE'] = '' + return self.configured_data diff --git a/cmsplugin_filer_file/forms.py b/cmsplugin_filer_file/forms.py new file mode 100644 index 00000000..307f6ea8 --- /dev/null +++ b/cmsplugin_filer_file/forms.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + +from django import forms + +from djangocms_attributes_field.widgets import AttributesWidget + +from .models import FilerFile + + +class FilerFileForm(forms.ModelForm): + + class Meta: + model = FilerFile + exclude = [] + + def __init__(self, *args, **kwargs): + super(FilerFileForm, self).__init__(*args, **kwargs) + self.fields['link_attributes'].widget = AttributesWidget() diff --git a/cmsplugin_filer_file/locale/ca/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 00000000..f802b1e1 --- /dev/null +++ b/cmsplugin_filer_file/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Roger Pons , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Catalan (http://www.transifex.com/divio/cmsplugin-filer/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Fitxer" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "títol" + +#: models.py:36 +msgid "file" +msgstr "fitxer" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Obre l'enllaç en una nova finestra" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/de/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..b092420f --- /dev/null +++ b/cmsplugin_filer_file/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Jannik V. , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: German (http://www.transifex.com/divio/cmsplugin-filer/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Datei" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "Titel" + +#: models.py:36 +msgid "file" +msgstr "Datei" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Link in neuem Fenster öffnen" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/en/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/en/LC_MESSAGES/django.po new file mode 100644 index 00000000..9dfb2f36 --- /dev/null +++ b/cmsplugin_filer_file/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/es/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/es/LC_MESSAGES/django.po new file mode 100644 index 00000000..0640879c --- /dev/null +++ b/cmsplugin_filer_file/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Javier Sánchez , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Spanish (http://www.transifex.com/divio/cmsplugin-filer/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Archivo" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "título" + +#: models.py:36 +msgid "file" +msgstr "archivo" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Abrir el enlace en una nueva ventana" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/et/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/et/LC_MESSAGES/django.po new file mode 100644 index 00000000..0b386bb3 --- /dev/null +++ b/cmsplugin_filer_file/locale/et/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rivo Zängov , 2012-2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Estonian (http://www.transifex.com/divio/cmsplugin-filer/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Fail" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "pealkiri" + +#: models.py:36 +msgid "file" +msgstr "fail" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Ava link uues aknas" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/eu/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/eu/LC_MESSAGES/django.po new file mode 100644 index 00000000..910468a3 --- /dev/null +++ b/cmsplugin_filer_file/locale/eu/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Basque (http://www.transifex.com/divio/cmsplugin-filer/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Fitxategia" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "izenburua" + +#: models.py:36 +msgid "file" +msgstr "fitxategia" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Ireki esteka leiho berrian" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/fi/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/fi/LC_MESSAGES/django.po new file mode 100644 index 00000000..9c4592f2 --- /dev/null +++ b/cmsplugin_filer_file/locale/fi/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Klaus Dahlén , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Finnish (http://www.transifex.com/divio/cmsplugin-filer/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Tiedosto" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "otsikko" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/fr/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..4af66286 --- /dev/null +++ b/cmsplugin_filer_file/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Bertrand Bordage , 2012 +# Frigory33 , 2016 +# Dylann CORDEL , 2014 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-06 18:33+0000\n" +"Last-Translator: Frigory33 \n" +"Language-Team: French (http://www.transifex.com/divio/cmsplugin-filer/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Fichier" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "Avancé" + +#: models.py:34 +msgid "title" +msgstr "titre" + +#: models.py:36 +msgid "file" +msgstr "fichier" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Ouvrir le lien dans une nouvelle fenêtre" + +#: models.py:42 +msgid "Style" +msgstr "Style" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Facultatif. Ajoute des attributs HTML au lien généré." diff --git a/cmsplugin_filer_file/locale/it/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/it/LC_MESSAGES/django.po new file mode 100644 index 00000000..ec7c2b5a --- /dev/null +++ b/cmsplugin_filer_file/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# yakky , 2012 +# yakky , 2013,2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-13 08:28+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Italian (http://www.transifex.com/divio/cmsplugin-filer/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "File" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "Avanzate" + +#: models.py:34 +msgid "title" +msgstr "titolo" + +#: models.py:36 +msgid "file" +msgstr "file" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Apri collegamento in una nuova finestra" + +#: models.py:42 +msgid "Style" +msgstr "Stile" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Opzionale. Aggiungi attributi HTML al link" diff --git a/cmsplugin_filer_file/locale/it_IT/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/it_IT/LC_MESSAGES/django.po new file mode 100644 index 00000000..6fc74bc3 --- /dev/null +++ b/cmsplugin_filer_file/locale/it_IT/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Italian (Italy) (http://www.transifex.com/divio/cmsplugin-filer/language/it_IT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/lt/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 00000000..b5d4cfaf --- /dev/null +++ b/cmsplugin_filer_file/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Matas Dailyda, 2015 +# Matas Dailyda , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-18 09:19+0000\n" +"Last-Translator: Matas Dailyda \n" +"Language-Team: Lithuanian (http://www.transifex.com/divio/cmsplugin-filer/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Byla" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "Išplėstiniai" + +#: models.py:34 +msgid "title" +msgstr "pavadinimas" + +#: models.py:36 +msgid "file" +msgstr "byla" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Atverti nuorodą naujame lange" + +#: models.py:42 +msgid "Style" +msgstr "Stilius" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Nebūtina. Prideda HTML atributus prie atvaizduojamos nuorodos." diff --git a/cmsplugin_filer_file/locale/lt_LT/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/lt_LT/LC_MESSAGES/django.po new file mode 100644 index 00000000..2fcb0cc4 --- /dev/null +++ b/cmsplugin_filer_file/locale/lt_LT/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/divio/cmsplugin-filer/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/nb/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/nb/LC_MESSAGES/django.po new file mode 100644 index 00000000..d2a9dcc0 --- /dev/null +++ b/cmsplugin_filer_file/locale/nb/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/divio/cmsplugin-filer/language/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/nl/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 00000000..1fdc5e36 --- /dev/null +++ b/cmsplugin_filer_file/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Maikel Wever, 2013 +# kurdyma , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-27 20:23+0000\n" +"Last-Translator: kurdyma \n" +"Language-Team: Dutch (http://www.transifex.com/divio/cmsplugin-filer/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Bestand" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "Geavanveerd" + +#: models.py:34 +msgid "title" +msgstr "titel" + +#: models.py:36 +msgid "file" +msgstr "bestand" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Open link in nieuw venster" + +#: models.py:42 +msgid "Style" +msgstr "Stijl" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Optioneel. Voegt HTML attributen toe aan de gerenderde link." diff --git a/cmsplugin_filer_file/locale/nn/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/nn/LC_MESSAGES/django.po new file mode 100644 index 00000000..f7c29b15 --- /dev/null +++ b/cmsplugin_filer_file/locale/nn/LC_MESSAGES/django.po @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Nynorsk (http://www.transifex.com/divio/cmsplugin-filer/language/nn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "" + +#: models.py:36 +msgid "file" +msgstr "" + +#: models.py:40 +msgid "Open link in new window" +msgstr "" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/pl_PL/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/pl_PL/LC_MESSAGES/django.po new file mode 100644 index 00000000..3e9f0a48 --- /dev/null +++ b/cmsplugin_filer_file/locale/pl_PL/LC_MESSAGES/django.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Mateusz Marzantowicz , 2013 +# Michal Bielicki , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Polish (Poland) (http://www.transifex.com/divio/cmsplugin-filer/language/pl_PL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl_PL\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Plik" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "tytuł" + +#: models.py:36 +msgid "file" +msgstr "plik" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Otwórz odnośnik w nowym oknie" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/pt_BR/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 00000000..ace78165 --- /dev/null +++ b/cmsplugin_filer_file/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rodrigo , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/divio/cmsplugin-filer/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Arquivo" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "título" + +#: models.py:36 +msgid "file" +msgstr "arquivo" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Abrir link em uma nova janela" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/ru/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..a4089c8d --- /dev/null +++ b/cmsplugin_filer_file/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Pavel , 2012 +# Pavel , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Russian (http://www.transifex.com/divio/cmsplugin-filer/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "Файл" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "заголовок" + +#: models.py:36 +msgid "file" +msgstr "файл" + +#: models.py:40 +msgid "Open link in new window" +msgstr "Открыть ссылку в новом окне" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/locale/zh_CN/LC_MESSAGES/django.po b/cmsplugin_filer_file/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 00000000..e8afd841 --- /dev/null +++ b/cmsplugin_filer_file/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Calvin-He , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Chinese (China) (http://www.transifex.com/divio/cmsplugin-filer/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: cms_plugins.py:20 +msgid "File" +msgstr "文件" + +#: cms_plugins.py:31 +msgid "Advanced" +msgstr "" + +#: models.py:34 +msgid "title" +msgstr "标题" + +#: models.py:36 +msgid "file" +msgstr "文件" + +#: models.py:40 +msgid "Open link in new window" +msgstr "在新窗口打开链接" + +#: models.py:42 +msgid "Style" +msgstr "" + +#: models.py:44 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_file/migrations/0001_initial.py b/cmsplugin_filer_file/migrations/0001_initial.py new file mode 100644 index 00000000..77b741b6 --- /dev/null +++ b/cmsplugin_filer_file/migrations/0001_initial.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings +import filer.fields.file + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0003_auto_20140926_2347'), + ('filer', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='FilerFile', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE)), + ('title', models.CharField(max_length=255, null=True, verbose_name='title', blank=True)), + ('target_blank', models.BooleanField(default=False, verbose_name='Open link in new window')), + ('style', models.CharField(default=settings.CMSPLUGIN_FILER_FILE_DEFAULT_STYLE, choices=settings.CMSPLUGIN_FILER_FILE_STYLE_CHOICES, verbose_name='Style', blank=True, max_length=255)), + ('file', filer.fields.file.FilerFileField(verbose_name='file', to='filer.File', on_delete=models.CASCADE)), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/cmsplugin_filer_file/migrations/0002_auto_20160112_1617.py b/cmsplugin_filer_file/migrations/0002_auto_20160112_1617.py new file mode 100644 index 00000000..a3dd9ce8 --- /dev/null +++ b/cmsplugin_filer_file/migrations/0002_auto_20160112_1617.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import filer.fields.file +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_file', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='filerfile', + name='file', + field=filer.fields.file.FilerFileField(on_delete=django.db.models.deletion.SET_NULL, verbose_name='file', to='filer.File', null=True), + ), + ] diff --git a/cmsplugin_filer_file/migrations/0003_filerfile_link_attributes.py b/cmsplugin_filer_file/migrations/0003_filerfile_link_attributes.py new file mode 100644 index 00000000..7a2ed3f0 --- /dev/null +++ b/cmsplugin_filer_file/migrations/0003_filerfile_link_attributes.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.6 on 2016-06-16 21:56 +from __future__ import unicode_literals + +from django.db import migrations +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_file', '0002_auto_20160112_1617'), + ] + + operations = [ + migrations.AddField( + model_name='filerfile', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), + ), + ] diff --git a/cmsplugin_filer_file/migrations/0004_auto_20160705_1334.py b/cmsplugin_filer_file/migrations/0004_auto_20160705_1334.py new file mode 100644 index 00000000..748c256b --- /dev/null +++ b/cmsplugin_filer_file/migrations/0004_auto_20160705_1334.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-07-05 17:34 +from __future__ import unicode_literals + +from django.db import migrations +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_file', '0003_filerfile_link_attributes'), + ] + + operations = [ + migrations.AlterField( + model_name='filerfile', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), + ), + ] diff --git a/cmsplugin_filer_file/migrations/0005_auto_20160713_1853.py b/cmsplugin_filer_file/migrations/0005_auto_20160713_1853.py new file mode 100644 index 00000000..2d6f5afa --- /dev/null +++ b/cmsplugin_filer_file/migrations/0005_auto_20160713_1853.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_file', '0004_auto_20160705_1334'), + ] + + operations = [ + migrations.AlterField( + model_name='filerfile', + name='cmsplugin_ptr', + field=models.OneToOneField(parent_link=True, related_name='cmsplugin_filer_file_filerfile', primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE), + ), + ] diff --git a/cmsplugin_filer_file/migrations/__init__.py b/cmsplugin_filer_file/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_file/models.py b/cmsplugin_filer_file/models.py new file mode 100644 index 00000000..9d2159c9 --- /dev/null +++ b/cmsplugin_filer_file/models.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +from cms.models import CMSPlugin + +from filer.fields.file import FilerFileField + +from cmsplugin_filer_utils import FilerPluginManager +from djangocms_attributes_field.fields import AttributesField + +from .conf import settings + + +class FilerFile(CMSPlugin): + """ + Plugin for storing any type of file. + + Default template displays download link with icon (if available) and file size. + + This could be updated to use the mimetypes library to determine the type of file rather than + storing a separate icon for each different extension. + + The icon search is currently performed within get_icon_url; this is probably a performance concern. + """ + STYLE_CHOICES = settings.CMSPLUGIN_FILER_FILE_STYLE_CHOICES + DEFAULT_STYLE = settings.CMSPLUGIN_FILER_FILE_DEFAULT_STYLE + EXCLUDED_KEYS = ['href', 'target', ] + + title = models.CharField(_("title"), max_length=255, null=True, blank=True) + file = FilerFileField( + verbose_name=_('file'), + null=True, + on_delete=models.SET_NULL, + ) + target_blank = models.BooleanField(_('Open link in new window'), default=False) + style = models.CharField( + _('Style'), choices=STYLE_CHOICES, default=DEFAULT_STYLE, max_length=255, blank=True) + link_attributes = AttributesField(excluded_keys=EXCLUDED_KEYS, blank=True, + help_text=_('Optional. Adds HTML attributes to the rendered link.')) + cmsplugin_ptr = models.OneToOneField( + to=CMSPlugin, + related_name='%(app_label)s_%(class)s', + parent_link=True, + on_delete=models.CASCADE + ) + + objects = FilerPluginManager(select_related=('file',)) + + def get_icon_url(self): + if self.file_id: + return self.file.icons['32'] + return '' + + def file_exists(self): + if self.file_id: + return self.file.file.storage.exists(self.file.file.name) + return False + + def get_file_name(self): + if not self.file_id: + return '' + + if self.file.name in ('', None): + name = "%s" % (self.file.original_filename,) + else: + name = "%s" % (self.file.name,) + return name + + def get_ext(self): + return self.file.extension + + def __str__(self): + if self.title: + return self.title + elif self.file_id: + # added if, because it raised attribute error when file wasnt defined + return self.get_file_name() + return "" + + search_fields = ('title',) diff --git a/cmsplugin_filer_file/templates/cmsplugin_filer_file/plugins/file/default.html b/cmsplugin_filer_file/templates/cmsplugin_filer_file/plugins/file/default.html new file mode 100644 index 00000000..3e752753 --- /dev/null +++ b/cmsplugin_filer_file/templates/cmsplugin_filer_file/plugins/file/default.html @@ -0,0 +1,7 @@ +{% if object.file.url %} + + +{% if object.get_icon_url %}Icon{% endif %} +{% if object.title %}{{ object.title }}{% else %}{{ object.get_file_name }}{% endif %} {% if object.file_exists %}({{ object.file.size|filesizeformat }}){% else %}(file missing!){% endif %} + +{% endif %} diff --git a/cmsplugin_filer_folder/__init__.py b/cmsplugin_filer_folder/__init__.py new file mode 100644 index 00000000..10a7a433 --- /dev/null +++ b/cmsplugin_filer_folder/__init__.py @@ -0,0 +1 @@ +from cmsplugin_filer_file import __version__ # NOQA diff --git a/cmsplugin_filer_folder/admin.py b/cmsplugin_filer_folder/admin.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_folder/cms_plugins.py b/cmsplugin_filer_folder/cms_plugins.py new file mode 100644 index 00000000..36bd802f --- /dev/null +++ b/cmsplugin_filer_folder/cms_plugins.py @@ -0,0 +1,75 @@ +from cms.plugin_pool import plugin_pool +from cms.plugin_base import CMSPluginBase +from django.template.loader import select_template +from django.utils.translation import ugettext_lazy as _ +from . import models +from .conf import settings + +from filer.models.filemodels import File +from filer.models.foldermodels import Folder +from filer.models.abstract import BaseImage + + +class FilerFolderPlugin(CMSPluginBase): + module = 'Filer' + model = models.FilerFolder + name = _("Folder") + TEMPLATE_NAME = 'cmsplugin_filer_folder/plugins/folder/%s.html' + render_template = TEMPLATE_NAME % 'default' + text_enabled = False + admin_preview = False + + fieldsets = ( + (None, {'fields': ['title', 'folder']}), + ) + if settings.CMSPLUGIN_FILER_FOLDER_STYLE_CHOICES: + fieldsets[0][1]['fields'].append('style') + + def get_folder_files(self, folder, user): + qs_files = folder.files.not_instance_of(BaseImage) + if user.is_staff: + return qs_files + else: + return qs_files.filter(is_public=True) + + def get_folder_images(self, folder, user): + qs_files = folder.files.instance_of(BaseImage) + if user.is_staff: + return qs_files + else: + return qs_files.filter(is_public=True) + + def get_children(self, folder): + return folder.get_children() + + def render(self, context, instance, placeholder): + user = context['request'].user + + if instance.folder_id: + folder_files = self.get_folder_files(instance.folder, user) + folder_images = self.get_folder_images(instance.folder, user) + folder_folders = self.get_children(instance.folder) + else: + folder_files = File.objects.none() + folder_images = BaseImage.objects.none() + folder_folders = Folder.objects.none() + + context.update({ + 'object': instance, + 'folder_files': sorted(folder_files), + 'folder_images': sorted(folder_images), + 'folder_folders': folder_folders, + 'placeholder': placeholder + }) + return context + + def get_render_template(self, context, instance, placeholder): + template = select_template(( + 'cmsplugin_filer_folder/folder.html', # backwards compatibility. deprecated! + self.TEMPLATE_NAME % instance.style, + self.TEMPLATE_NAME % 'default', + )) + return template + + +plugin_pool.register_plugin(FilerFolderPlugin) diff --git a/cmsplugin_filer_folder/conf.py b/cmsplugin_filer_folder/conf.py new file mode 100644 index 00000000..c796af8f --- /dev/null +++ b/cmsplugin_filer_folder/conf.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from django.conf import settings # NOQA +from django.utils.translation import ugettext_lazy as _ +from appconf import AppConf + + +class CmspluginFilerFolderAppConf(AppConf): + STYLE_CHOICES = ( + ("list", _("List")), + ("slideshow", _("Slideshow")) + ) + DEFAULT_STYLE = 'list' + + def configure(self): + # set DEFAULT_STYLE to '' if it is not in STYLE_CHOICES + if not self.configured_data['DEFAULT_STYLE'] in [s for s, l in self.configured_data['STYLE_CHOICES']]: + self.configured_data['DEFAULT_STYLE'] = '' + return self.configured_data diff --git a/cmsplugin_filer_folder/locale/ca/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 00000000..cff96fa1 --- /dev/null +++ b/cmsplugin_filer_folder/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Roger Pons , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Catalan (http://www.transifex.com/divio/cmsplugin-filer/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Carpeta" + +#: conf.py:9 +msgid "List" +msgstr "Llista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Projecció de diapositives" + +#: models.py:22 +msgid "title" +msgstr "títol" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Carpetes" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Fitxers" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Imatges" diff --git a/cmsplugin_filer_folder/locale/de/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..7464c6d9 --- /dev/null +++ b/cmsplugin_filer_folder/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Jannik V. , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: German (http://www.transifex.com/divio/cmsplugin-filer/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Ordner" + +#: conf.py:9 +msgid "List" +msgstr "Liste" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "Titel" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Ordner" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Dateien" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Bilder" diff --git a/cmsplugin_filer_folder/locale/en/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/en/LC_MESSAGES/django.po new file mode 100644 index 00000000..d0cc9db1 --- /dev/null +++ b/cmsplugin_filer_folder/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "" + +#: conf.py:9 +msgid "List" +msgstr "" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "" diff --git a/cmsplugin_filer_folder/locale/es/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/es/LC_MESSAGES/django.po new file mode 100644 index 00000000..38cb9b25 --- /dev/null +++ b/cmsplugin_filer_folder/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Javier Sánchez , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Spanish (http://www.transifex.com/divio/cmsplugin-filer/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Directorio" + +#: conf.py:9 +msgid "List" +msgstr "Lista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Presentación de diapositivas" + +#: models.py:22 +msgid "title" +msgstr "título" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Directorios" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Archivos" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Imágenes" diff --git a/cmsplugin_filer_folder/locale/et/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/et/LC_MESSAGES/django.po new file mode 100644 index 00000000..c7b988f3 --- /dev/null +++ b/cmsplugin_filer_folder/locale/et/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rivo Zängov , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Estonian (http://www.transifex.com/divio/cmsplugin-filer/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Kaust" + +#: conf.py:9 +msgid "List" +msgstr "Nimekiri" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Slaidiseanss" + +#: models.py:22 +msgid "title" +msgstr "pealkiri" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Kaustad" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Failid" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Pildid" diff --git a/cmsplugin_filer_folder/locale/eu/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/eu/LC_MESSAGES/django.po new file mode 100644 index 00000000..b3ceb742 --- /dev/null +++ b/cmsplugin_filer_folder/locale/eu/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Basque (http://www.transifex.com/divio/cmsplugin-filer/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Karpeta" + +#: conf.py:9 +msgid "List" +msgstr "Zerrenda" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Diapositibak" + +#: models.py:22 +msgid "title" +msgstr "izenburua" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Karpetak" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Fitxategiak" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Irudiak" diff --git a/cmsplugin_filer_folder/locale/fi/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/fi/LC_MESSAGES/django.po new file mode 100644 index 00000000..42abcca9 --- /dev/null +++ b/cmsplugin_filer_folder/locale/fi/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Klaus Dahlén , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Finnish (http://www.transifex.com/divio/cmsplugin-filer/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Kansio" + +#: conf.py:9 +msgid "List" +msgstr "Lista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Diaesitys" + +#: models.py:22 +msgid "title" +msgstr "otsikko" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Kansiot" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Tiedostot" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Kuvat" diff --git a/cmsplugin_filer_folder/locale/fr/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..568e1827 --- /dev/null +++ b/cmsplugin_filer_folder/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Bertrand Bordage , 2012 +# Frigory33 , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-06 18:33+0000\n" +"Last-Translator: Frigory33 \n" +"Language-Team: French (http://www.transifex.com/divio/cmsplugin-filer/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Dossier" + +#: conf.py:9 +msgid "List" +msgstr "Liste" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Diaporama" + +#: models.py:22 +msgid "title" +msgstr "titre" + +#: models.py:25 +msgid "Style" +msgstr "Style" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Dossiers" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Fichiers" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Images" diff --git a/cmsplugin_filer_folder/locale/it/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/it/LC_MESSAGES/django.po new file mode 100644 index 00000000..6a68a2dd --- /dev/null +++ b/cmsplugin_filer_folder/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# yakky , 2012 +# yakky , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-13 08:28+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Italian (http://www.transifex.com/divio/cmsplugin-filer/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Cartella" + +#: conf.py:9 +msgid "List" +msgstr "Lista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Slideshow" + +#: models.py:22 +msgid "title" +msgstr "titolo" + +#: models.py:25 +msgid "Style" +msgstr "Stile" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Cartelle" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "File" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Immagini" diff --git a/cmsplugin_filer_folder/locale/it_IT/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/it_IT/LC_MESSAGES/django.po new file mode 100644 index 00000000..9e6936b5 --- /dev/null +++ b/cmsplugin_filer_folder/locale/it_IT/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Italian (Italy) (http://www.transifex.com/divio/cmsplugin-filer/language/it_IT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "" + +#: conf.py:9 +msgid "List" +msgstr "" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "" diff --git a/cmsplugin_filer_folder/locale/lt/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 00000000..1364835c --- /dev/null +++ b/cmsplugin_filer_folder/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Matas Dailyda, 2015 +# Matas Dailyda , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-18 09:19+0000\n" +"Last-Translator: Matas Dailyda \n" +"Language-Team: Lithuanian (http://www.transifex.com/divio/cmsplugin-filer/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Aplankas" + +#: conf.py:9 +msgid "List" +msgstr "Sąrašas" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Sąrašas su paveikslėliais" + +#: models.py:22 +msgid "title" +msgstr "pavadinimas" + +#: models.py:25 +msgid "Style" +msgstr "Stilius" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Aplankai" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Bylos" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Paveikslėliai" diff --git a/cmsplugin_filer_folder/locale/lt_LT/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/lt_LT/LC_MESSAGES/django.po new file mode 100644 index 00000000..fb1834ab --- /dev/null +++ b/cmsplugin_filer_folder/locale/lt_LT/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/divio/cmsplugin-filer/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "" + +#: conf.py:9 +msgid "List" +msgstr "" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "" diff --git a/cmsplugin_filer_folder/locale/nb/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/nb/LC_MESSAGES/django.po new file mode 100644 index 00000000..054b57d2 --- /dev/null +++ b/cmsplugin_filer_folder/locale/nb/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/divio/cmsplugin-filer/language/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "" + +#: conf.py:9 +msgid "List" +msgstr "" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "" diff --git a/cmsplugin_filer_folder/locale/nl/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 00000000..df931b27 --- /dev/null +++ b/cmsplugin_filer_folder/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Maikel Wever, 2013 +# kurdyma , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-27 20:24+0000\n" +"Last-Translator: kurdyma \n" +"Language-Team: Dutch (http://www.transifex.com/divio/cmsplugin-filer/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Map" + +#: conf.py:9 +msgid "List" +msgstr "Lijst" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Slideshow" + +#: models.py:22 +msgid "title" +msgstr "titel" + +#: models.py:25 +msgid "Style" +msgstr "Stijl" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Mappen" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Bestanden" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Afbeeldingen" diff --git a/cmsplugin_filer_folder/locale/nn/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/nn/LC_MESSAGES/django.po new file mode 100644 index 00000000..612778e0 --- /dev/null +++ b/cmsplugin_filer_folder/locale/nn/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Nynorsk (http://www.transifex.com/divio/cmsplugin-filer/language/nn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "" + +#: conf.py:9 +msgid "List" +msgstr "" + +#: conf.py:10 +msgid "Slideshow" +msgstr "" + +#: models.py:22 +msgid "title" +msgstr "" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "" diff --git a/cmsplugin_filer_folder/locale/pl_PL/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/pl_PL/LC_MESSAGES/django.po new file mode 100644 index 00000000..1c05e031 --- /dev/null +++ b/cmsplugin_filer_folder/locale/pl_PL/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Mateusz Marzantowicz , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Polish (Poland) (http://www.transifex.com/divio/cmsplugin-filer/language/pl_PL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl_PL\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Katalog" + +#: conf.py:9 +msgid "List" +msgstr "Lista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Pokaz slajdów" + +#: models.py:22 +msgid "title" +msgstr "tytuł" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Katalogi" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Pliki" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Obrazy" diff --git a/cmsplugin_filer_folder/locale/pt_BR/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 00000000..ccbb1632 --- /dev/null +++ b/cmsplugin_filer_folder/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rodrigo , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/divio/cmsplugin-filer/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Pasta" + +#: conf.py:9 +msgid "List" +msgstr "Lista" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Slideshow" + +#: models.py:22 +msgid "title" +msgstr "título" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Pastas" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Arquivos" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Imagens" diff --git a/cmsplugin_filer_folder/locale/ru/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..d46aaf9c --- /dev/null +++ b/cmsplugin_filer_folder/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Pavel , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Russian (http://www.transifex.com/divio/cmsplugin-filer/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "Папка" + +#: conf.py:9 +msgid "List" +msgstr "Список" + +#: conf.py:10 +msgid "Slideshow" +msgstr "Слайдшоу" + +#: models.py:22 +msgid "title" +msgstr "заголовок" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "Папки" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "Файлы" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "Изображения" diff --git a/cmsplugin_filer_folder/locale/zh_CN/LC_MESSAGES/django.po b/cmsplugin_filer_folder/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 00000000..0c090e91 --- /dev/null +++ b/cmsplugin_filer_folder/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,51 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Calvin-He , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Chinese (China) (http://www.transifex.com/divio/cmsplugin-filer/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: cms_plugins.py:16 +msgid "Folder" +msgstr "文件夹" + +#: conf.py:9 +msgid "List" +msgstr "列表" + +#: conf.py:10 +msgid "Slideshow" +msgstr "幻灯片" + +#: models.py:22 +msgid "title" +msgstr "标题" + +#: models.py:25 +msgid "Style" +msgstr "" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:23 +msgid "Folders" +msgstr "文件夹" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:31 +msgid "Files" +msgstr "文件" + +#: templates/cmsplugin_filer_folder/plugins/folder/default.html:39 +msgid "Images" +msgstr "图片" diff --git a/cmsplugin_filer_folder/migrations/0001_initial.py b/cmsplugin_filer_folder/migrations/0001_initial.py new file mode 100644 index 00000000..44e03b43 --- /dev/null +++ b/cmsplugin_filer_folder/migrations/0001_initial.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings +import filer.fields.folder + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0003_auto_20140926_2347'), + ('filer', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='FilerFolder', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE)), + ('title', models.CharField(max_length=255, null=True, verbose_name='title', blank=True)), + ('style', models.CharField(default=settings.CMSPLUGIN_FILER_FOLDER_DEFAULT_STYLE, max_length=50, verbose_name='Style', choices=settings.CMSPLUGIN_FILER_FOLDER_STYLE_CHOICES)), + ('folder', filer.fields.folder.FilerFolderField(to='filer.Folder', on_delete=models.CASCADE)), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] \ No newline at end of file diff --git a/cmsplugin_filer_folder/migrations/0002_auto_20160113_1318.py b/cmsplugin_filer_folder/migrations/0002_auto_20160113_1318.py new file mode 100644 index 00000000..4d461a40 --- /dev/null +++ b/cmsplugin_filer_folder/migrations/0002_auto_20160113_1318.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import filer.fields.folder +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_folder', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='filerfolder', + name='folder', + field=filer.fields.folder.FilerFolderField(on_delete=django.db.models.deletion.SET_NULL, to='filer.Folder', null=True), + ), + ] diff --git a/cmsplugin_filer_folder/migrations/0003_auto_20160713_1853.py b/cmsplugin_filer_folder/migrations/0003_auto_20160713_1853.py new file mode 100644 index 00000000..cb7c4299 --- /dev/null +++ b/cmsplugin_filer_folder/migrations/0003_auto_20160713_1853.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_folder', '0002_auto_20160113_1318'), + ] + + operations = [ + migrations.AlterField( + model_name='filerfolder', + name='cmsplugin_ptr', + field=models.OneToOneField(parent_link=True, related_name='cmsplugin_filer_folder_filerfolder', primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE), + ), + ] diff --git a/cmsplugin_filer_folder/migrations/__init__.py b/cmsplugin_filer_folder/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_folder/models.py b/cmsplugin_filer_folder/models.py new file mode 100644 index 00000000..5be65cf0 --- /dev/null +++ b/cmsplugin_filer_folder/models.py @@ -0,0 +1,49 @@ +from __future__ import unicode_literals + +import warnings +from django.db import models +from cms.models import CMSPlugin +from django.utils.translation import ugettext_lazy as _ +from filer.fields.folder import FilerFolderField +from .conf import settings +from cmsplugin_filer_utils import FilerPluginManager + + +class FilerFolder(CMSPlugin): + """ + Plugin for storing any type of Folder. + + Default template displays files store inside this folder. + """ + STYLE_CHOICES = settings.CMSPLUGIN_FILER_FOLDER_STYLE_CHOICES + DEFAULT_STYLE = settings.CMSPLUGIN_FILER_FOLDER_DEFAULT_STYLE + title = models.CharField(_("title"), max_length=255, null=True, blank=True) + folder = FilerFolderField(null=True, on_delete=models.SET_NULL) + style = models.CharField( + _('Style'), choices=STYLE_CHOICES, default=DEFAULT_STYLE, max_length=50) + cmsplugin_ptr = models.OneToOneField( + to=CMSPlugin, + related_name='%(app_label)s_%(class)s', + parent_link=True, + on_delete=models.CASCADE + ) + + objects = FilerPluginManager(select_related=('folder',)) + + @property + def view_option(self): + warnings.warn("view_option on cmsplugin_filer_folder.FilderFolder is deprecated. Use .style instead.", + DeprecationWarning) + return self.style + + def __str__(self): + return self.get_display_name() + + def get_display_name(self): + if self.title: + return self.title + elif self.folder_id and self.folder.name: + return self.folder.name + return "" + + search_fields = ('title',) diff --git a/cmsplugin_filer_folder/static/cmsplugin_filer_folder/css/slideshow.css b/cmsplugin_filer_folder/static/cmsplugin_filer_folder/css/slideshow.css new file mode 100644 index 00000000..f72092ae --- /dev/null +++ b/cmsplugin_filer_folder/static/cmsplugin_filer_folder/css/slideshow.css @@ -0,0 +1,2 @@ +.cmsplugin_filer_folder_slideshow { padding: 5px; } +.cmsplugin_filer_folder_slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; } \ No newline at end of file diff --git a/cmsplugin_filer_folder/static/cmsplugin_filer_folder/js/jquery.cycle.lite-1.7.js b/cmsplugin_filer_folder/static/cmsplugin_filer_folder/js/jquery.cycle.lite-1.7.js new file mode 100644 index 00000000..d22ed39e --- /dev/null +++ b/cmsplugin_filer_folder/static/cmsplugin_filer_folder/js/jquery.cycle.lite-1.7.js @@ -0,0 +1,235 @@ +/*! + * jQuery Cycle Lite Plugin + * http://malsup.com/jquery/cycle/lite/ + * Copyright (c) 2008-2012 M. Alsup + * Version: 1.7 (20-FEB-2013) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * Requires: jQuery v1.3.2 or later + */ +;(function($) { +"use strict"; + +var ver = 'Lite-1.7'; +var msie = /MSIE/.test(navigator.userAgent); + +$.fn.cycle = function(options) { + return this.each(function() { + options = options || {}; + + if (this.cycleTimeout) + clearTimeout(this.cycleTimeout); + + this.cycleTimeout = 0; + this.cyclePause = 0; + + var $cont = $(this); + var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children(); + var els = $slides.get(); + if (els.length < 2) { + if (window.console) + console.log('terminating; too few slides: ' + els.length); + return; // don't bother + } + + // support metadata plugin (v1.0 and v2.0) + var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); + var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null; + if (meta) + opts = $.extend(opts, meta); + + opts.before = opts.before ? [opts.before] : []; + opts.after = opts.after ? [opts.after] : []; + opts.after.unshift(function(){ opts.busy=0; }); + + // allow shorthand overrides of width, height and timeout + var cls = this.className; + opts.width = parseInt((cls.match(/w:(\d+)/)||[])[1], 10) || opts.width; + opts.height = parseInt((cls.match(/h:(\d+)/)||[])[1], 10) || opts.height; + opts.timeout = parseInt((cls.match(/t:(\d+)/)||[])[1], 10) || opts.timeout; + + if ($cont.css('position') == 'static') + $cont.css('position', 'relative'); + if (opts.width) + $cont.width(opts.width); + if (opts.height && opts.height != 'auto') + $cont.height(opts.height); + + var first = 0; + $slides.css({position: 'absolute', top:0}).each(function(i) { + $(this).css('z-index', els.length-i); + }); + + $(els[first]).css('opacity',1).show(); // opacity bit needed to handle reinit case + if (msie) + els[first].style.removeAttribute('filter'); + + if (opts.fit && opts.width) + $slides.width(opts.width); + if (opts.fit && opts.height && opts.height != 'auto') + $slides.height(opts.height); + if (opts.pause) + $cont.hover(function(){this.cyclePause=1;}, function(){this.cyclePause=0;}); + + var txFn = $.fn.cycle.transitions[opts.fx]; + if (txFn) + txFn($cont, $slides, opts); + + $slides.each(function() { + var $el = $(this); + this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height(); + this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width(); + }); + + if (opts.cssFirst) + $($slides[first]).css(opts.cssFirst); + + if (opts.timeout) { + // ensure that timeout and speed settings are sane + if (opts.speed.constructor == String) + opts.speed = {slow: 600, fast: 200}[opts.speed] || 400; + if (!opts.sync) + opts.speed = opts.speed / 2; + while((opts.timeout - opts.speed) < 250) + opts.timeout += opts.speed; + } + opts.speedIn = opts.speed; + opts.speedOut = opts.speed; + + opts.slideCount = els.length; + opts.currSlide = first; + opts.nextSlide = 1; + + // fire artificial events + var e0 = $slides[first]; + if (opts.before.length) + opts.before[0].apply(e0, [e0, e0, opts, true]); + if (opts.after.length > 1) + opts.after[1].apply(e0, [e0, e0, opts, true]); + + if (opts.click && !opts.next) + opts.next = opts.click; + if (opts.next) + $(opts.next).unbind('click.cycle').bind('click.cycle', function(){return advance(els,opts,opts.rev?-1:1);}); + if (opts.prev) + $(opts.prev).unbind('click.cycle').bind('click.cycle', function(){return advance(els,opts,opts.rev?1:-1);}); + + if (opts.timeout) + this.cycleTimeout = setTimeout(function() { + go(els,opts,0,!opts.rev); + }, opts.timeout + (opts.delay||0)); + }); +}; + +function go(els, opts, manual, fwd) { + if (opts.busy) + return; + var p = els[0].parentNode, curr = els[opts.currSlide], next = els[opts.nextSlide]; + if (p.cycleTimeout === 0 && !manual) + return; + + if (manual || !p.cyclePause) { + if (opts.before.length) + $.each(opts.before, function(i,o) { o.apply(next, [curr, next, opts, fwd]); }); + var after = function() { + if (msie) + this.style.removeAttribute('filter'); + $.each(opts.after, function(i,o) { o.apply(next, [curr, next, opts, fwd]); }); + queueNext(opts); + }; + + if (opts.nextSlide != opts.currSlide) { + opts.busy = 1; + $.fn.cycle.custom(curr, next, opts, after); + } + var roll = (opts.nextSlide + 1) == els.length; + opts.nextSlide = roll ? 0 : opts.nextSlide+1; + opts.currSlide = roll ? els.length-1 : opts.nextSlide-1; + } else { + queueNext(opts); + } + + function queueNext(opts) { + if (opts.timeout) + p.cycleTimeout = setTimeout(function() { go(els,opts,0,!opts.rev); }, opts.timeout); + } +} + +// advance slide forward or back +function advance(els, opts, val) { + var p = els[0].parentNode, timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + opts.nextSlide = opts.currSlide + val; + if (opts.nextSlide < 0) { + opts.nextSlide = els.length - 1; + } + else if (opts.nextSlide >= els.length) { + opts.nextSlide = 0; + } + go(els, opts, 1, val>=0); + return false; +} + +$.fn.cycle.custom = function(curr, next, opts, cb) { + var $l = $(curr), $n = $(next); + $n.css(opts.cssBefore); + var fn = function() {$n.animate(opts.animIn, opts.speedIn, opts.easeIn, cb);}; + $l.animate(opts.animOut, opts.speedOut, opts.easeOut, function() { + $l.css(opts.cssAfter); + if (!opts.sync) + fn(); + }); + if (opts.sync) + fn(); +}; + +$.fn.cycle.transitions = { + fade: function($cont, $slides, opts) { + $slides.not(':eq(0)').hide(); + opts.cssBefore = { opacity: 0, display: 'block' }; + opts.cssAfter = { display: 'none' }; + opts.animOut = { opacity: 0 }; + opts.animIn = { opacity: 1 }; + }, + fadeout: function($cont, $slides, opts) { + opts.before.push(function(curr,next,opts,fwd) { + $(curr).css('zIndex',opts.slideCount + (fwd === true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (fwd === true ? 0 : 1)); + }); + $slides.not(':eq(0)').hide(); + opts.cssBefore = { opacity: 1, display: 'block', zIndex: 1 }; + opts.cssAfter = { display: 'none', zIndex: 0 }; + opts.animOut = { opacity: 0 }; + opts.animIn = { opacity: 1 }; + } +}; + +$.fn.cycle.ver = function() { return ver; }; + +// @see: http://malsup.com/jquery/cycle/lite/ +$.fn.cycle.defaults = { + animIn: {}, + animOut: {}, + fx: 'fade', + after: null, + before: null, + cssBefore: {}, + cssAfter: {}, + delay: 0, + fit: 0, + height: 'auto', + metaAttr: 'cycle', + next: null, + pause: false, + prev: null, + speed: 1000, + slideExpr: null, + sync: true, + timeout: 4000 +}; + +})(jQuery); diff --git a/cmsplugin_filer_folder/templates/cmsplugin_filer_folder/plugins/folder/default.html b/cmsplugin_filer_folder/templates/cmsplugin_filer_folder/plugins/folder/default.html new file mode 100644 index 00000000..b43e97d8 --- /dev/null +++ b/cmsplugin_filer_folder/templates/cmsplugin_filer_folder/plugins/folder/default.html @@ -0,0 +1,55 @@ +{% load i18n thumbnail sekizai_tags staticfiles %} +{% addtoblock "css" %}{% endaddtoblock "css" %} +{% addtoblock "js" %}{% endaddtoblock "js" %} +{% addtoblock "js" %} + +{% endaddtoblock %} + + +{{ object.get_display_name }} + +{% if object.view_option == "list" %} +
+ + {% if folder_folders %} +

{% trans "Folders" %}

+
    + {% for folder in folder_folders %} +
  • {{ folder }}
  • + {% endfor %} +
+ {% endif %} + {% if folder_files %} +

{% trans "Files" %}

+
    + {% for files in folder_files %} +
  • {{ files }}
  • + {% endfor %} +
+ {% endif %} + {% if folder_images %} +

{% trans "Images" %}

+
    + {% for image in folder_images %} +
  • {{ image.label }}
  • + {% endfor %} +
+ {% endif %} +
+{% else %} + +
+ {% for image in folder_images %} + + {% endfor %} +
+ +{% endif %} diff --git a/cmsplugin_filer_image/__init__.py b/cmsplugin_filer_image/__init__.py new file mode 100644 index 00000000..0a52a416 --- /dev/null +++ b/cmsplugin_filer_image/__init__.py @@ -0,0 +1,4 @@ +from cmsplugin_filer_file import __version__ # NOQA +__authors__ = ["Stefan Foulis ", ] + +default_app_config = 'cmsplugin_filer_image.apps.FilerImageConfig' diff --git a/cmsplugin_filer_image/apps.py b/cmsplugin_filer_image/apps.py new file mode 100644 index 00000000..a254c07a --- /dev/null +++ b/cmsplugin_filer_image/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig +from django.utils.translation import ugettext_lazy as _ + + +class FilerImageConfig(AppConfig): + name = 'cmsplugin_filer_image' + verbose_name = _('django filer image') diff --git a/cmsplugin_filer_image/cms_plugins.py b/cmsplugin_filer_image/cms_plugins.py new file mode 100644 index 00000000..0c7673d7 --- /dev/null +++ b/cmsplugin_filer_image/cms_plugins.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.template.loader import select_template +from django.templatetags.static import static +from django.utils.translation import ugettext_lazy as _ + +from cms.plugin_base import CMSPluginBase +from cms.plugin_pool import plugin_pool + +from .forms import FilerImageForm +from .models import FilerImage +from .conf import settings + + +class FilerImagePlugin(CMSPluginBase): + admin_preview = False + form = FilerImageForm + model = FilerImage + module = 'Filer' + name = _("Image") + raw_id_fields = ('image', 'page_link') + text_enabled = True + + TEMPLATE_NAME = 'cmsplugin_filer_image/plugins/image/%s.html' + render_template = TEMPLATE_NAME % 'default' + + fieldsets = ( + (None, { + 'fields': [ + 'caption_text', + 'image', + 'image_url', + 'alt_text', + ] + }), + (_('Image resizing options'), { + 'fields': ( + 'use_original_image', + ('width', 'height',), + ('crop', 'upscale',), + 'thumbnail_option', + 'use_autoscale', + ) + }), + (None, { + 'fields': ('alignment',) + }), + (_('More'), { + 'classes': ('collapse',), + 'fields': ( + 'free_link', + 'page_link', + 'file_link', + ('original_link', 'target_blank',), + 'link_attributes', + 'description', + ), + }), + ) + if settings.CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES: + fieldsets[0][1]['fields'].append('style') + + def _get_thumbnail_options(self, context, instance): + """ + Return the size and options of the thumbnail that should be inserted + """ + width, height = None, None + crop, upscale = False, False + subject_location = False + placeholder_width = context.get('width', None) + placeholder_height = context.get('height', None) + if instance.thumbnail_option: + # thumbnail option overrides everything else + if instance.thumbnail_option.width: + width = instance.thumbnail_option.width + if instance.thumbnail_option.height: + height = instance.thumbnail_option.height + crop = instance.thumbnail_option.crop + upscale = instance.thumbnail_option.upscale + else: + if instance.use_autoscale and placeholder_width: + # use the placeholder width as a hint for sizing + width = int(placeholder_width) + elif instance.width: + width = instance.width + if instance.use_autoscale and placeholder_height: + height = int(placeholder_height) + elif instance.height: + height = instance.height + crop = instance.crop + upscale = instance.upscale + if instance.image: + if instance.image.subject_location: + subject_location = instance.image.subject_location + if not height and width: + # height was not externally defined: use ratio to scale it by the width + height = int(float(width) * float(instance.image.height) / float(instance.image.width)) + if not width and height: + # width was not externally defined: use ratio to scale it by the height + width = int(float(height) * float(instance.image.width) / float(instance.image.height)) + if not width: + # width is still not defined. fallback the actual image width + width = instance.image.width + if not height: + # height is still not defined. fallback the actual image height + height = instance.image.height + return {'size': (width, height), + 'crop': crop, + 'upscale': upscale, + 'subject_location': subject_location} + + def get_thumbnail(self, context, instance): + if instance.image: + return instance.image.file.get_thumbnail(self._get_thumbnail_options(context, instance)) + + def render(self, context, instance, placeholder): + options = self._get_thumbnail_options(context, instance) + context.update({ + 'instance': instance, + 'link': instance.link, + 'opts': options, + 'size': options.get('size', None), + 'placeholder': placeholder + }) + return context + + def get_render_template(self, context, instance, placeholder): + template = select_template(( + 'cmsplugin_filer_image/plugins/image.html', # backwards compatibility. deprecated! + self.TEMPLATE_NAME % instance.style, + self.TEMPLATE_NAME % 'default', + )) + return template + + def icon_src(self, instance): + if instance.image: + if getattr(settings, 'FILER_IMAGE_USE_ICON', False) and '32' in instance.image.icons: + return instance.image.icons['32'] + else: + # Fake the context with a reasonable width value because it is not + # available at this stage + thumbnail = self.get_thumbnail({'width': 200}, instance) + return thumbnail.url + else: + return static("filer/icons/missingfile_%sx%s.png" % (32, 32,)) +plugin_pool.register_plugin(FilerImagePlugin) diff --git a/cmsplugin_filer_image/conf.py b/cmsplugin_filer_image/conf.py new file mode 100644 index 00000000..36da2c24 --- /dev/null +++ b/cmsplugin_filer_image/conf.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +from django.conf import settings # NOQA +from appconf import AppConf + + +class CmspluginFilerImageAppConf(AppConf): + STYLE_CHOICES = ( + # ('default', _('Default')), # define your styles here. + ) + DEFAULT_STYLE = '' + + def configure(self): + # set DEFAULT_STYLE to '' if it is not in STYLE_CHOICES + if not self.configured_data['DEFAULT_STYLE'] in [s for s, l in self.configured_data['STYLE_CHOICES']]: + self.configured_data['DEFAULT_STYLE'] = '' + return self.configured_data diff --git a/cmsplugin_filer_image/forms.py b/cmsplugin_filer_image/forms.py new file mode 100644 index 00000000..6d95db9d --- /dev/null +++ b/cmsplugin_filer_image/forms.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + +from django import forms + +from djangocms_attributes_field.widgets import AttributesWidget + +from .models import FilerImage + + +class FilerImageForm(forms.ModelForm): + + class Meta: + model = FilerImage + exclude = [] + + def __init__(self, *args, **kwargs): + super(FilerImageForm, self).__init__(*args, **kwargs) + self.fields['link_attributes'].widget = AttributesWidget() diff --git a/cmsplugin_filer_image/integrations/__init__.py b/cmsplugin_filer_image/integrations/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/cmsplugin_filer_image/integrations/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/cmsplugin_filer_image/integrations/ckeditor.py b/cmsplugin_filer_image/integrations/ckeditor.py new file mode 100644 index 00000000..4a8b6a44 --- /dev/null +++ b/cmsplugin_filer_image/integrations/ckeditor.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from cms.models.pluginmodel import CMSPlugin +from django.core.files.uploadedfile import SimpleUploadedFile + + +def create_image_plugin(filename, image, parent_plugin, **kwargs): + """ + Used for drag-n-drop image insertion with djangocms-text-ckeditor. + Set TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin' to enable. + """ + from cmsplugin_filer_image.models import FilerImage + from filer.models import Image + image_plugin = FilerImage() + image_plugin.placeholder = parent_plugin.placeholder + image_plugin.parent = CMSPlugin.objects.get(pk=parent_plugin.id) + image_plugin.position = CMSPlugin.objects.filter(parent=parent_plugin).count() + image_plugin.language = parent_plugin.language + image_plugin.plugin_type = 'FilerImagePlugin' + image.seek(0) + image_model = Image.objects.create(file=SimpleUploadedFile(name=filename, content=image.read())) + image_plugin.image = image_model + image_plugin.save() + return image_plugin + + +def update_image_plugin(plugin, width=None, height=None): + plugin.width = width + plugin.heigt = height + plugin.save() diff --git a/cmsplugin_filer_image/locale/ca/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 00000000..a080c950 --- /dev/null +++ b/cmsplugin_filer_image/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Roger Pons , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Catalan (http://www.transifex.com/divio/cmsplugin-filer/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Imatge" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Opcions de redimensionat d'imatge" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Més" + +#: models.py:25 +msgid "left" +msgstr "esquerra" + +#: models.py:26 +msgid "right" +msgstr "dreta" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "text de la llegenda" + +#: models.py:40 +msgid "image" +msgstr "imatge" + +#: models.py:43 +msgid "alternative image url" +msgstr "url alternativa de la imatge" + +#: models.py:44 +msgid "alt text" +msgstr "text alternatiu" + +#: models.py:46 +msgid "use the original image" +msgstr "utilitza la imatge original" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "no redimensionar la imatge, utilitzar la imatge original." + +#: models.py:49 +msgid "thumbnail option" +msgstr "opció de miniatura" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "sobreescriu l'amplada, l'alçada, el retall i l'augment d'escala amb els valors de l'opció de miniatura seleccionat" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "utilitzar escalat automàtic" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "intenta escalar automàticament la imatge segons el context del marcado de posició" + +#: models.py:53 +msgid "width" +msgstr "amplada" + +#: models.py:54 +msgid "height" +msgstr "alçada" + +#: models.py:55 +msgid "crop" +msgstr "retall" + +#: models.py:56 +msgid "upscale" +msgstr "augment d'escala" + +#: models.py:57 +msgid "image alignment" +msgstr "aliniació de la imatge" + +#: models.py:59 +msgid "link" +msgstr "enllaç" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "si la imatge està present es podrà fer clic" + +#: models.py:63 +msgid "page link" +msgstr "enllaç a pàgina" + +#: models.py:68 +msgid "file link" +msgstr "enllaç a fitxer" + +#: models.py:73 +msgid "link original image" +msgstr "enllaça a la imatge original" + +#: models.py:75 +msgid "description" +msgstr "descripció" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Obre l'enllaç en una finestra nova" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "imatge del filer" + +#: models.py:87 +msgid "filer images" +msgstr "imatges del filer" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Cal seleccionar una imatge o l'url d'una imatge" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Publicació d'Imatge %(caption)s" diff --git a/cmsplugin_filer_image/locale/de/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..4c1d148e --- /dev/null +++ b/cmsplugin_filer_image/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,163 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Michal Bielicki , 2013 +# Stefan Foulis , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: German (http://www.transifex.com/divio/cmsplugin-filer/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Bild" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Bildgrössenanpassungsoptionen" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Mehr" + +#: models.py:25 +msgid "left" +msgstr "links" + +#: models.py:26 +msgid "right" +msgstr "rechts" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "Beschriftungstext" + +#: models.py:40 +msgid "image" +msgstr "Bild" + +#: models.py:43 +msgid "alternative image url" +msgstr "alternative Bild URL" + +#: models.py:44 +msgid "alt text" +msgstr "alt Text" + +#: models.py:46 +msgid "use the original image" +msgstr "Original-Bild verwenden" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "Bildgrösse nicht anpassen, sondern das Original-Bild verwenden." + +#: models.py:49 +msgid "thumbnail option" +msgstr "Thumbnail Optionen" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "Übersteuert Breite, Höhe, Zuschnitt und Vergrösserung mit Werten von der ausgewählten Thumbnail-Option." + +#: models.py:51 +msgid "use automatic scaling" +msgstr "automatisch skalieren" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "versucht die benötigte Bildgröße automatisch an den Seiteninhalt anzupassen" + +#: models.py:53 +msgid "width" +msgstr "Breite" + +#: models.py:54 +msgid "height" +msgstr "Höhe" + +#: models.py:55 +msgid "crop" +msgstr "Zuschneiden" + +#: models.py:56 +msgid "upscale" +msgstr "Vergrößern" + +#: models.py:57 +msgid "image alignment" +msgstr "Bildausrichtung" + +#: models.py:59 +msgid "link" +msgstr "Link" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "wenn angegeben, wird das Bild verlinkt" + +#: models.py:63 +msgid "page link" +msgstr "Seitenlink" + +#: models.py:68 +msgid "file link" +msgstr "Datei-Link" + +#: models.py:73 +msgid "link original image" +msgstr "Original-Bild verlinken" + +#: models.py:75 +msgid "description" +msgstr "Beschreibung" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Link in neuem Fenster öffnen" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "Filer Bild" + +#: models.py:87 +msgid "filer images" +msgstr "Filer Bilder" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Entweder muss ein Bild oder eine Bild-Url ausgewählt sein." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Bildveröffentlichung %(caption)s" diff --git a/cmsplugin_filer_image/locale/en/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/en/LC_MESSAGES/django.po new file mode 100644 index 00000000..be77a4e4 --- /dev/null +++ b/cmsplugin_filer_image/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "" + +#: cms_plugins.py:49 +msgid "More" +msgstr "" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "" + +#: models.py:54 +msgid "height" +msgstr "" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "" + +#: models.py:59 +msgid "link" +msgstr "" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/es/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/es/LC_MESSAGES/django.po new file mode 100644 index 00000000..c8d88ae6 --- /dev/null +++ b/cmsplugin_filer_image/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Javier Sánchez , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Spanish (http://www.transifex.com/divio/cmsplugin-filer/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Imagen" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Opciones de redimensionado de imagen" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Más" + +#: models.py:25 +msgid "left" +msgstr "izquierda" + +#: models.py:26 +msgid "right" +msgstr "derecha" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "pie de foto" + +#: models.py:40 +msgid "image" +msgstr "imagen" + +#: models.py:43 +msgid "alternative image url" +msgstr "url de la imagen alternativa" + +#: models.py:44 +msgid "alt text" +msgstr "texto alternativo" + +#: models.py:46 +msgid "use the original image" +msgstr "usar la imagen original" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "no redimensionar la imagen. usar la imagen original." + +#: models.py:49 +msgid "thumbnail option" +msgstr "opción de miniatura" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "sobreescribe ancho, alto, recorta y escala con los valores de la opción de miniatura seleccionada" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "usar el escalado automático" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "intenta autoescalar la imagen basado en el contexto del placeholder" + +#: models.py:53 +msgid "width" +msgstr "ancho" + +#: models.py:54 +msgid "height" +msgstr "alto" + +#: models.py:55 +msgid "crop" +msgstr "recortar" + +#: models.py:56 +msgid "upscale" +msgstr "autoescalar" + +#: models.py:57 +msgid "image alignment" +msgstr "alineación de la imagen" + +#: models.py:59 +msgid "link" +msgstr "enlace" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "podrá hacerse click en la imagen actual" + +#: models.py:63 +msgid "page link" +msgstr "enlace de página" + +#: models.py:68 +msgid "file link" +msgstr "enlace de archivo" + +#: models.py:73 +msgid "link original image" +msgstr "enlace a la imagen original " + +#: models.py:75 +msgid "description" +msgstr "descripción" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Abrir el enlace en una nueva ventana" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "imagen filer" + +#: models.py:87 +msgid "filer images" +msgstr "imágenes filer" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Al menos una imagen o una url de imagen debe ser seleccionada." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Publicación de Imagen %(caption)s" diff --git a/cmsplugin_filer_image/locale/et/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/et/LC_MESSAGES/django.po new file mode 100644 index 00000000..6d672e67 --- /dev/null +++ b/cmsplugin_filer_image/locale/et/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rivo Zängov , 2012-2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Estonian (http://www.transifex.com/divio/cmsplugin-filer/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Pilt" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Pildi suuruse muutmise valikud" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Veel" + +#: models.py:25 +msgid "left" +msgstr "vasakule" + +#: models.py:26 +msgid "right" +msgstr "paremale" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "pealkirja tekst" + +#: models.py:40 +msgid "image" +msgstr "pilt" + +#: models.py:43 +msgid "alternative image url" +msgstr "alternatiivne pildi url" + +#: models.py:44 +msgid "alt text" +msgstr "alt tekst" + +#: models.py:46 +msgid "use the original image" +msgstr "kasuta algset pilti" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "ära muuda pildi suurust. kasuta hoopis algset pilti." + +#: models.py:49 +msgid "thumbnail option" +msgstr "pisipildi valik" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "kasuta automaatset suuruse muutmist" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "laius" + +#: models.py:54 +msgid "height" +msgstr "kõrgus" + +#: models.py:55 +msgid "crop" +msgstr "lõika" + +#: models.py:56 +msgid "upscale" +msgstr "suurenda" + +#: models.py:57 +msgid "image alignment" +msgstr "pildi joondus" + +#: models.py:59 +msgid "link" +msgstr "link" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "lehe link" + +#: models.py:68 +msgid "file link" +msgstr "faili link" + +#: models.py:73 +msgid "link original image" +msgstr "link algsele pildile" + +#: models.py:75 +msgid "description" +msgstr "kirjeldus" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Ava link uues aknas" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "pilt" + +#: models.py:87 +msgid "filer images" +msgstr "pildid" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/eu/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/eu/LC_MESSAGES/django.po new file mode 100644 index 00000000..ba978e63 --- /dev/null +++ b/cmsplugin_filer_image/locale/eu/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Basque (http://www.transifex.com/divio/cmsplugin-filer/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Irudia" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Irudiaren tamaina aldatze aukerak" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Gehiago" + +#: models.py:25 +msgid "left" +msgstr "ezkerrean" + +#: models.py:26 +msgid "right" +msgstr "eskuinean" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "epigrafeko testua" + +#: models.py:40 +msgid "image" +msgstr "irudia" + +#: models.py:43 +msgid "alternative image url" +msgstr "ordezko irudiaren helbidea" + +#: models.py:44 +msgid "alt text" +msgstr "testu alternatiboa" + +#: models.py:46 +msgid "use the original image" +msgstr "jatorrizko irudia erabili" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "ez aldatu irudiaren tamaina, jatorrizko irudia erabili." + +#: models.py:49 +msgid "thumbnail option" +msgstr "argazkitxoaren aukerak" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "zabalera, altuera, mozketa eta handitzea hautatutako argazkitxoen aukeratik hartu" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "eskalatze automatikoa erabili" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "leku-markaren testuinguruan oinarrituta irudia automatikoki eskalatzen saiatu" + +#: models.py:53 +msgid "width" +msgstr "zabalera" + +#: models.py:54 +msgid "height" +msgstr "altuera" + +#: models.py:55 +msgid "crop" +msgstr "moztu" + +#: models.py:56 +msgid "upscale" +msgstr "handitu" + +#: models.py:57 +msgid "image alignment" +msgstr "orriaren lerrokatzea" + +#: models.py:59 +msgid "link" +msgstr "esteka" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "egotekotan irudia klikagarria izango da" + +#: models.py:63 +msgid "page link" +msgstr "orri esteka" + +#: models.py:68 +msgid "file link" +msgstr "fitxategi esteka" + +#: models.py:73 +msgid "link original image" +msgstr "jatorrizko irudira estekatu" + +#: models.py:75 +msgid "description" +msgstr "deskribapena" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Ireki esteka orri berrian" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "filer irudia" + +#: models.py:87 +msgid "filer images" +msgstr "filer irudiak" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Irudi edo helbidea, bietako bat hautatu behar da." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Irudi Argitalpena %(caption)s" diff --git a/cmsplugin_filer_image/locale/fi/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/fi/LC_MESSAGES/django.po new file mode 100644 index 00000000..978cbe87 --- /dev/null +++ b/cmsplugin_filer_image/locale/fi/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Klaus Dahlén , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Finnish (http://www.transifex.com/divio/cmsplugin-filer/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Kuva" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Kuvakoon asetukset" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Lisää" + +#: models.py:25 +msgid "left" +msgstr "vasen" + +#: models.py:26 +msgid "right" +msgstr "oikea" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "kuvateksti" + +#: models.py:40 +msgid "image" +msgstr "kuva" + +#: models.py:43 +msgid "alternative image url" +msgstr "vaihtoehtoisen kuvan URL" + +#: models.py:44 +msgid "alt text" +msgstr "alt-teksti" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "pikkukuvan asetukset" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "käytä automaattista skaalausta" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "pyrkii skaalaamaan kuvan automaattisesti sisältöalueen kontekstin perusteella" + +#: models.py:53 +msgid "width" +msgstr "leveys" + +#: models.py:54 +msgid "height" +msgstr "korkeus" + +#: models.py:55 +msgid "crop" +msgstr "rajaus" + +#: models.py:56 +msgid "upscale" +msgstr "suurennus" + +#: models.py:57 +msgid "image alignment" +msgstr "kuvan asemointi" + +#: models.py:59 +msgid "link" +msgstr "linkki" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "kuva on klikattavissa mikäli tämä on täytetty" + +#: models.py:63 +msgid "page link" +msgstr "sivulinkki" + +#: models.py:68 +msgid "file link" +msgstr "tiedostolinkki" + +#: models.py:73 +msgid "link original image" +msgstr "linkitä alkuperäiseen kuvaan" + +#: models.py:75 +msgid "description" +msgstr "kuvaus" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "filer-kuva" + +#: models.py:87 +msgid "filer images" +msgstr "filer-kuvat" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Joko kuva tai kuvan URL on valittava." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Kuvan julkaisu %(caption)s" diff --git a/cmsplugin_filer_image/locale/fr/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..e1e4b632 --- /dev/null +++ b/cmsplugin_filer_image/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Bertrand Bordage , 2012 +# Bertrand Bordage , 2012 +# Frigory33 , 2016 +# Dylann CORDEL , 2014 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-06 18:34+0000\n" +"Last-Translator: Frigory33 \n" +"Language-Team: French (http://www.transifex.com/divio/cmsplugin-filer/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "image du gestionnaire de fichiers de django" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Image" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Options de redimensionnement de l'image" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Paramètres avancés" + +#: models.py:25 +msgid "left" +msgstr "gauche" + +#: models.py:26 +msgid "right" +msgstr "droite" + +#: models.py:27 +msgid "center" +msgstr "centre" + +#: models.py:34 +msgid "Style" +msgstr "Style" + +#: models.py:35 +msgid "caption text" +msgstr "légende" + +#: models.py:40 +msgid "image" +msgstr "image" + +#: models.py:43 +msgid "alternative image url" +msgstr "adresse alternative de l'image" + +#: models.py:44 +msgid "alt text" +msgstr "texte alternatif" + +#: models.py:46 +msgid "use the original image" +msgstr "utiliser l'image d'origine" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "ne pas redimensionner l'image ; utiliser l'image d'origine" + +#: models.py:49 +msgid "thumbnail option" +msgstr "option de miniature" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "écrase les valeurs de largeur, hauteur, rognage et agrandissement avec les valeurs de l'option de miniature sélectionnée" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "redimensionnement automatique" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "essaie de redimensionner automatiquement l'image à partir du contexte de la portion de page" + +#: models.py:53 +msgid "width" +msgstr "largeur" + +#: models.py:54 +msgid "height" +msgstr "hauteur" + +#: models.py:55 +msgid "crop" +msgstr "rogner" + +#: models.py:56 +msgid "upscale" +msgstr "élargir" + +#: models.py:57 +msgid "image alignment" +msgstr "alignement de l'image" + +#: models.py:59 +msgid "link" +msgstr "lien" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "si la présente image sera cliquable" + +#: models.py:63 +msgid "page link" +msgstr "lien vers une page" + +#: models.py:68 +msgid "file link" +msgstr "lien vers un fichier" + +#: models.py:73 +msgid "link original image" +msgstr "lien vers l'image d'origine" + +#: models.py:75 +msgid "description" +msgstr "description" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Ouvre le lien dans une nouvelle fenêtre" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Facultatif. Ajoute des attributs HTML au lien généré." + +#: models.py:86 +msgid "filer image" +msgstr "image du gestionnaire de fichiers" + +#: models.py:87 +msgid "filer images" +msgstr "images du gestionnaire de fichiers" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Une image ou bien une adresse d'image doit être sélectionnée." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Publication d'image %(caption)s" diff --git a/cmsplugin_filer_image/locale/it/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/it/LC_MESSAGES/django.po new file mode 100644 index 00000000..c3c384e4 --- /dev/null +++ b/cmsplugin_filer_image/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,164 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# yakky , 2012 +# yakky , 2013,2016 +# yakky , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-13 08:28+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Italian (http://www.transifex.com/divio/cmsplugin-filer/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "immagine django filer" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Immagine" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Opzioni ridimensionamento immagine" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Vedi" + +#: models.py:25 +msgid "left" +msgstr "sinistra" + +#: models.py:26 +msgid "right" +msgstr "destra" + +#: models.py:27 +msgid "center" +msgstr "centrato" + +#: models.py:34 +msgid "Style" +msgstr "Stile" + +#: models.py:35 +msgid "caption text" +msgstr "didascalia" + +#: models.py:40 +msgid "image" +msgstr "immagine" + +#: models.py:43 +msgid "alternative image url" +msgstr "URL alternativo per l'immagine" + +#: models.py:44 +msgid "alt text" +msgstr "testo alternativo" + +#: models.py:46 +msgid "use the original image" +msgstr "usa l'immagine originale" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "non ridimensionare l'immagine. Usa l'immagine originale." + +#: models.py:49 +msgid "thumbnail option" +msgstr "opzione anteprima immagine" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "ignora le impostazioni di larghezza, altezza, taglio e riscalatura e usa l'opzione anteprima immagine selezionata" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "usa ridimensionamento automatico" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "prova a dimensionare l'immagine in base al contesto del placeholder" + +#: models.py:53 +msgid "width" +msgstr "larghezza" + +#: models.py:54 +msgid "height" +msgstr "altezza" + +#: models.py:55 +msgid "crop" +msgstr "taglia" + +#: models.py:56 +msgid "upscale" +msgstr "ingrandisci" + +#: models.py:57 +msgid "image alignment" +msgstr "allineamento immagine" + +#: models.py:59 +msgid "link" +msgstr "link" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "se presente, l'immagine sarà cliccabile" + +#: models.py:63 +msgid "page link" +msgstr "link a pagina" + +#: models.py:68 +msgid "file link" +msgstr "collegamento a file" + +#: models.py:73 +msgid "link original image" +msgstr "collegamento all'immagine originale" + +#: models.py:75 +msgid "description" +msgstr "descrizione" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Apri collegamento in una nuova finestra" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Opzionale. Aggiungi attributi HTML al link" + +#: models.py:86 +msgid "filer image" +msgstr "immagine" + +#: models.py:87 +msgid "filer images" +msgstr "immagini" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Devi selezionare un'immagine o un indirizzo di immagine" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Pubblicazione immagine %(caption)s" diff --git a/cmsplugin_filer_image/locale/it_IT/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/it_IT/LC_MESSAGES/django.po new file mode 100644 index 00000000..2b065317 --- /dev/null +++ b/cmsplugin_filer_image/locale/it_IT/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Italian (Italy) (http://www.transifex.com/divio/cmsplugin-filer/language/it_IT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "" + +#: cms_plugins.py:49 +msgid "More" +msgstr "" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "" + +#: models.py:54 +msgid "height" +msgstr "" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "" + +#: models.py:59 +msgid "link" +msgstr "" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/lt/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 00000000..34f6c451 --- /dev/null +++ b/cmsplugin_filer_image/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,163 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Matas Dailyda, 2015 +# Matas Dailyda , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-18 09:18+0000\n" +"Last-Translator: Matas Dailyda \n" +"Language-Team: Lithuanian (http://www.transifex.com/divio/cmsplugin-filer/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "django filer paveikslėlis" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Paveikslėlis" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Paveikslėlio dydžio keitimo nustatymai" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Daugiau" + +#: models.py:25 +msgid "left" +msgstr "kairė" + +#: models.py:26 +msgid "right" +msgstr "dešinė" + +#: models.py:27 +msgid "center" +msgstr "centras" + +#: models.py:34 +msgid "Style" +msgstr "Stilius" + +#: models.py:35 +msgid "caption text" +msgstr "antraštės tekstas" + +#: models.py:40 +msgid "image" +msgstr "paveikslėlis" + +#: models.py:43 +msgid "alternative image url" +msgstr "alternatyvus paveikslėlio URL" + +#: models.py:44 +msgid "alt text" +msgstr "papildomas tekstas" + +#: models.py:46 +msgid "use the original image" +msgstr "naudoti originalų paveikslėlį" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "nekeisti paveikslėlio dydžio. Naudoti originalų paveikslėlį." + +#: models.py:49 +msgid "thumbnail option" +msgstr "miniatiūros nustatymas" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "perrašo plotį, aukštį, apkirpimą ir mastelį su reikšmemis iš pasirinkto miniatiūros nustatymo" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "naudoti automatinį mastelį" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "bando automatiškai nustatyti paveikslėlio mastelį remiantis rezervuotos vietos kontekstu" + +#: models.py:53 +msgid "width" +msgstr "plotis" + +#: models.py:54 +msgid "height" +msgstr "aukštis" + +#: models.py:55 +msgid "crop" +msgstr "apkirpti" + +#: models.py:56 +msgid "upscale" +msgstr "išdidinti" + +#: models.py:57 +msgid "image alignment" +msgstr "paveikslėlio lygiavimas" + +#: models.py:59 +msgid "link" +msgstr "nuoroda" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "esant, ant paveikslėlio bus galima paspausti" + +#: models.py:63 +msgid "page link" +msgstr "puslapio nuoroda" + +#: models.py:68 +msgid "file link" +msgstr "bylos nuoroda" + +#: models.py:73 +msgid "link original image" +msgstr "nurodyti į originalų paveikslėlį" + +#: models.py:75 +msgid "description" +msgstr "aprašymas" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Atverti nuorodą naujame lange" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Nebūtina. Prideda HTML atributus prie atvaizduojamos nuorodos." + +#: models.py:86 +msgid "filer image" +msgstr "filer paveikslėlis" + +#: models.py:87 +msgid "filer images" +msgstr "filer paveikslėliai" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Turi būti pasirinktas paveikslėlis, arba įvestas paveikslėlio URL" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Paveikslėlio publikavimas %(caption)s" diff --git a/cmsplugin_filer_image/locale/lt_LT/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/lt_LT/LC_MESSAGES/django.po new file mode 100644 index 00000000..3f92a3c7 --- /dev/null +++ b/cmsplugin_filer_image/locale/lt_LT/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/divio/cmsplugin-filer/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "" + +#: cms_plugins.py:49 +msgid "More" +msgstr "" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "" + +#: models.py:54 +msgid "height" +msgstr "" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "" + +#: models.py:59 +msgid "link" +msgstr "" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/nb/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/nb/LC_MESSAGES/django.po new file mode 100644 index 00000000..ecc019fe --- /dev/null +++ b/cmsplugin_filer_image/locale/nb/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/divio/cmsplugin-filer/language/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "" + +#: cms_plugins.py:49 +msgid "More" +msgstr "" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "" + +#: models.py:54 +msgid "height" +msgstr "" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "" + +#: models.py:59 +msgid "link" +msgstr "" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/nl/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 00000000..cba504c3 --- /dev/null +++ b/cmsplugin_filer_image/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,164 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Maarten Draijer , 2013 +# Maikel Wever, 2013 +# kurdyma , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-27 10:26+0000\n" +"Last-Translator: kurdyma \n" +"Language-Team: Dutch (http://www.transifex.com/divio/cmsplugin-filer/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "django filer afbeelding" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Afbeelding" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Opties voor het schalen van de afbeelding" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Meer" + +#: models.py:25 +msgid "left" +msgstr "links" + +#: models.py:26 +msgid "right" +msgstr "rechts" + +#: models.py:27 +msgid "center" +msgstr "centreer" + +#: models.py:34 +msgid "Style" +msgstr "Stijl" + +#: models.py:35 +msgid "caption text" +msgstr "bijschrift tekst" + +#: models.py:40 +msgid "image" +msgstr "afbeelding" + +#: models.py:43 +msgid "alternative image url" +msgstr "alternatieve afbeeldingslocatie" + +#: models.py:44 +msgid "alt text" +msgstr "alt tekst" + +#: models.py:46 +msgid "use the original image" +msgstr "gebruik de originele afbeelding" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "afbeelding niet schalen, gebruik in plaats daarvan de originele afbeelding." + +#: models.py:49 +msgid "thumbnail option" +msgstr "thumbnailoptie" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "overschrijft breedte, hoogte, uitsnijding en opschaling met waardes van de geselecteerde thumnbailoptie" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "gebruik automatische schaling" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "probeert de afbeelding automatisch te schalen gebaseerd op de placeholder context" + +#: models.py:53 +msgid "width" +msgstr "breedte" + +#: models.py:54 +msgid "height" +msgstr "hoogte" + +#: models.py:55 +msgid "crop" +msgstr "uitsnijden" + +#: models.py:56 +msgid "upscale" +msgstr "opschalen" + +#: models.py:57 +msgid "image alignment" +msgstr "afbeeldingsuitlijning" + +#: models.py:59 +msgid "link" +msgstr "link" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "indien present zal de afbeelding klikbaar zijn" + +#: models.py:63 +msgid "page link" +msgstr "paginalink" + +#: models.py:68 +msgid "file link" +msgstr "bestandslink" + +#: models.py:73 +msgid "link original image" +msgstr "link originele afbeelding" + +#: models.py:75 +msgid "description" +msgstr "omschrijving" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Open link in een nieuw venster" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Optioneel. Voegt HTML attributen toe aan gerenderde link." + +#: models.py:86 +msgid "filer image" +msgstr "filer afbeelding" + +#: models.py:87 +msgid "filer images" +msgstr "filer afbeeldingen" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Er moet of een afbeelding, of een afbeeldingslocatie worden geselecteerd." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Afbeelding Publicatie %(caption)s" diff --git a/cmsplugin_filer_image/locale/nn/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/nn/LC_MESSAGES/django.po new file mode 100644 index 00000000..dd80bbfd --- /dev/null +++ b/cmsplugin_filer_image/locale/nn/LC_MESSAGES/django.po @@ -0,0 +1,161 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Nynorsk (http://www.transifex.com/divio/cmsplugin-filer/language/nn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "" + +#: cms_plugins.py:49 +msgid "More" +msgstr "" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "" + +#: models.py:46 +msgid "use the original image" +msgstr "" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "" + +#: models.py:49 +msgid "thumbnail option" +msgstr "" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "" + +#: models.py:54 +msgid "height" +msgstr "" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "" + +#: models.py:59 +msgid "link" +msgstr "" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "" + +#: models.py:76 +msgid "Open link in new window" +msgstr "" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/pl_PL/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/pl_PL/LC_MESSAGES/django.po new file mode 100644 index 00000000..4a6ae2c9 --- /dev/null +++ b/cmsplugin_filer_image/locale/pl_PL/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Mateusz Marzantowicz , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Polish (Poland) (http://www.transifex.com/divio/cmsplugin-filer/language/pl_PL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl_PL\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Obraz" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Opcje zmiany rozmiaru" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Więcej" + +#: models.py:25 +msgid "left" +msgstr "" + +#: models.py:26 +msgid "right" +msgstr "" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "" + +#: models.py:40 +msgid "image" +msgstr "obraz" + +#: models.py:43 +msgid "alternative image url" +msgstr "" + +#: models.py:44 +msgid "alt text" +msgstr "tekst alternatywny" + +#: models.py:46 +msgid "use the original image" +msgstr "użyj oryginalnego obrazu" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "Nie zmieniaj rozmiaru, użyj oryginalnego obrazu." + +#: models.py:49 +msgid "thumbnail option" +msgstr "opcje miniatury" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "użyj automatycznego skalowania" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "" + +#: models.py:53 +msgid "width" +msgstr "szerokość" + +#: models.py:54 +msgid "height" +msgstr "wysokość" + +#: models.py:55 +msgid "crop" +msgstr "przytnij" + +#: models.py:56 +msgid "upscale" +msgstr "skaluj" + +#: models.py:57 +msgid "image alignment" +msgstr "wyrównanie obrazu" + +#: models.py:59 +msgid "link" +msgstr "odnośnik" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "" + +#: models.py:63 +msgid "page link" +msgstr "" + +#: models.py:68 +msgid "file link" +msgstr "odnośnik do pliku" + +#: models.py:73 +msgid "link original image" +msgstr "" + +#: models.py:75 +msgid "description" +msgstr "opis" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Otwórz odnośnik w nowym oknie" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "" diff --git a/cmsplugin_filer_image/locale/pt_BR/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 00000000..dc6d0bb1 --- /dev/null +++ b/cmsplugin_filer_image/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rodrigo , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/divio/cmsplugin-filer/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Imagem" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "opções de redimensionamento de imagem" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Mais" + +#: models.py:25 +msgid "left" +msgstr "esquerda" + +#: models.py:26 +msgid "right" +msgstr "direita" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "texto de caption" + +#: models.py:40 +msgid "image" +msgstr "imagem" + +#: models.py:43 +msgid "alternative image url" +msgstr "url alternativa para imagem" + +#: models.py:44 +msgid "alt text" +msgstr "alt text" + +#: models.py:46 +msgid "use the original image" +msgstr "utilizar a imagem original" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "não redimensionar a imagem. ao invés disso utilizar a imagem original." + +#: models.py:49 +msgid "thumbnail option" +msgstr "opção da miniatura" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "Ignorar largura, altura, recorte ou dimensionamento através dos valores das opções de miniaturas selecionados." + +#: models.py:51 +msgid "use automatic scaling" +msgstr "utilizar o escalamento automático" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "tentar auto formatar as dimensões da imagem baseado no contexto do placeholder" + +#: models.py:53 +msgid "width" +msgstr "largura" + +#: models.py:54 +msgid "height" +msgstr "altura" + +#: models.py:55 +msgid "crop" +msgstr "recortar" + +#: models.py:56 +msgid "upscale" +msgstr "aumentar" + +#: models.py:57 +msgid "image alignment" +msgstr "alinhamento da imagem" + +#: models.py:59 +msgid "link" +msgstr "link" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "se presente a imagem será clicável" + +#: models.py:63 +msgid "page link" +msgstr "link da página" + +#: models.py:68 +msgid "file link" +msgstr "link do arquivo" + +#: models.py:73 +msgid "link original image" +msgstr "link original para a imagem" + +#: models.py:75 +msgid "description" +msgstr "descrição" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Abrir link em nova janela" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "imagem do filer" + +#: models.py:87 +msgid "filer images" +msgstr "imagens do filer" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Uma imagem ou uma url de imagem precisa ser selecionada." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Publicação da Imagem %(caption)s" diff --git a/cmsplugin_filer_image/locale/ru/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..af2c19b5 --- /dev/null +++ b/cmsplugin_filer_image/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,163 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Pavel , 2012 +# Pavel , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Russian (http://www.transifex.com/divio/cmsplugin-filer/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "Изображение" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "Опции изменения размеров изображения" + +#: cms_plugins.py:49 +msgid "More" +msgstr "Больше" + +#: models.py:25 +msgid "left" +msgstr "лево" + +#: models.py:26 +msgid "right" +msgstr "право" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "текст заголовка" + +#: models.py:40 +msgid "image" +msgstr "изображение" + +#: models.py:43 +msgid "alternative image url" +msgstr "альтернативная ссылка на изображение" + +#: models.py:44 +msgid "alt text" +msgstr "альтернативный текст" + +#: models.py:46 +msgid "use the original image" +msgstr "использовать оригинальное изображение" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "не менять размер изображения, использовать оригинал" + +#: models.py:49 +msgid "thumbnail option" +msgstr "опция миниатюры" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "переопределяет ширину, высоту, кадрирование и масштабирование значениями из выбранной опции" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "использовать автоматическое масштабирование" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "попытка масштабировать изображение, основываясь на контексте слота" + +#: models.py:53 +msgid "width" +msgstr "ширина" + +#: models.py:54 +msgid "height" +msgstr "высота" + +#: models.py:55 +msgid "crop" +msgstr "обрезать" + +#: models.py:56 +msgid "upscale" +msgstr "увеличивать" + +#: models.py:57 +msgid "image alignment" +msgstr "выравнивание изображения" + +#: models.py:59 +msgid "link" +msgstr "ссылка" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "если установлено, изображение будет кликабельным" + +#: models.py:63 +msgid "page link" +msgstr "ссылка на страницу" + +#: models.py:68 +msgid "file link" +msgstr "ссылка на файл" + +#: models.py:73 +msgid "link original image" +msgstr "ссылка на оригинальное изображение" + +#: models.py:75 +msgid "description" +msgstr "описание" + +#: models.py:76 +msgid "Open link in new window" +msgstr "Открыть ссылку в новом окне" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "изображение (filer)" + +#: models.py:87 +msgid "filer images" +msgstr "изображения (filer)" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "Изображение либо ссылка на изображение должны быть установлены." + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "Публикация изображения %(caption)s" diff --git a/cmsplugin_filer_image/locale/zh_CN/LC_MESSAGES/django.po b/cmsplugin_filer_image/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 00000000..db1c4e6a --- /dev/null +++ b/cmsplugin_filer_image/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,162 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Calvin-He , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Chinese (China) (http://www.transifex.com/divio/cmsplugin-filer/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: apps.py:7 +msgid "django filer image" +msgstr "" + +#: cms_plugins.py:21 +msgid "Image" +msgstr "图片" + +#: cms_plugins.py:37 +msgid "Image resizing options" +msgstr "图片缩放选项" + +#: cms_plugins.py:49 +msgid "More" +msgstr "更多" + +#: models.py:25 +msgid "left" +msgstr "左边" + +#: models.py:26 +msgid "right" +msgstr "右边" + +#: models.py:27 +msgid "center" +msgstr "" + +#: models.py:34 +msgid "Style" +msgstr "" + +#: models.py:35 +msgid "caption text" +msgstr "描述文本" + +#: models.py:40 +msgid "image" +msgstr "图片" + +#: models.py:43 +msgid "alternative image url" +msgstr "可选的图片链接" + +#: models.py:44 +msgid "alt text" +msgstr "可选文本" + +#: models.py:46 +msgid "use the original image" +msgstr "使用原始图片" + +#: models.py:47 +msgid "do not resize the image. use the original image instead." +msgstr "不缩放图片大小,而使用原始大小的图片。" + +#: models.py:49 +msgid "thumbnail option" +msgstr "缩略图选项" + +#: models.py:50 +msgid "" +"overrides width, height, crop and upscale with values from the selected " +"thumbnail option" +msgstr "从选择的缩略图选项中设置宽度,高度,crop和upscale" + +#: models.py:51 +msgid "use automatic scaling" +msgstr "自动缩放" + +#: models.py:52 +msgid "tries to auto scale the image based on the placeholder context" +msgstr "基于placeholder上下文来自动缩放图片" + +#: models.py:53 +msgid "width" +msgstr "宽" + +#: models.py:54 +msgid "height" +msgstr "高" + +#: models.py:55 +msgid "crop" +msgstr "" + +#: models.py:56 +msgid "upscale" +msgstr "" + +#: models.py:57 +msgid "image alignment" +msgstr "图片对齐方法" + +#: models.py:59 +msgid "link" +msgstr "链接" + +#: models.py:60 models.py:62 models.py:69 models.py:74 +msgid "if present image will be clickable" +msgstr "图片是否可点击" + +#: models.py:63 +msgid "page link" +msgstr "页面链接" + +#: models.py:68 +msgid "file link" +msgstr "文件链接" + +#: models.py:73 +msgid "link original image" +msgstr "链接原始图片" + +#: models.py:75 +msgid "description" +msgstr "描述" + +#: models.py:76 +msgid "Open link in new window" +msgstr "在新窗口中打开链接" + +#: models.py:78 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" + +#: models.py:86 +msgid "filer image" +msgstr "" + +#: models.py:87 +msgid "filer images" +msgstr "" + +#: models.py:93 +msgid "Either an image or an image url must be selected." +msgstr "图片或图片链接必须选择一个" + +#: models.py:99 +#, python-format +msgid "Image Publication %(caption)s" +msgstr "发布图片%(caption)s" diff --git a/cmsplugin_filer_image/migrations/0001_initial.py b/cmsplugin_filer_image/migrations/0001_initial.py new file mode 100644 index 00000000..6d2a4872 --- /dev/null +++ b/cmsplugin_filer_image/migrations/0001_initial.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings +import filer.fields.file +import filer.fields.image +from filer.settings import FILER_IMAGE_MODEL +import cms.models.fields + +FILER_MODEL = FILER_IMAGE_MODEL or 'filer.Image' + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0003_auto_20140926_2347'), + ('filer', '0001_initial'), + migrations.swappable_dependency(FILER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='FilerImage', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE)), + ('style', models.CharField(max_length=50, verbose_name='Style', default=settings.CMSPLUGIN_FILER_IMAGE_DEFAULT_STYLE, blank=True, choices=settings.CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES)), + ('caption_text', models.CharField(max_length=255, null=True, verbose_name='caption text', blank=True)), + ('image_url', models.URLField(default=None, null=True, verbose_name='alternative image url', blank=True)), + ('alt_text', models.CharField(max_length=255, null=True, verbose_name='alt text', blank=True)), + ('use_original_image', models.BooleanField(default=False, help_text='do not resize the image. use the original image instead.', verbose_name='use the original image')), + ('use_autoscale', models.BooleanField(default=False, help_text='tries to auto scale the image based on the placeholder context', verbose_name='use automatic scaling')), + ('width', models.PositiveIntegerField(null=True, verbose_name='width', blank=True)), + ('height', models.PositiveIntegerField(null=True, verbose_name='height', blank=True)), + ('crop', models.BooleanField(default=True, verbose_name='crop')), + ('upscale', models.BooleanField(default=True, verbose_name='upscale')), + ('alignment', models.CharField(blank=True, max_length=10, null=True, verbose_name='image alignment', choices=[('left', 'left'), ('right', 'right')])), + ('free_link', models.CharField(help_text='if present image will be clickable', max_length=255, null=True, verbose_name='link', blank=True)), + ('original_link', models.BooleanField(default=False, help_text='if present image will be clickable', verbose_name='link original image')), + ('description', models.TextField(null=True, verbose_name='description', blank=True)), + ('target_blank', models.BooleanField(default=False, verbose_name='Open link in new window')), + ('file_link', filer.fields.file.FilerFileField(related_name='+', default=None, to='filer.File', blank=True, help_text='if present image will be clickable', null=True, verbose_name='file link', on_delete=models.CASCADE)), + ('image', filer.fields.image.FilerImageField(default=None, blank=True, to='filer.Image', null=True, verbose_name='image', on_delete=models.CASCADE)), + ('page_link', cms.models.fields.PageField(blank=True, to='cms.Page', help_text='if present image will be clickable', null=True, verbose_name='page link')), + ], + options={ + 'verbose_name': 'filer image', + 'verbose_name_plural': 'filer images', + }, + bases=('cms.cmsplugin',), + ), + migrations.CreateModel( + name='ThumbnailOption', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100, verbose_name='name')), + ('width', models.IntegerField(help_text='width in pixel.', verbose_name='width')), + ('height', models.IntegerField(help_text='height in pixel.', verbose_name='height')), + ('crop', models.BooleanField(default=True, verbose_name='crop')), + ('upscale', models.BooleanField(default=True, verbose_name='upscale')), + ], + options={ + 'ordering': ('width', 'height'), + 'verbose_name': 'thumbnail option', + 'verbose_name_plural': 'thumbnail options', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='filerimage', + name='thumbnail_option', + field=models.ForeignKey(blank=True, to='cmsplugin_filer_image.ThumbnailOption', help_text='overrides width, height, crop and upscale with values from the selected thumbnail option', null=True, verbose_name='thumbnail option', on_delete=models.CASCADE), + preserve_default=True, + ), + ] diff --git a/cmsplugin_filer_image/migrations/0002_auto_20160108_1708.py b/cmsplugin_filer_image/migrations/0002_auto_20160108_1708.py new file mode 100644 index 00000000..b3959cff --- /dev/null +++ b/cmsplugin_filer_image/migrations/0002_auto_20160108_1708.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import filer.fields.file +import django.db.models.deletion +import filer.fields.image + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='file_link', + field=filer.fields.file.FilerFileField(related_name='+', on_delete=django.db.models.deletion.SET_NULL, default=None, to='filer.File', blank=True, help_text='if present image will be clickable', null=True, verbose_name='file link'), + ), + migrations.AlterField( + model_name='filerimage', + name='image', + field=filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.SET_NULL, default=None, blank=True, to='filer.Image', null=True, verbose_name='image'), + ), + ] diff --git a/cmsplugin_filer_image/migrations/0003_mv_thumbnail_option_to_filer_20160119_1720.py b/cmsplugin_filer_image/migrations/0003_mv_thumbnail_option_to_filer_20160119_1720.py new file mode 100644 index 00000000..9d94698f --- /dev/null +++ b/cmsplugin_filer_image/migrations/0003_mv_thumbnail_option_to_filer_20160119_1720.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + +def move_thumbnail_opt_to_filer(apps, schema_editor): + ThumbnailOption = apps.get_model('cmsplugin_filer_image', 'ThumbnailOption') + ThumbnailOptionNew = apps.get_model('filer', 'ThumbnailOption') + for obj in ThumbnailOption.objects.all(): + try: + ThumbnailOptionNew.objects.get( + name=obj.name, + width=obj.width, + height=obj.height, + crop=obj.crop, + upscale=obj.upscale + ) + except ThumbnailOptionNew.DoesNotExist: + th = ThumbnailOptionNew( + id=obj.id, + name=obj.name, + width=obj.width, + height=obj.height, + crop=obj.crop, + upscale=obj.upscale + ) + th.save() + +def move_thumbnail_opt_to_cms(apps, schema_editor): + ThumbnailOption = apps.get_model('filer', 'ThumbnailOption') + ThumbnailOptionOld = apps.get_model('cmsplugin_filer_image', 'ThumbnailOption') + for obj in ThumbnailOption.objects.all(): + try: + ThumbnailOptionOld.objects.get( + name=obj.name, + width=obj.width, + height=obj.height, + crop=obj.crop, + upscale=obj.upscale + ) + except ThumbnailOptionOld.DoesNotExist: + th = ThumbnailOptionOld( + id=obj.id, + name=obj.name, + width=obj.width, + height=obj.height, + crop=obj.crop, + upscale=obj.upscale + ) + th.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0002_auto_20160108_1708'), + ('filer', '0003_thumbnailoption'), + ] + + operations = [ + migrations.RunPython(move_thumbnail_opt_to_filer, move_thumbnail_opt_to_cms), + ] diff --git a/cmsplugin_filer_image/migrations/0004_auto_20160120_0950.py b/cmsplugin_filer_image/migrations/0004_auto_20160120_0950.py new file mode 100644 index 00000000..df119aad --- /dev/null +++ b/cmsplugin_filer_image/migrations/0004_auto_20160120_0950.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0003_mv_thumbnail_option_to_filer_20160119_1720'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='thumbnail_option', + field=models.ForeignKey(blank=True, to='filer.ThumbnailOption', help_text='overrides width, height, crop and upscale with values from the selected thumbnail option', null=True, verbose_name='thumbnail option', on_delete=models.CASCADE), + ), + migrations.DeleteModel( + name='ThumbnailOption', + ), + ] diff --git a/cmsplugin_filer_image/migrations/0005_auto_20160224_1457.py b/cmsplugin_filer_image/migrations/0005_auto_20160224_1457.py new file mode 100644 index 00000000..d861b112 --- /dev/null +++ b/cmsplugin_filer_image/migrations/0005_auto_20160224_1457.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0004_auto_20160120_0950'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='free_link', + field=models.CharField(help_text='if present image will be clickable', max_length=2000, null=True, verbose_name='link', blank=True), + ), + ] diff --git a/cmsplugin_filer_image/migrations/0006_auto_20160427_1438.py b/cmsplugin_filer_image/migrations/0006_auto_20160427_1438.py new file mode 100644 index 00000000..d4ee630a --- /dev/null +++ b/cmsplugin_filer_image/migrations/0006_auto_20160427_1438.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0005_auto_20160224_1457'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='alignment', + field=models.CharField(blank=True, max_length=10, null=True, verbose_name='image alignment', choices=[('left', 'left'), ('right', 'right'), ('center', 'center')]), + ), + ] diff --git a/cmsplugin_filer_image/migrations/0007_filerimage_link_attributes.py b/cmsplugin_filer_image/migrations/0007_filerimage_link_attributes.py new file mode 100644 index 00000000..63fab92d --- /dev/null +++ b/cmsplugin_filer_image/migrations/0007_filerimage_link_attributes.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0006_auto_20160427_1438'), + ] + + operations = [ + migrations.AddField( + model_name='filerimage', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(help_text='Optional. Adds HTML attributes to the rendered link.', default=dict), + ), + ] diff --git a/cmsplugin_filer_image/migrations/0008_auto_20160705_1334.py b/cmsplugin_filer_image/migrations/0008_auto_20160705_1334.py new file mode 100644 index 00000000..59234075 --- /dev/null +++ b/cmsplugin_filer_image/migrations/0008_auto_20160705_1334.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-07-05 17:34 +from __future__ import unicode_literals + +from django.db import migrations +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0007_filerimage_link_attributes'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), + ), + ] diff --git a/cmsplugin_filer_image/migrations/0009_auto_20160713_1853.py b/cmsplugin_filer_image/migrations/0009_auto_20160713_1853.py new file mode 100644 index 00000000..e924acef --- /dev/null +++ b/cmsplugin_filer_image/migrations/0009_auto_20160713_1853.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_image', '0008_auto_20160705_1334'), + ] + + operations = [ + migrations.AlterField( + model_name='filerimage', + name='cmsplugin_ptr', + field=models.OneToOneField(parent_link=True, related_name='cmsplugin_filer_image_filerimage', primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE), + ), + ] diff --git a/cmsplugin_filer_image/migrations/__init__.py b/cmsplugin_filer_image/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_image/models.py b/cmsplugin_filer_image/models.py new file mode 100644 index 00000000..055056b0 --- /dev/null +++ b/cmsplugin_filer_image/models.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +from filer.fields.file import FilerFileField +from filer.fields.image import FilerImageField +from filer.models import ThumbnailOption # NOQA + +from cms.models import CMSPlugin +from cms.models.fields import PageField +from cmsplugin_filer_utils import FilerPluginManager +from djangocms_attributes_field.fields import AttributesField + +from .conf import settings + + +class FilerImage(CMSPlugin): + LEFT = "left" + RIGHT = "right" + CENTER = "center" + FLOAT_CHOICES = ((LEFT, _("left")), + (RIGHT, _("right")), + (CENTER, _("center")), + ) + STYLE_CHOICES = settings.CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES + DEFAULT_STYLE = settings.CMSPLUGIN_FILER_IMAGE_DEFAULT_STYLE + EXCLUDED_KEYS = ['class', 'href', 'target', ] + + style = models.CharField( + _('Style'), choices=STYLE_CHOICES, default=DEFAULT_STYLE, max_length=50, blank=True) + caption_text = models.CharField(_("caption text"), null=True, blank=True, max_length=255) + image = FilerImageField( + null=True, + blank=True, + default=None, + verbose_name=_("image"), + on_delete=models.SET_NULL, + ) + image_url = models.URLField(_("alternative image url"), null=True, blank=True, default=None) + alt_text = models.CharField(_("alt text"), null=True, blank=True, max_length=255) + use_original_image = models.BooleanField( + _("use the original image"), default=False, + help_text=_('do not resize the image. use the original image instead.')) + thumbnail_option = models.ForeignKey( + 'filer.ThumbnailOption', null=True, blank=True, verbose_name=_("thumbnail option"), + help_text=_('overrides width, height, crop and upscale with values from the selected thumbnail option'), on_delete=models.CASCADE) + use_autoscale = models.BooleanField(_("use automatic scaling"), default=False, + help_text=_('tries to auto scale the image based on the placeholder context')) + width = models.PositiveIntegerField(_("width"), null=True, blank=True) + height = models.PositiveIntegerField(_("height"), null=True, blank=True) + crop = models.BooleanField(_("crop"), default=True) + upscale = models.BooleanField(_("upscale"), default=True) + alignment = models.CharField(_("image alignment"), max_length=10, blank=True, null=True, choices=FLOAT_CHOICES) + + free_link = models.CharField(_("link"), max_length=2000, blank=True, null=True, + help_text=_("if present image will be clickable")) + page_link = PageField(null=True, blank=True, + help_text=_("if present image will be clickable"), + verbose_name=_("page link")) + file_link = FilerFileField( + null=True, + blank=True, + default=None, + verbose_name=_("file link"), + help_text=_("if present image will be clickable"), + related_name='+', + on_delete=models.SET_NULL, + ) + original_link = models.BooleanField(_("link original image"), default=False, + help_text=_("if present image will be clickable")) + description = models.TextField(_("description"), blank=True, null=True) + target_blank = models.BooleanField(_('Open link in new window'), default=False) + link_attributes = AttributesField(excluded_keys=EXCLUDED_KEYS, blank=True, + help_text=_('Optional. Adds HTML attributes to the rendered link.')) + cmsplugin_ptr = models.OneToOneField( + to=CMSPlugin, + related_name='%(app_label)s_%(class)s', + parent_link=True, + on_delete=models.CASCADE + ) + + # we only add the image to select_related. page_link and file_link are FKs + # as well, but they are not used often enough to warrant the impact of two + # additional LEFT OUTER JOINs. + objects = FilerPluginManager(select_related=('image',)) + + class Meta: + verbose_name = _("filer image") + verbose_name_plural = _("filer images") + + def clean(self): + from django.core.exceptions import ValidationError + # Make sure that either image or image_url is set + if (not self.image and not self.image_url) or (self.image and self.image_url): + raise ValidationError(_('Either an image or an image url must be selected.')) + + def __str__(self): + if self.image: + return self.image.label + else: + return _("Image Publication %(caption)s") % {'caption': self.caption or self.alt} + return '' + + @property + def caption(self): + if self.image: + return self.caption_text or self.image.default_caption + else: + return self.caption_text + + @property + def alt(self): + if self.image: + return self.alt_text or self.image.default_alt_text or self.image.label + else: + return self.alt_text + + @property + def link(self): + if self.free_link: + return self.free_link + elif self.page_link: + return self.page_link.get_absolute_url() + elif self.file_link: + return self.file_link.url + elif self.original_link: + if self.image: + return self.image.url + else: + return self.image_url + else: + return '' diff --git a/cmsplugin_filer_image/templates/cmsplugin_filer_image/plugins/image/default.html b/cmsplugin_filer_image/templates/cmsplugin_filer_image/plugins/image/default.html new file mode 100644 index 00000000..798e3dcb --- /dev/null +++ b/cmsplugin_filer_image/templates/cmsplugin_filer_image/plugins/image/default.html @@ -0,0 +1,35 @@ +{% load thumbnail filer_tags filer_image_tags %}{% spaceless %} +{% comment %} + You may change the image size for special cases in your project by overriding + this template. There are a few size manipulation filters for this in + `filer_image_tags`: + + {% if placeholder == 'my_special_sidebar' %} + {% thumbnail instance.image opts.size|extra_padding_y:10 crop=opts.crop upscale=opts.upscale as thumbnail %} + {% else %} + {% thumbnail instance.image opts.size crop=opts.crop upscale=opts.upscale as thumbnail %} + {% endif %} + {% if link %}{% endif %}{% if link %}{% endif %} +{% endcomment %} + +{% if link %}{% endif %} +{% if instance.image %} + {% if instance.use_original_image %} + {% if instance.alt %}{{ instance.alt }}{% endif %} + {% else %} + {% thumbnail instance.image size crop=opts.crop upscale=opts.upscale subject_location=opts.subject_location as thumbnail %} + {% if instance.alt %}{{ instance.alt }}{% endif %} + {% endif %} +{% else %} + {# just a plain link to some external image #} + {% if instance.alt %}{{ instance.alt }}{% endif %} +{% endif %} +{% if instance.caption or instance.description %} + + {% if instance.caption %}{{ instance.caption }}{% endif %} + {% if instance.description %}{{ instance.description }}{% endif %} + +{% endif %} +{% if link %}{% endif %} + +{% endspaceless %} diff --git a/cmsplugin_filer_link/__init__.py b/cmsplugin_filer_link/__init__.py new file mode 100644 index 00000000..10a7a433 --- /dev/null +++ b/cmsplugin_filer_link/__init__.py @@ -0,0 +1 @@ +from cmsplugin_filer_file import __version__ # NOQA diff --git a/cmsplugin_filer_link/cms_plugins.py b/cmsplugin_filer_link/cms_plugins.py new file mode 100644 index 00000000..bd88cb47 --- /dev/null +++ b/cmsplugin_filer_link/cms_plugins.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.templatetags.static import static +from django.utils.translation import ugettext as _ + +from cms.plugin_base import CMSPluginBase +from cms.plugin_pool import plugin_pool + +from .forms import FilerLinkForm +from .models import FilerLinkPlugin as FilerLinkPluginModel + + +class FilerLinkPlugin(CMSPluginBase): + form = FilerLinkForm + model = FilerLinkPluginModel + module = 'Filer' + name = _("Link") + raw_id_fields = ('page_link', ) + render_template = "cmsplugin_filer_link/link.html" + text_enabled = True + + fieldsets = ( + (None, { + 'fields': [ + 'name', + 'url', + 'page_link', + 'mailto', + 'file', + 'link_style', + 'new_window', + ] + }), + (_('Advanced'), { + 'classes': ['collapse', ], + 'fields': [ + 'link_attributes', + ] + }) + ) + + def render(self, context, instance, placeholder): + context = super(FilerLinkPlugin, self).render(context, instance, placeholder) + if instance.file: + link = instance.file.url + elif instance.mailto: + link = "mailto:%s" % _(instance.mailto) + elif instance.url: + link = _(instance.url) + elif instance.page_link: + link = instance.page_link.get_absolute_url() + else: + link = "" + context.update({ + 'link': link, + 'style': instance.link_style, + 'name': instance.name, + 'new_window': instance.new_window, + }) + return context + + def icon_src(self, instance): + return static("cms/img/icons/plugins/link.png") + + +plugin_pool.register_plugin(FilerLinkPlugin) diff --git a/cmsplugin_filer_link/forms.py b/cmsplugin_filer_link/forms.py new file mode 100644 index 00000000..bac8adf8 --- /dev/null +++ b/cmsplugin_filer_link/forms.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + +from django import forms + +from djangocms_attributes_field.widgets import AttributesWidget + +from .models import FilerLinkPlugin + + +class FilerLinkForm(forms.ModelForm): + + class Meta: + model = FilerLinkPlugin + exclude = [] + + def __init__(self, *args, **kwargs): + super(FilerLinkForm, self).__init__(*args, **kwargs) + self.fields['link_attributes'].widget = AttributesWidget() diff --git a/cmsplugin_filer_link/locale/ca/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 00000000..61fff0ad --- /dev/null +++ b/cmsplugin_filer_link/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Roger Pons , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Catalan (http://www.transifex.com/divio/cmsplugin-filer/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Enllaç" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "nom" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "pàgina" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Un enllaç a pàgina té prioritat sobre urls" + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Una adreça d'email té prioritat sobre pàgines i urls" + +#: models.py:39 +msgid "link style" +msgstr "estil d'enllaç" + +#: models.py:41 +msgid "new window?" +msgstr "nova finestra?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Voleu que aquest enllaç obrir una nova finestra?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/de/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..644d5c12 --- /dev/null +++ b/cmsplugin_filer_link/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Jannik V. , 2016 +# Michal Bielicki , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: German (http://www.transifex.com/divio/cmsplugin-filer/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "URL" + +#: models.py:31 +msgid "page" +msgstr "Seite" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "neues Fenster ?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Soll dieser Link in einem neuen Fenster geöffnet werden?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/en/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/en/LC_MESSAGES/django.po new file mode 100644 index 00000000..a5f77fe4 --- /dev/null +++ b/cmsplugin_filer_link/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/es/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/es/LC_MESSAGES/django.po new file mode 100644 index 00000000..59e3c6bd --- /dev/null +++ b/cmsplugin_filer_link/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Javier Sánchez , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Spanish (http://www.transifex.com/divio/cmsplugin-filer/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Enlace" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "nombre" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "página" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Un enlace a la página tiene prioridad sobre las urls." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Una dirección de correo tiene prioridad sobre ambas páginas y urls" + +#: models.py:39 +msgid "link style" +msgstr "estilo de enlace" + +#: models.py:41 +msgid "new window?" +msgstr "¿nueva ventana?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "¿Quieres que este enlace se abra en una nueva ventana?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/et/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/et/LC_MESSAGES/django.po new file mode 100644 index 00000000..c6fd2a52 --- /dev/null +++ b/cmsplugin_filer_link/locale/et/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rivo Zängov , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Estonian (http://www.transifex.com/divio/cmsplugin-filer/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "nimi" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "leht" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "lingi stiil" + +#: models.py:41 +msgid "new window?" +msgstr "uues aknas?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Kas sa soovid seda linki avada uues aknas?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/eu/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/eu/LC_MESSAGES/django.po new file mode 100644 index 00000000..f9ef8899 --- /dev/null +++ b/cmsplugin_filer_link/locale/eu/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Basque (http://www.transifex.com/divio/cmsplugin-filer/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Esteka" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "izena" + +#: models.py:29 +msgid "url" +msgstr "helbidea" + +#: models.py:31 +msgid "page" +msgstr "orria" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Orri baterako estekak helbide baterako estekak baino lehentasun handiagoa du" + +#: models.py:37 +msgid "mailto" +msgstr "e-posta" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "E-posta helbide batek orri edo helbidea baino lehentasun handiagoa du" + +#: models.py:39 +msgid "link style" +msgstr "esteka estiloa" + +#: models.py:41 +msgid "new window?" +msgstr "leiho berria?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Esteka hau leiho berri batean irekitzea nahi duzu?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/fi/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/fi/LC_MESSAGES/django.po new file mode 100644 index 00000000..61d68f9c --- /dev/null +++ b/cmsplugin_filer_link/locale/fi/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Finnish (http://www.transifex.com/divio/cmsplugin-filer/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/fr/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..912d6c68 --- /dev/null +++ b/cmsplugin_filer_link/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Bertrand Bordage , 2013 +# Frigory33 , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-06 18:35+0000\n" +"Last-Translator: Frigory33 \n" +"Language-Team: French (http://www.transifex.com/divio/cmsplugin-filer/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Lien" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "Avancé" + +#: models.py:28 +msgid "name" +msgstr "nom" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "page" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Un lien vers une page est prioritaire sur une URL." + +#: models.py:37 +msgid "mailto" +msgstr "courriel" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Un lien vers un courriel est prioritaire sur un lien vers une page ou une URL." + +#: models.py:39 +msgid "link style" +msgstr "style de lien" + +#: models.py:41 +msgid "new window?" +msgstr "nouvelle fenêtre ?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Voulez-vous ouvrir ce lien dans une nouvelle fenêtre ?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Facultatif. Ajoute des attributs HTML au lien généré." diff --git a/cmsplugin_filer_link/locale/it/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/it/LC_MESSAGES/django.po new file mode 100644 index 00000000..14a8958e --- /dev/null +++ b/cmsplugin_filer_link/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# yakky , 2013,2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-13 08:28+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Italian (http://www.transifex.com/divio/cmsplugin-filer/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "Avanzate" + +#: models.py:28 +msgid "name" +msgstr "Nome" + +#: models.py:29 +msgid "url" +msgstr "URL" + +#: models.py:31 +msgid "page" +msgstr "pagina" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Un link ad una pagina ha la priorità rispetto agli URL." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Un indirizzo email ha la priorità rispetto alle pagina e agli URL." + +#: models.py:39 +msgid "link style" +msgstr "stile link" + +#: models.py:41 +msgid "new window?" +msgstr "nuova finestra?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Vuoi che questo link si apra in una nuova finestra?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Opzionale. Aggiungi attributi HTML al link" diff --git a/cmsplugin_filer_link/locale/it_IT/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/it_IT/LC_MESSAGES/django.po new file mode 100644 index 00000000..b04db853 --- /dev/null +++ b/cmsplugin_filer_link/locale/it_IT/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Italian (Italy) (http://www.transifex.com/divio/cmsplugin-filer/language/it_IT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/lt/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 00000000..4b607cac --- /dev/null +++ b/cmsplugin_filer_link/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Matas Dailyda, 2015 +# Matas Dailyda , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-07-18 09:19+0000\n" +"Last-Translator: Matas Dailyda \n" +"Language-Team: Lithuanian (http://www.transifex.com/divio/cmsplugin-filer/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Nuoroda" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "Išplėstiniai" + +#: models.py:28 +msgid "name" +msgstr "pavadinimas" + +#: models.py:29 +msgid "url" +msgstr "nuoroda" + +#: models.py:31 +msgid "page" +msgstr "puslapis" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Nuoroda į puslapį turi didesnį prioritetą nei tekstinė nuoroda." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Elektroninio pašto nuoroda turi didesnį prioritetą nei tekstinė nuoroda." + +#: models.py:39 +msgid "link style" +msgstr "nuorodos stilius" + +#: models.py:41 +msgid "new window?" +msgstr "naujas langas?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Ar norite kad ši nuoroda atidarytų naują langą?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Nebūtina. Prideda HTML atributus prie atvaizduojamos nuorodos." diff --git a/cmsplugin_filer_link/locale/lt_LT/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/lt_LT/LC_MESSAGES/django.po new file mode 100644 index 00000000..9457f719 --- /dev/null +++ b/cmsplugin_filer_link/locale/lt_LT/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/divio/cmsplugin-filer/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/nb/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/nb/LC_MESSAGES/django.po new file mode 100644 index 00000000..08496458 --- /dev/null +++ b/cmsplugin_filer_link/locale/nb/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/divio/cmsplugin-filer/language/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/nl/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 00000000..10a44d4c --- /dev/null +++ b/cmsplugin_filer_link/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Maarten Draijer , 2013 +# Maikel Wever, 2013 +# kurdyma , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-27 20:24+0000\n" +"Last-Translator: kurdyma \n" +"Language-Team: Dutch (http://www.transifex.com/divio/cmsplugin-filer/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "Geavanveerd" + +#: models.py:28 +msgid "name" +msgstr "naam" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "pagina" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Een link naar een pagina heeft meer prioriteit dan urls." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Een e-mailadres heeft meer prioriteit dan pagina's en urls" + +#: models.py:39 +msgid "link style" +msgstr "link stijl" + +#: models.py:41 +msgid "new window?" +msgstr "nieuw venster?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Wil je deze link laten openen in een nieuw venster?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "Optioneel. Voegt HTML attributen toe aan de gerenderde link." diff --git a/cmsplugin_filer_link/locale/nn/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/nn/LC_MESSAGES/django.po new file mode 100644 index 00000000..089d5481 --- /dev/null +++ b/cmsplugin_filer_link/locale/nn/LC_MESSAGES/django.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Norwegian Nynorsk (http://www.transifex.com/divio/cmsplugin-filer/language/nn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "" + +#: models.py:37 +msgid "mailto" +msgstr "" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "" + +#: models.py:39 +msgid "link style" +msgstr "" + +#: models.py:41 +msgid "new window?" +msgstr "" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/pl_PL/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/pl_PL/LC_MESSAGES/django.po new file mode 100644 index 00000000..67c1cc55 --- /dev/null +++ b/cmsplugin_filer_link/locale/pl_PL/LC_MESSAGES/django.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Mateusz Marzantowicz , 2013 +# Michal Bielicki , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Polish (Poland) (http://www.transifex.com/divio/cmsplugin-filer/language/pl_PL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl_PL\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "nazwa" + +#: models.py:29 +msgid "url" +msgstr "URL" + +#: models.py:31 +msgid "page" +msgstr "strona" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Odnośnik do strony ma priorytet nad adresami URL." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Adres e-mail ma priorytet nad odnośnikami do stron oraz nad adresami URL" + +#: models.py:39 +msgid "link style" +msgstr "styl odnośnika" + +#: models.py:41 +msgid "new window?" +msgstr "nowe okno ?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Czy chciałbyś otworzyć ten link w nowym okienku ?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/pt_BR/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 00000000..e4dcacb5 --- /dev/null +++ b/cmsplugin_filer_link/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rodrigo , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/divio/cmsplugin-filer/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Link" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "nome" + +#: models.py:29 +msgid "url" +msgstr "url" + +#: models.py:31 +msgid "page" +msgstr "página" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Um link para uma página tem prioridade sobre as urls." + +#: models.py:37 +msgid "mailto" +msgstr "mailto" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Um endereço de e-mail tem prioridade sobre urls e páginas" + +#: models.py:39 +msgid "link style" +msgstr "link style" + +#: models.py:41 +msgid "new window?" +msgstr "nova janela?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Você deseja que este link seja aberto em uma nova janela?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/ru/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..e988fd31 --- /dev/null +++ b/cmsplugin_filer_link/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Pavel , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Russian (http://www.transifex.com/divio/cmsplugin-filer/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "Ссылка" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "имя" + +#: models.py:29 +msgid "url" +msgstr "URL" + +#: models.py:31 +msgid "page" +msgstr "страница" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "Ссылка на страницу имеет больший приоритет" + +#: models.py:37 +msgid "mailto" +msgstr "почта" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "Ссылка на почту имеет больший приоритет над ссылкой на страницу или URL" + +#: models.py:39 +msgid "link style" +msgstr "стиль ссылки" + +#: models.py:41 +msgid "new window?" +msgstr "в новом окне?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "Необходимо открыть ссылку в новом окне?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/locale/zh_CN/LC_MESSAGES/django.po b/cmsplugin_filer_link/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 00000000..566d6158 --- /dev/null +++ b/cmsplugin_filer_link/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Calvin-He , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-06-22 17:49+0000\n" +"Last-Translator: Martin Koistinen \n" +"Language-Team: Chinese (China) (http://www.transifex.com/divio/cmsplugin-filer/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: cms_plugins.py:18 +msgid "Link" +msgstr "链接" + +#: cms_plugins.py:35 +msgid "Advanced" +msgstr "" + +#: models.py:28 +msgid "name" +msgstr "名称" + +#: models.py:29 +msgid "url" +msgstr "" + +#: models.py:31 +msgid "page" +msgstr "页面" + +#: models.py:34 +msgid "A link to a page has priority over urls." +msgstr "到页面的链接优先于urls" + +#: models.py:37 +msgid "mailto" +msgstr "发送到" + +#: models.py:38 +msgid "An email address has priority over both pages and urls" +msgstr "邮箱地址优先于页面和urls" + +#: models.py:39 +msgid "link style" +msgstr "链接样式" + +#: models.py:41 +msgid "new window?" +msgstr "新窗口?" + +#: models.py:42 +msgid "Do you want this link to open a new window?" +msgstr "你想要在新窗口打开这个链接吗?" + +#: models.py:45 +msgid "Optional. Adds HTML attributes to the rendered link." +msgstr "" diff --git a/cmsplugin_filer_link/migrations/0001_initial.py b/cmsplugin_filer_link/migrations/0001_initial.py new file mode 100644 index 00000000..055edce7 --- /dev/null +++ b/cmsplugin_filer_link/migrations/0001_initial.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import filer.fields.file +import cms.models.fields +from cmsplugin_filer_link.models import LINK_STYLES + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0003_auto_20140926_2347'), + ('filer', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='FilerLinkPlugin', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE)), + ('name', models.CharField(max_length=255, verbose_name='name')), + ('url', models.CharField(max_length=255, null=True, verbose_name='url', blank=True)), + ('mailto', models.EmailField(help_text='An email address has priority over both pages and urls', max_length=75, null=True, verbose_name='mailto', blank=True)), + ('link_style', models.CharField(max_length=255, verbose_name='link style', default=LINK_STYLES[0][0], choices=LINK_STYLES)), + ('new_window', models.BooleanField(default=False, help_text='Do you want this link to open a new window?', verbose_name='new window?')), + ('file', filer.fields.file.FilerFileField(blank=True, to='filer.File', null=True, on_delete=models.CASCADE)), + ('page_link', cms.models.fields.PageField(blank=True, to='cms.Page', help_text='A link to a page has priority over urls.', null=True, verbose_name='page')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0002_auto_20160108_1710.py b/cmsplugin_filer_link/migrations/0002_auto_20160108_1710.py new file mode 100644 index 00000000..97126b98 --- /dev/null +++ b/cmsplugin_filer_link/migrations/0002_auto_20160108_1710.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import filer.fields.file +import django.db.models.deletion +import cms.models.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='filerlinkplugin', + name='file', + field=filer.fields.file.FilerFileField(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='filer.File', null=True), + ), + migrations.AlterField( + model_name='filerlinkplugin', + name='page_link', + field=cms.models.fields.PageField(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='cms.Page', help_text='A link to a page has priority over urls.', null=True, verbose_name='page'), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0003_auto_20160224_1453.py b/cmsplugin_filer_link/migrations/0003_auto_20160224_1453.py new file mode 100644 index 00000000..372d2fdf --- /dev/null +++ b/cmsplugin_filer_link/migrations/0003_auto_20160224_1453.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0002_auto_20160108_1710'), + ] + + operations = [ + migrations.AlterField( + model_name='filerlinkplugin', + name='mailto', + field=models.EmailField(help_text='An email address has priority over both pages and urls', max_length=254, null=True, verbose_name='mailto', blank=True), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0004_auto_20160224_1457.py b/cmsplugin_filer_link/migrations/0004_auto_20160224_1457.py new file mode 100644 index 00000000..43126dab --- /dev/null +++ b/cmsplugin_filer_link/migrations/0004_auto_20160224_1457.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0003_auto_20160224_1453'), + ] + + operations = [ + migrations.AlterField( + model_name='filerlinkplugin', + name='url', + field=models.CharField(max_length=2000, null=True, verbose_name='url', blank=True), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0005_filerlinkplugin_link_attributes.py b/cmsplugin_filer_link/migrations/0005_filerlinkplugin_link_attributes.py new file mode 100644 index 00000000..1346a29d --- /dev/null +++ b/cmsplugin_filer_link/migrations/0005_filerlinkplugin_link_attributes.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0004_auto_20160224_1457'), + ] + + operations = [ + migrations.AddField( + model_name='filerlinkplugin', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0006_auto_20160705_1334.py b/cmsplugin_filer_link/migrations/0006_auto_20160705_1334.py new file mode 100644 index 00000000..5f0f1d6a --- /dev/null +++ b/cmsplugin_filer_link/migrations/0006_auto_20160705_1334.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-07-05 17:34 +from __future__ import unicode_literals + +from django.db import migrations +import djangocms_attributes_field.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0005_filerlinkplugin_link_attributes'), + ] + + operations = [ + migrations.AlterField( + model_name='filerlinkplugin', + name='link_attributes', + field=djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), + ), + ] diff --git a/cmsplugin_filer_link/migrations/0007_auto_20160713_1853.py b/cmsplugin_filer_link/migrations/0007_auto_20160713_1853.py new file mode 100644 index 00000000..5ed8cb10 --- /dev/null +++ b/cmsplugin_filer_link/migrations/0007_auto_20160713_1853.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_link', '0006_auto_20160705_1334'), + ] + + operations = [ + migrations.AlterField( + model_name='filerlinkplugin', + name='cmsplugin_ptr', + field=models.OneToOneField(parent_link=True, related_name='cmsplugin_filer_link_filerlinkplugin', primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE), + ), + ] diff --git a/cmsplugin_filer_link/migrations/__init__.py b/cmsplugin_filer_link/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_link/models.py b/cmsplugin_filer_link/models.py new file mode 100644 index 00000000..bb0c73ac --- /dev/null +++ b/cmsplugin_filer_link/models.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models +from django.utils.translation import ugettext_lazy as _ +from django.conf import settings + +from cms.models import CMSPlugin +from cms.models.fields import PageField + +from filer.fields.file import FilerFileField + +from djangocms_attributes_field.fields import AttributesField + + +DEFULT_LINK_STYLES = ( + (" ", "Default"), +) + +LINK_STYLES = getattr(settings, "FILER_LINK_STYLES", DEFULT_LINK_STYLES) + +EXCLUDED_KEYS = ['class', 'href', 'target', ] + + +class FilerLinkPlugin(CMSPlugin): + name = models.CharField(_('name'), max_length=255) + url = models.CharField(_("url"), blank=True, null=True, max_length=2000) + page_link = PageField( + verbose_name=_("page"), + blank=True, + null=True, + help_text=_("A link to a page has priority over urls."), + on_delete=models.SET_NULL, + ) + mailto = models.EmailField(_("mailto"), blank=True, null=True, max_length=254, + help_text=_("An email address has priority over both pages and urls")) + link_style = models.CharField(_("link style"), max_length=255, + choices=LINK_STYLES, default=LINK_STYLES[0][0]) + new_window = models.BooleanField(_("new window?"), default=False, + help_text=_("Do you want this link to open a new window?")) + file = FilerFileField(blank=True, null=True, on_delete=models.SET_NULL) + link_attributes = AttributesField(excluded_keys=EXCLUDED_KEYS, blank=True, + help_text=_('Optional. Adds HTML attributes to the rendered link.')) + cmsplugin_ptr = models.OneToOneField( + to=CMSPlugin, + related_name='%(app_label)s_%(class)s', + parent_link=True, + on_delete=models.CASCADE + ) + + def __str__(self): + return self.name diff --git a/cmsplugin_filer_link/templates/cmsplugin_filer_link/link.html b/cmsplugin_filer_link/templates/cmsplugin_filer_link/link.html new file mode 100644 index 00000000..2e046586 --- /dev/null +++ b/cmsplugin_filer_link/templates/cmsplugin_filer_link/link.html @@ -0,0 +1 @@ +{{ name }} \ No newline at end of file diff --git a/cmsplugin_filer_utils/__init__.py b/cmsplugin_filer_utils/__init__.py new file mode 100644 index 00000000..a52e69e6 --- /dev/null +++ b/cmsplugin_filer_utils/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from cmsplugin_filer_file import __version__ # NOQA + +from django.db import models + + +class FilerPluginManager(models.Manager): + def __init__(self, select_related=None): + self._select_related = select_related + super(FilerPluginManager, self).__init__() + + def get_queryset(self): + # TODO: Remove once support for Django 1.4/1.5 are dropped + try: + qs = super(FilerPluginManager, self).get_queryset() + except AttributeError: + qs = super(FilerPluginManager, self).get_query_set() + if self._select_related: + qs = qs.prefetch_related(*self._select_related) + return qs + + get_query_set = get_queryset diff --git a/cmsplugin_filer_utils/migration.py b/cmsplugin_filer_utils/migration.py new file mode 100644 index 00000000..6f1dd81c --- /dev/null +++ b/cmsplugin_filer_utils/migration.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + + +def rename_tables(db, table_mapping, reverse=False): + """ + renames tables from source to destination name, if the source exists and the destination does + not exist yet. + """ + from django.db import connection + if reverse: + table_mapping = [(dst, src) for src, dst in table_mapping] + table_names = connection.introspection.table_names() + for source, destination in table_mapping: + if source in table_names and destination in table_names: + print(u" WARNING: not renaming {0} to {1}, because both tables already exist.".format(source, destination)) + elif source in table_names and destination not in table_names: + print(u" - renaming {0} to {1}".format(source, destination)) + db.rename_table(source, destination) + + +def rename_tables_old_to_new(db, table_mapping): + return rename_tables(db, table_mapping, reverse=False) + + +def rename_tables_new_to_old(db, table_mapping): + return rename_tables(db, table_mapping, reverse=True) diff --git a/cmsplugin_filer_video/__init__.py b/cmsplugin_filer_video/__init__.py new file mode 100644 index 00000000..10a7a433 --- /dev/null +++ b/cmsplugin_filer_video/__init__.py @@ -0,0 +1 @@ +from cmsplugin_filer_file import __version__ # NOQA diff --git a/cmsplugin_filer_video/cms_plugins.py b/cmsplugin_filer_video/cms_plugins.py new file mode 100644 index 00000000..ba6102c9 --- /dev/null +++ b/cmsplugin_filer_video/cms_plugins.py @@ -0,0 +1,62 @@ +from __future__ import unicode_literals + +from cms.plugin_pool import plugin_pool +from cms.plugin_base import CMSPluginBase +from django.templatetags.static import static +from django.utils.translation import ugettext_lazy as _ +from cmsplugin_filer_video import settings +from cmsplugin_filer_video.models import FilerVideo +from cmsplugin_filer_video.forms import VideoForm + + +class FilerVideoPlugin(CMSPluginBase): + module = 'Filer' + model = FilerVideo + name = _("Video") + form = VideoForm + + render_template = "cmsplugin_filer_video/video.html" + text_enabled = True + + general_fields = [ + 'movie', + 'movie_url', + 'image', + ('width', 'height'), + 'auto_play', + 'auto_hide', + 'fullscreen', + 'loop', + ] + color_fields = [ + 'bgcolor', + 'textcolor', + 'seekbarcolor', + 'seekbarbgcolor', + 'loadingbarcolor', + 'buttonoutcolor', + 'buttonovercolor', + 'buttonhighlightcolor', + ] + + fieldsets = [ + (None, { + 'fields': general_fields, + }), + ] + if settings.VIDEO_PLUGIN_ENABLE_ADVANCED_SETTINGS: + fieldsets += [ + (_('Color Settings'), { + 'fields': color_fields, + 'classes': ('collapse',), + }), + ] + + def render(self, context, instance, placeholder): + context['object'] = instance + return super(FilerVideoPlugin, self).render(context, instance, placeholder) + + def icon_src(self, instance): + return static("filer/icons/video_%sx%s.png" % (32, 32,)) + +plugin_pool.register_plugin(FilerVideoPlugin) diff --git a/cmsplugin_filer_video/forms.py b/cmsplugin_filer_video/forms.py new file mode 100644 index 00000000..ae350fd5 --- /dev/null +++ b/cmsplugin_filer_video/forms.py @@ -0,0 +1,9 @@ +from django import forms +from cmsplugin_filer_video.models import FilerVideo + + +class VideoForm(forms.ModelForm): + + class Meta: + model = FilerVideo + exclude = ('page', 'position', 'placeholder', 'language', 'plugin_type') diff --git a/cmsplugin_filer_video/locale/ca/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/ca/LC_MESSAGES/django.po new file mode 100644 index 00000000..5180a650 --- /dev/null +++ b/cmsplugin_filer_video/locale/ca/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Roger Pons , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Catalan (http://www.transifex.com/divio/cmsplugin-filer/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Configuració del color" + +#: models.py:17 +msgid "movie file" +msgstr "fitxer de pel·lícula" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "utilitza un fitxer .flv o codificat en h264" + +#: models.py:23 +msgid "movie url" +msgstr "url de la pel·lícula" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "url de vimeo o youtube. Exemple: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "imatge" + +#: models.py:26 +msgid "preview image file" +msgstr "previsualitza fitxer d'imatge" + +#: models.py:33 +msgid "width" +msgstr "amplada" + +#: models.py:34 +msgid "height" +msgstr "alçada" + +#: models.py:36 +msgid "auto play" +msgstr "inici automàtic" + +#: models.py:37 +msgid "auto hide" +msgstr "amaga automàticament" + +#: models.py:38 +msgid "fullscreen" +msgstr "pantalla completa" + +#: models.py:39 +msgid "loop" +msgstr "repeteix" + +#: models.py:42 +msgid "background color" +msgstr "color de fons" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadecimal, exemple: ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "color de text" + +#: models.py:44 +msgid "seekbar color" +msgstr "color de la barra de cerca" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "color de fons de la barra de cerca" + +#: models.py:46 +msgid "loadingbar color" +msgstr "color de la barra de càrrega" + +#: models.py:47 +msgid "button out color" +msgstr "color de botó de fora" + +#: models.py:48 +msgid "button over color" +msgstr "color de botó per sobre" + +#: models.py:49 +msgid "button highlight color" +msgstr "color de botó resaltat" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "No es troba el plugin de flash. Descarregueu-lo aquí." diff --git a/cmsplugin_filer_video/locale/de/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..116cf579 --- /dev/null +++ b/cmsplugin_filer_video/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Jannik V. , 2016 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-27 11:56+0000\n" +"Last-Translator: Jannik V. \n" +"Language-Team: German (http://www.transifex.com/divio/cmsplugin-filer/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Farbeinstellungen" + +#: models.py:17 +msgid "movie file" +msgstr "Videodatei" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr ".flv Datei oder h264 kodierte Videodatei benutzen" + +#: models.py:23 +msgid "movie url" +msgstr "Video-URL" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo oder youtube Video-URL. Beispiel: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "Bild" + +#: models.py:26 +msgid "preview image file" +msgstr "Vorschaubild" + +#: models.py:33 +msgid "width" +msgstr "Breite" + +#: models.py:34 +msgid "height" +msgstr "Höhe" + +#: models.py:36 +msgid "auto play" +msgstr "automatische Wiedergabe" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "Vollbild" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "Hintergrundfarbe" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadezimal, bspw. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "Textfarbe" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Flash-Plugin fehlt. Download hier." diff --git a/cmsplugin_filer_video/locale/en/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/en/LC_MESSAGES/django.po new file mode 100644 index 00000000..26bd9b73 --- /dev/null +++ b/cmsplugin_filer_video/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "" + +#: models.py:17 +msgid "movie file" +msgstr "" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "" + +#: models.py:23 +msgid "movie url" +msgstr "" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "" + +#: models.py:25 +msgid "image" +msgstr "" + +#: models.py:26 +msgid "preview image file" +msgstr "" + +#: models.py:33 +msgid "width" +msgstr "" + +#: models.py:34 +msgid "height" +msgstr "" + +#: models.py:36 +msgid "auto play" +msgstr "" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "" + +#: models.py:43 +msgid "text color" +msgstr "" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "" diff --git a/cmsplugin_filer_video/locale/es/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/es/LC_MESSAGES/django.po new file mode 100644 index 00000000..eb41a5d7 --- /dev/null +++ b/cmsplugin_filer_video/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Javier Sánchez , 2015 +# David Díaz , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Spanish (http://www.transifex.com/divio/cmsplugin-filer/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Vídeo" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Configuración de Color" + +#: models.py:17 +msgid "movie file" +msgstr "archivo de vídeo" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "usar archivos de vídeo .flv o archivos vídeo codificados con h264" + +#: models.py:23 +msgid "movie url" +msgstr "url de película" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "url vimeo o youtube. Ejemplo: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "imagen" + +#: models.py:26 +msgid "preview image file" +msgstr "previsualización del archivo de imagen" + +#: models.py:33 +msgid "width" +msgstr "ancho" + +#: models.py:34 +msgid "height" +msgstr "alto" + +#: models.py:36 +msgid "auto play" +msgstr "auto reproducción" + +#: models.py:37 +msgid "auto hide" +msgstr "auto ocultar" + +#: models.py:38 +msgid "fullscreen" +msgstr "ventana completa" + +#: models.py:39 +msgid "loop" +msgstr "vuelta" + +#: models.py:42 +msgid "background color" +msgstr "color de fondo" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadecimal, por ej. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "color del texto" + +#: models.py:44 +msgid "seekbar color" +msgstr "color de la barra de progreso" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "color de fondo de la barra de progreso" + +#: models.py:46 +msgid "loadingbar color" +msgstr "color de la barra de carga" + +#: models.py:47 +msgid "button out color" +msgstr "color del botón fuera" + +#: models.py:48 +msgid "button over color" +msgstr "color del botón sobre" + +#: models.py:49 +msgid "button highlight color" +msgstr "color del botón activo" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Plugin de flash no encontrado. Descargar aquí." diff --git a/cmsplugin_filer_video/locale/et/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/et/LC_MESSAGES/django.po new file mode 100644 index 00000000..85c71908 --- /dev/null +++ b/cmsplugin_filer_video/locale/et/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rivo Zängov , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Estonian (http://www.transifex.com/divio/cmsplugin-filer/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Värvi seaded" + +#: models.py:17 +msgid "movie file" +msgstr "videofail" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "kasuta .flv faili või h264 kodeeritud videofaili" + +#: models.py:23 +msgid "movie url" +msgstr "video url" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo või youtube video url. Näiteks: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "pilt" + +#: models.py:26 +msgid "preview image file" +msgstr "pildifaili eelvaade" + +#: models.py:33 +msgid "width" +msgstr "laius" + +#: models.py:34 +msgid "height" +msgstr "kõrgus" + +#: models.py:36 +msgid "auto play" +msgstr "automaatne esitamine" + +#: models.py:37 +msgid "auto hide" +msgstr "automaatne peitmine" + +#: models.py:38 +msgid "fullscreen" +msgstr "täisekraan" + +#: models.py:39 +msgid "loop" +msgstr "kordamine" + +#: models.py:42 +msgid "background color" +msgstr "taustavärv" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "HEX-kood, nt ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "teksti värv" + +#: models.py:44 +msgid "seekbar color" +msgstr "otsimisriba värv" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "otsimisriba tausta värv" + +#: models.py:46 +msgid "loadingbar color" +msgstr "laadimisriba värv" + +#: models.py:47 +msgid "button out color" +msgstr "välja lülitatud nupu värv" + +#: models.py:48 +msgid "button over color" +msgstr "nupu värv hiire all" + +#: models.py:49 +msgid "button highlight color" +msgstr "esiletõstetud nupu värv" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Flashi plugin puudub. Lae alla siit." diff --git a/cmsplugin_filer_video/locale/eu/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/eu/LC_MESSAGES/django.po new file mode 100644 index 00000000..cadf56ac --- /dev/null +++ b/cmsplugin_filer_video/locale/eu/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Basque (http://www.transifex.com/divio/cmsplugin-filer/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Bideoa" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Kolore aukerak" + +#: models.py:17 +msgid "movie file" +msgstr "bideo fitxategia" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr ".flv edo h264 kodetzea erabiltzen duen fitxategia" + +#: models.py:23 +msgid "movie url" +msgstr "bideo helbidea" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo or youtube bideo helbidea . Adibidez: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "irudia" + +#: models.py:26 +msgid "preview image file" +msgstr "aurreikuspeneko irudi fitxategia" + +#: models.py:33 +msgid "width" +msgstr "zabalera" + +#: models.py:34 +msgid "height" +msgstr "altuera" + +#: models.py:36 +msgid "auto play" +msgstr "automatikoki erreproduzitu" + +#: models.py:37 +msgid "auto hide" +msgstr "automatikoki ezkutatu" + +#: models.py:38 +msgid "fullscreen" +msgstr "pantaila osoa" + +#: models.py:39 +msgid "loop" +msgstr "errepikatu" + +#: models.py:42 +msgid "background color" +msgstr "atzeko kolorea" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hamaseitarra, adb. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "testu kolorea" + +#: models.py:44 +msgid "seekbar color" +msgstr "nabigazio-barraren kolorea" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "nabigazio-barraren atzeko kolorea" + +#: models.py:46 +msgid "loadingbar color" +msgstr "karga-barraren kolorea" + +#: models.py:47 +msgid "button out color" +msgstr "botoiaren kolorea" + +#: models.py:48 +msgid "button over color" +msgstr "botoiaren gainjartze kolorea" + +#: models.py:49 +msgid "button highlight color" +msgstr "botoi nabarmenduaren kolorea" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Flash plugina falta da. hemendik deskargatu." diff --git a/cmsplugin_filer_video/locale/fi/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/fi/LC_MESSAGES/django.po new file mode 100644 index 00000000..22f86ab4 --- /dev/null +++ b/cmsplugin_filer_video/locale/fi/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Klaus Dahlén , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Finnish (http://www.transifex.com/divio/cmsplugin-filer/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Väriasetukset" + +#: models.py:17 +msgid "movie file" +msgstr "videotiedosto" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "käytä .flv-tiedostoa tai h264-enkoodattua videotiedostoa" + +#: models.py:23 +msgid "movie url" +msgstr "videon URL" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "Vimeo- tai YouTube-videon URL. Esimerkiksi: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "kuva" + +#: models.py:26 +msgid "preview image file" +msgstr "kuvatiedoston esikatselu" + +#: models.py:33 +msgid "width" +msgstr "leveys" + +#: models.py:34 +msgid "height" +msgstr "korkeus" + +#: models.py:36 +msgid "auto play" +msgstr "automaattitoisto" + +#: models.py:37 +msgid "auto hide" +msgstr "automaattinen piilotus" + +#: models.py:38 +msgid "fullscreen" +msgstr "koko ruudun toisto" + +#: models.py:39 +msgid "loop" +msgstr "jatkuva toisto" + +#: models.py:42 +msgid "background color" +msgstr "taustaväri" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Heksadesimaali, esim. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "tekstin väri" + +#: models.py:44 +msgid "seekbar color" +msgstr "toistopalkin väri" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "toistopalkin taustaväri" + +#: models.py:46 +msgid "loadingbar color" +msgstr "latauspalkin väri" + +#: models.py:47 +msgid "button out color" +msgstr "painikkeen väri" + +#: models.py:48 +msgid "button over color" +msgstr "painikkeen väri kun hiiri päällä" + +#: models.py:49 +msgid "button highlight color" +msgstr "painikkeen korostusväri" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Flash puuttuu. Lataa se tästä." diff --git a/cmsplugin_filer_video/locale/fr/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 00000000..65596505 --- /dev/null +++ b/cmsplugin_filer_video/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Bertrand Bordage , 2012 +# Bertrand Bordage , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: French (http://www.transifex.com/divio/cmsplugin-filer/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Vidéo" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Réglages de couleur" + +#: models.py:17 +msgid "movie file" +msgstr "fichier vidéo" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "Utilisez un fichier vidéo encodé au format .FLV ou H264." + +#: models.py:23 +msgid "movie url" +msgstr "adresse de la vidéo" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "Adresse d'une vidéo vimeo ou youtube. Exemple : http://www.youtube.com/watch?v=ugqu10JV7dk" + +#: models.py:25 +msgid "image" +msgstr "image" + +#: models.py:26 +msgid "preview image file" +msgstr "fichier image de prévisualisation" + +#: models.py:33 +msgid "width" +msgstr "largeur" + +#: models.py:34 +msgid "height" +msgstr "hauteur" + +#: models.py:36 +msgid "auto play" +msgstr "lecture automatique" + +#: models.py:37 +msgid "auto hide" +msgstr "cacher automatiquement" + +#: models.py:38 +msgid "fullscreen" +msgstr "plein écran" + +#: models.py:39 +msgid "loop" +msgstr "boucle" + +#: models.py:42 +msgid "background color" +msgstr "couleur de fond" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadécimal, par exemple FF00CC" + +#: models.py:43 +msgid "text color" +msgstr "couleur du texte" + +#: models.py:44 +msgid "seekbar color" +msgstr "couleur de la barre de déroulement" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "couleur de fond de la barre de déroulement" + +#: models.py:46 +msgid "loadingbar color" +msgstr "couleur de la barre de chargement" + +#: models.py:47 +msgid "button out color" +msgstr "couleur de bouton au repos" + +#: models.py:48 +msgid "button over color" +msgstr "couleur de bouton survolé" + +#: models.py:49 +msgid "button highlight color" +msgstr "couleur de bouton en surbrillance" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Plugin Flash manquant. Téléchargez-le ici." diff --git a/cmsplugin_filer_video/locale/it/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/it/LC_MESSAGES/django.po new file mode 100644 index 00000000..d2dd010a --- /dev/null +++ b/cmsplugin_filer_video/locale/it/LC_MESSAGES/django.po @@ -0,0 +1,122 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# yakky , 2012 +# yakky , 2013 +# yakky , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Italian (http://www.transifex.com/divio/cmsplugin-filer/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Impostazioni dei colori" + +#: models.py:17 +msgid "movie file" +msgstr "File video" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "usa file un file video .flv o codificato h264" + +#: models.py:23 +msgid "movie url" +msgstr "URL video" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "URL video youtube. Example: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "immagine" + +#: models.py:26 +msgid "preview image file" +msgstr "immagine di anteprima" + +#: models.py:33 +msgid "width" +msgstr "larghezza" + +#: models.py:34 +msgid "height" +msgstr "altezza" + +#: models.py:36 +msgid "auto play" +msgstr "auto avvio" + +#: models.py:37 +msgid "auto hide" +msgstr "nascondi autom." + +#: models.py:38 +msgid "fullscreen" +msgstr "schermo pieno" + +#: models.py:39 +msgid "loop" +msgstr "loop" + +#: models.py:42 +msgid "background color" +msgstr "colore di sfondo" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Codice web, es ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "colore del testo" + +#: models.py:44 +msgid "seekbar color" +msgstr "colore della barra" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "colore di sfondo della barra" + +#: models.py:46 +msgid "loadingbar color" +msgstr "colore della barra di caricamento" + +#: models.py:47 +msgid "button out color" +msgstr "colore bottoni" + +#: models.py:48 +msgid "button over color" +msgstr "colore dei bottoni evidenziati" + +#: models.py:49 +msgid "button highlight color" +msgstr "colore dei bottoni selezionati" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Plugin flash mancante. E' possibile scaricarlo" diff --git a/cmsplugin_filer_video/locale/it_IT/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/it_IT/LC_MESSAGES/django.po new file mode 100644 index 00000000..585c473b --- /dev/null +++ b/cmsplugin_filer_video/locale/it_IT/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2012-07-13 16:08+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Italian (Italy) (http://www.transifex.com/divio/cmsplugin-filer/language/it_IT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "" + +#: models.py:17 +msgid "movie file" +msgstr "" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "" + +#: models.py:23 +msgid "movie url" +msgstr "" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "" + +#: models.py:25 +msgid "image" +msgstr "" + +#: models.py:26 +msgid "preview image file" +msgstr "" + +#: models.py:33 +msgid "width" +msgstr "" + +#: models.py:34 +msgid "height" +msgstr "" + +#: models.py:36 +msgid "auto play" +msgstr "" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "" + +#: models.py:43 +msgid "text color" +msgstr "" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "" diff --git a/cmsplugin_filer_video/locale/lt/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 00000000..7719c38c --- /dev/null +++ b/cmsplugin_filer_video/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Matas Dailyda, 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Lithuanian (http://www.transifex.com/divio/cmsplugin-filer/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Spalvos nustatymai" + +#: models.py:17 +msgid "movie file" +msgstr "vaizdo byla" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "naudoti .flv bylą arba h264 koduotą video bylą" + +#: models.py:23 +msgid "movie url" +msgstr "vaizdo nuoroda" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo arba youtube video nuoroda. Pavyzdžiui: http://www.youtube.com/watch?v=-iJ7bs4mTUY" + +#: models.py:25 +msgid "image" +msgstr "paveikslėlis" + +#: models.py:26 +msgid "preview image file" +msgstr "peržiūrėti paveikslėlį" + +#: models.py:33 +msgid "width" +msgstr "plotis" + +#: models.py:34 +msgid "height" +msgstr "aukštis" + +#: models.py:36 +msgid "auto play" +msgstr "automatinis grojimas" + +#: models.py:37 +msgid "auto hide" +msgstr "automatinis paslėpimas" + +#: models.py:38 +msgid "fullscreen" +msgstr "per visą ekraną" + +#: models.py:39 +msgid "loop" +msgstr "kartoti" + +#: models.py:42 +msgid "background color" +msgstr "fono spalva" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Šešioliktainis, pvz ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "teksto spalva" + +#: models.py:44 +msgid "seekbar color" +msgstr "laiko juostos spalva" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "laiko juostos fono spalva" + +#: models.py:46 +msgid "loadingbar color" +msgstr "krovimo juostos spalva" + +#: models.py:47 +msgid "button out color" +msgstr "mygtuko spalva atspaudus pelės klavišą" + +#: models.py:48 +msgid "button over color" +msgstr "mygtuko spalva užvilkus pelę" + +#: models.py:49 +msgid "button highlight color" +msgstr "mygtuko spalva paspaudus pelės klavišą" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Trūkstamas Flash įskiepas. Parsisiųsti čia." diff --git a/cmsplugin_filer_video/locale/lt_LT/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/lt_LT/LC_MESSAGES/django.po new file mode 100644 index 00000000..453cbef9 --- /dev/null +++ b/cmsplugin_filer_video/locale/lt_LT/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2012-07-13 16:08+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/divio/cmsplugin-filer/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "" + +#: models.py:17 +msgid "movie file" +msgstr "" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "" + +#: models.py:23 +msgid "movie url" +msgstr "" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "" + +#: models.py:25 +msgid "image" +msgstr "" + +#: models.py:26 +msgid "preview image file" +msgstr "" + +#: models.py:33 +msgid "width" +msgstr "" + +#: models.py:34 +msgid "height" +msgstr "" + +#: models.py:36 +msgid "auto play" +msgstr "" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "" + +#: models.py:43 +msgid "text color" +msgstr "" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "" diff --git a/cmsplugin_filer_video/locale/nb/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/nb/LC_MESSAGES/django.po new file mode 100644 index 00000000..d5460c47 --- /dev/null +++ b/cmsplugin_filer_video/locale/nb/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/divio/cmsplugin-filer/language/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "" + +#: models.py:17 +msgid "movie file" +msgstr "" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "" + +#: models.py:23 +msgid "movie url" +msgstr "" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "" + +#: models.py:25 +msgid "image" +msgstr "" + +#: models.py:26 +msgid "preview image file" +msgstr "" + +#: models.py:33 +msgid "width" +msgstr "" + +#: models.py:34 +msgid "height" +msgstr "" + +#: models.py:36 +msgid "auto play" +msgstr "" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "" + +#: models.py:43 +msgid "text color" +msgstr "" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "" diff --git a/cmsplugin_filer_video/locale/nl/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 00000000..12293968 --- /dev/null +++ b/cmsplugin_filer_video/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Maarten Draijer , 2013 +# Maikel Wever, 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Dutch (http://www.transifex.com/divio/cmsplugin-filer/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Video" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Kleurinstellingen" + +#: models.py:17 +msgid "movie file" +msgstr "filmbestand" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "gebruik een .flv of h264 gecodeerd videobestand" + +#: models.py:23 +msgid "movie url" +msgstr "film url" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo of youtube video url. Bijvoorbeeld: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "afbeelding" + +#: models.py:26 +msgid "preview image file" +msgstr "bekijk voorbeeld van afbeeldingsbestand" + +#: models.py:33 +msgid "width" +msgstr "breedte" + +#: models.py:34 +msgid "height" +msgstr "hoogte" + +#: models.py:36 +msgid "auto play" +msgstr "automatisch afspelen" + +#: models.py:37 +msgid "auto hide" +msgstr "automatisch verbergen" + +#: models.py:38 +msgid "fullscreen" +msgstr "volledig scherm" + +#: models.py:39 +msgid "loop" +msgstr "lus" + +#: models.py:42 +msgid "background color" +msgstr "achtergrondkleur" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadecimaal, bijv. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "tekstkleur" + +#: models.py:44 +msgid "seekbar color" +msgstr "zoekbalk kleur" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "zoekbalk achtergrondkleur" + +#: models.py:46 +msgid "loadingbar color" +msgstr "laadbalk kleur" + +#: models.py:47 +msgid "button out color" +msgstr "uitgaande button kleur" + +#: models.py:48 +msgid "button over color" +msgstr "button over kleur" + +#: models.py:49 +msgid "button highlight color" +msgstr "button markeer kleur" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Flash plugin ontbreekt. Download hier." diff --git a/cmsplugin_filer_video/locale/nn/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/nn/LC_MESSAGES/django.po new file mode 100644 index 00000000..201099fb --- /dev/null +++ b/cmsplugin_filer_video/locale/nn/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Norwegian Nynorsk (http://www.transifex.com/divio/cmsplugin-filer/language/nn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "" + +#: models.py:17 +msgid "movie file" +msgstr "" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "" + +#: models.py:23 +msgid "movie url" +msgstr "" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "" + +#: models.py:25 +msgid "image" +msgstr "" + +#: models.py:26 +msgid "preview image file" +msgstr "" + +#: models.py:33 +msgid "width" +msgstr "" + +#: models.py:34 +msgid "height" +msgstr "" + +#: models.py:36 +msgid "auto play" +msgstr "" + +#: models.py:37 +msgid "auto hide" +msgstr "" + +#: models.py:38 +msgid "fullscreen" +msgstr "" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "" + +#: models.py:43 +msgid "text color" +msgstr "" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "" diff --git a/cmsplugin_filer_video/locale/pl_PL/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/pl_PL/LC_MESSAGES/django.po new file mode 100644 index 00000000..8dada183 --- /dev/null +++ b/cmsplugin_filer_video/locale/pl_PL/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Mateusz Marzantowicz , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Polish (Poland) (http://www.transifex.com/divio/cmsplugin-filer/language/pl_PL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl_PL\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Wideo" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Ustawienia Kolorów" + +#: models.py:17 +msgid "movie file" +msgstr "plik filmu" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "użyj pliku flv lub h264" + +#: models.py:23 +msgid "movie url" +msgstr "url filmu" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "Adres url w serwisie Vimeo lub Youtube. Np.: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "obraz" + +#: models.py:26 +msgid "preview image file" +msgstr "podgląd obrazu" + +#: models.py:33 +msgid "width" +msgstr "szerokość" + +#: models.py:34 +msgid "height" +msgstr "wysokość" + +#: models.py:36 +msgid "auto play" +msgstr "automatyczne odtwarzanie" + +#: models.py:37 +msgid "auto hide" +msgstr "automatyczne ukrywanie" + +#: models.py:38 +msgid "fullscreen" +msgstr "pełny ekran" + +#: models.py:39 +msgid "loop" +msgstr "" + +#: models.py:42 +msgid "background color" +msgstr "kolor tła" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Szesnastkowo, np. ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "kolor tekstu" + +#: models.py:44 +msgid "seekbar color" +msgstr "" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "" + +#: models.py:46 +msgid "loadingbar color" +msgstr "" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Brak wtyczki flash. Pobierz ją tutaj." diff --git a/cmsplugin_filer_video/locale/pt_BR/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 00000000..2eb68835 --- /dev/null +++ b/cmsplugin_filer_video/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Rodrigo , 2013 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/divio/cmsplugin-filer/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Vídeo" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Ajustes de cor" + +#: models.py:17 +msgid "movie file" +msgstr "arquivo de vídeo" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "utilizar arquivos de vídeo encodados como .flv ou h264" + +#: models.py:23 +msgid "movie url" +msgstr "url do vídeo" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "url de vídeo do vimeo ou do youtube. Exemplo: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "imagem" + +#: models.py:26 +msgid "preview image file" +msgstr "arquivo de preview de imagem" + +#: models.py:33 +msgid "width" +msgstr "largura" + +#: models.py:34 +msgid "height" +msgstr "altura" + +#: models.py:36 +msgid "auto play" +msgstr "auto play" + +#: models.py:37 +msgid "auto hide" +msgstr "auto hide" + +#: models.py:38 +msgid "fullscreen" +msgstr "tela cheia" + +#: models.py:39 +msgid "loop" +msgstr "loop" + +#: models.py:42 +msgid "background color" +msgstr "cor de fundo" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Hexadecimal, ex.: ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "cor do texto" + +#: models.py:44 +msgid "seekbar color" +msgstr "Cor da barra de progresso" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "Cor de fundo da barra de progresso" + +#: models.py:46 +msgid "loadingbar color" +msgstr "Cor da barra de carregamento" + +#: models.py:47 +msgid "button out color" +msgstr "Cor externa do botão" + +#: models.py:48 +msgid "button over color" +msgstr "Cor de over do botão" + +#: models.py:49 +msgid "button highlight color" +msgstr "Cor de seleção do botão" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Plugin do Flash não encontrado. Baixe aqui." diff --git a/cmsplugin_filer_video/locale/ru/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..0737efd3 --- /dev/null +++ b/cmsplugin_filer_video/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Pavel , 2012 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Russian (http://www.transifex.com/divio/cmsplugin-filer/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "Видео" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "Настройки цветов" + +#: models.py:17 +msgid "movie file" +msgstr "видеофайл" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "используйте файл с расширением .flv или видео, кодированное h264" + +#: models.py:23 +msgid "movie url" +msgstr "ссылка на видео" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "ссылка на видео на youtube или vimeo" + +#: models.py:25 +msgid "image" +msgstr "изображение" + +#: models.py:26 +msgid "preview image file" +msgstr "изображение для превью" + +#: models.py:33 +msgid "width" +msgstr "ширина" + +#: models.py:34 +msgid "height" +msgstr "высота" + +#: models.py:36 +msgid "auto play" +msgstr "автозапуск" + +#: models.py:37 +msgid "auto hide" +msgstr "автоскрытие" + +#: models.py:38 +msgid "fullscreen" +msgstr "полный экран" + +#: models.py:39 +msgid "loop" +msgstr "цикл" + +#: models.py:42 +msgid "background color" +msgstr "цвет фона" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "Шестнадцатиричное число, например ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "цвет текста" + +#: models.py:44 +msgid "seekbar color" +msgstr "цвет ползунка" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "цвет фона ползунка" + +#: models.py:46 +msgid "loadingbar color" +msgstr "цвет блока загрузки" + +#: models.py:47 +msgid "button out color" +msgstr "цвет кнопки без наведения" + +#: models.py:48 +msgid "button over color" +msgstr "цвет кнопки при наведении" + +#: models.py:49 +msgid "button highlight color" +msgstr "цвет подсвеченной кнопки" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "Недоступен флеш-плагин. Скачайте здесь." diff --git a/cmsplugin_filer_video/locale/zh_CN/LC_MESSAGES/django.po b/cmsplugin_filer_video/locale/zh_CN/LC_MESSAGES/django.po new file mode 100644 index 00000000..8b896624 --- /dev/null +++ b/cmsplugin_filer_video/locale/zh_CN/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Calvin-He , 2015 +msgid "" +msgstr "" +"Project-Id-Version: django Filer Plugins\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-23 10:26-0400\n" +"PO-Revision-Date: 2016-04-26 12:16+0000\n" +"Last-Translator: Stefan Foulis \n" +"Language-Team: Chinese (China) (http://www.transifex.com/divio/cmsplugin-filer/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: cms_plugins.py:15 +msgid "Video" +msgstr "视频" + +#: cms_plugins.py:49 +msgid "Color Settings" +msgstr "颜色设置" + +#: models.py:17 +msgid "movie file" +msgstr "影视文件" + +#: models.py:18 +msgid "use .flv file or h264 encoded video file" +msgstr "使用.flv或h264编码的视频文件" + +#: models.py:23 +msgid "movie url" +msgstr "影视url" + +#: models.py:23 +msgid "" +"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-" +"kpo" +msgstr "vimeo或youtube上的视频url, 比如: http://www.youtube.com/watch?v=YFa59lK-kpo" + +#: models.py:25 +msgid "image" +msgstr "图片" + +#: models.py:26 +msgid "preview image file" +msgstr "预览图片文件" + +#: models.py:33 +msgid "width" +msgstr "宽" + +#: models.py:34 +msgid "height" +msgstr "高" + +#: models.py:36 +msgid "auto play" +msgstr "自动播放" + +#: models.py:37 +msgid "auto hide" +msgstr "自动隐藏" + +#: models.py:38 +msgid "fullscreen" +msgstr "全屏" + +#: models.py:39 +msgid "loop" +msgstr "循环播放" + +#: models.py:42 +msgid "background color" +msgstr "背景颜色" + +#: models.py:42 models.py:43 models.py:44 models.py:45 models.py:46 +#: models.py:47 models.py:48 models.py:49 +msgid "Hexadecimal, eg ff00cc" +msgstr "十六进制颜色值,如ff00cc" + +#: models.py:43 +msgid "text color" +msgstr "文本颜色" + +#: models.py:44 +msgid "seekbar color" +msgstr "拖动条颜色" + +#: models.py:45 +msgid "seekbar bg color" +msgstr "拖动条背景颜色" + +#: models.py:46 +msgid "loadingbar color" +msgstr "加载条颜色" + +#: models.py:47 +msgid "button out color" +msgstr "" + +#: models.py:48 +msgid "button over color" +msgstr "" + +#: models.py:49 +msgid "button highlight color" +msgstr "按钮高亮颜色" + +#: templates/cmsplugin_filer_video/video.html:3 +msgid "" +"Missing flash plugin. Download here." +msgstr "缺失flash插件。请 下载." diff --git a/cmsplugin_filer_video/migrations/0001_initial.py b/cmsplugin_filer_video/migrations/0001_initial.py new file mode 100644 index 00000000..7c57c55e --- /dev/null +++ b/cmsplugin_filer_video/migrations/0001_initial.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import filer.fields.image +import filer.fields.file +from cmsplugin_filer_video import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0003_auto_20140926_2347'), + ('filer', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='FilerVideo', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE)), + ('movie_url', models.CharField(help_text='vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-kpo', max_length=255, null=True, verbose_name='movie url', blank=True)), + ('width', models.PositiveSmallIntegerField(verbose_name='width', default=settings.VIDEO_WIDTH)), + ('height', models.PositiveSmallIntegerField(verbose_name='height', default=settings.VIDEO_HEIGHT)), + ('auto_play', models.BooleanField(verbose_name='auto play', default=settings.VIDEO_AUTOPLAY)), + ('auto_hide', models.BooleanField(verbose_name='auto hide', default=settings.VIDEO_AUTOHIDE)), + ('fullscreen', models.BooleanField(verbose_name='fullscreen', default=settings.VIDEO_FULLSCREEN)), + ('loop', models.BooleanField(verbose_name='loop', default=settings.VIDEO_LOOP)), + ('bgcolor', models.CharField(default=settings.VIDEO_BG_COLOR, max_length=6, verbose_name='background color', help_text='Hexadecimal, eg ff00cc')), + ('textcolor', models.CharField(default=settings.VIDEO_TEXT_COLOR, max_length=6, verbose_name='text color', help_text='Hexadecimal, eg ff00cc')), + ('seekbarcolor', models.CharField(default=settings.VIDEO_SEEKBAR_COLOR, max_length=6, verbose_name='seekbar color', help_text='Hexadecimal, eg ff00cc')), + ('seekbarbgcolor', models.CharField(default=settings.VIDEO_SEEKBARBG_COLOR, max_length=6, verbose_name='seekbar bg color', help_text='Hexadecimal, eg ff00cc')), + ('loadingbarcolor', models.CharField(default=settings.VIDEO_LOADINGBAR_COLOR, max_length=6, verbose_name='loadingbar color', help_text='Hexadecimal, eg ff00cc')), + ('buttonoutcolor', models.CharField(default=settings.VIDEO_BUTTON_OUT_COLOR, max_length=6, verbose_name='button out color', help_text='Hexadecimal, eg ff00cc')), + ('buttonovercolor', models.CharField(default=settings.VIDEO_BUTTON_OVER_COLOR, max_length=6, verbose_name='button over color', help_text='Hexadecimal, eg ff00cc')), + ('buttonhighlightcolor', models.CharField(default=settings.VIDEO_BUTTON_HIGHLIGHT_COLOR, max_length=6, verbose_name='button highlight color', help_text='Hexadecimal, eg ff00cc')), + ('image', filer.fields.image.FilerImageField(null=True, to='filer.Image', help_text='preview image file', related_name='filer_video_image', blank=True, verbose_name='image', on_delete=models.CASCADE)), + ('movie', filer.fields.file.FilerFileField(null=True, to='filer.File', help_text='use .flv file or h264 encoded video file', blank=True, verbose_name='movie file', on_delete=models.CASCADE)), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/cmsplugin_filer_video/migrations/0002_auto_20160108_1710.py b/cmsplugin_filer_video/migrations/0002_auto_20160108_1710.py new file mode 100644 index 00000000..9f14c068 --- /dev/null +++ b/cmsplugin_filer_video/migrations/0002_auto_20160108_1710.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import filer.fields.image +import django.db.models.deletion +import filer.fields.file + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_video', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='filervideo', + name='image', + field=filer.fields.image.FilerImageField(related_name='filer_video_image', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='filer.Image', help_text='preview image file', null=True, verbose_name='image'), + ), + migrations.AlterField( + model_name='filervideo', + name='movie', + field=filer.fields.file.FilerFileField(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='filer.File', help_text='use .flv file or h264 encoded video file', null=True, verbose_name='movie file'), + ), + ] diff --git a/cmsplugin_filer_video/migrations/0003_auto_20160713_1853.py b/cmsplugin_filer_video/migrations/0003_auto_20160713_1853.py new file mode 100644 index 00000000..fdccfc4e --- /dev/null +++ b/cmsplugin_filer_video/migrations/0003_auto_20160713_1853.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cmsplugin_filer_video', '0002_auto_20160108_1710'), + ] + + operations = [ + migrations.AlterField( + model_name='filervideo', + name='cmsplugin_ptr', + field=models.OneToOneField(parent_link=True, related_name='cmsplugin_filer_video_filervideo', primary_key=True, serialize=False, to='cms.CMSPlugin', on_delete=models.CASCADE), + ), + ] diff --git a/cmsplugin_filer_video/migrations/__init__.py b/cmsplugin_filer_video/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_video/models.py b/cmsplugin_filer_video/models.py new file mode 100644 index 00000000..009c84f9 --- /dev/null +++ b/cmsplugin_filer_video/models.py @@ -0,0 +1,72 @@ +from __future__ import unicode_literals + +from cms.models import CMSPlugin +from cmsplugin_filer_video import settings +from django.db import models +from django.utils.translation import ugettext_lazy as _ +from filer.fields.file import FilerFileField +from filer.fields.image import FilerImageField +from os.path import basename + + +class FilerVideo(CMSPlugin): + # player settings + movie = FilerFileField( + verbose_name=_('movie file'), + help_text=_('use .flv file or h264 encoded video file'), + blank=True, + null=True, + on_delete=models.SET_NULL, + ) + movie_url = models.CharField(_('movie url'), max_length=255, help_text=_('vimeo or youtube video url. Example: http://www.youtube.com/watch?v=YFa59lK-kpo'), blank=True, null=True) + image = FilerImageField( + verbose_name=_('image'), + help_text=_('preview image file'), + null=True, + blank=True, + related_name='filer_video_image', + on_delete=models.SET_NULL, + ) + + width = models.PositiveSmallIntegerField(_('width'), default=settings.VIDEO_WIDTH) + height = models.PositiveSmallIntegerField(_('height'), default=settings.VIDEO_HEIGHT) + + auto_play = models.BooleanField(_('auto play'), default=settings.VIDEO_AUTOPLAY) + auto_hide = models.BooleanField(_('auto hide'), default=settings.VIDEO_AUTOHIDE) + fullscreen = models.BooleanField(_('fullscreen'), default=settings.VIDEO_FULLSCREEN) + loop = models.BooleanField(_('loop'), default=settings.VIDEO_LOOP) + + # plugin settings + bgcolor = models.CharField(_('background color'), max_length=6, default=settings.VIDEO_BG_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + textcolor = models.CharField(_('text color'), max_length=6, default=settings.VIDEO_TEXT_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + seekbarcolor = models.CharField(_('seekbar color'), max_length=6, default=settings.VIDEO_SEEKBAR_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + seekbarbgcolor = models.CharField(_('seekbar bg color'), max_length=6, default=settings.VIDEO_SEEKBARBG_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + loadingbarcolor = models.CharField(_('loadingbar color'), max_length=6, default=settings.VIDEO_LOADINGBAR_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + buttonoutcolor = models.CharField(_('button out color'), max_length=6, default=settings.VIDEO_BUTTON_OUT_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + buttonovercolor = models.CharField(_('button over color'), max_length=6, default=settings.VIDEO_BUTTON_OVER_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + buttonhighlightcolor = models.CharField(_('button highlight color'), max_length=6, default=settings.VIDEO_BUTTON_HIGHLIGHT_COLOR, help_text=_('Hexadecimal, eg ff00cc')) + cmsplugin_ptr = models.OneToOneField( + to=CMSPlugin, + related_name='%(app_label)s_%(class)s', + parent_link=True, + on_delete=models.CASCADE + ) + + def __str__(self): + if self.movie: + name = self.movie.path + else: + name = self.movie_url + return "%s" % basename(name) + + def get_height(self): + return "%s" % (self.height) + + def get_width(self): + return "%s" % (self.width) + + def get_movie(self): + if self.movie: + return self.movie.url + else: + return self.movie_url diff --git a/cmsplugin_filer_video/settings.py b/cmsplugin_filer_video/settings.py new file mode 100644 index 00000000..4d61eeec --- /dev/null +++ b/cmsplugin_filer_video/settings.py @@ -0,0 +1,20 @@ +from django.conf import settings + +VIDEO_WIDTH = getattr(settings, "VIDEO_WIDTH", 320) +VIDEO_HEIGHT = getattr(settings, "VIDEO_HEIGHT", 240) + +VIDEO_AUTOPLAY = getattr(settings, "VIDEO_AUTOPLAY", False) +VIDEO_AUTOHIDE = getattr(settings, "VIDEO_AUTOHIDE", False) +VIDEO_FULLSCREEN = getattr(settings, "VIDEO_FULLSCREEN", True) +VIDEO_LOOP = getattr(settings, "VIDEO_LOOP", False) + +VIDEO_BG_COLOR = getattr(settings, "VIDEO_BG_COLOR", "000000") +VIDEO_TEXT_COLOR = getattr(settings, "VIDEO_TEXT_COLOR", "FFFFFF") +VIDEO_SEEKBAR_COLOR = getattr(settings, "VIDEO_SEEKBAR_COLOR", "13ABEC") +VIDEO_SEEKBARBG_COLOR = getattr(settings, "VIDEO_SEEKBARBG_COLOR", "333333") +VIDEO_LOADINGBAR_COLOR = getattr(settings, "VIDEO_LOADINGBAR_COLOR", "828282") +VIDEO_BUTTON_OUT_COLOR = getattr(settings, "VIDEO_BUTTON_OUT_COLOR", "333333") +VIDEO_BUTTON_OVER_COLOR = getattr(settings, "VIDEO_BUTTON_OVER_COLOR", "000000") +VIDEO_BUTTON_HIGHLIGHT_COLOR = getattr(settings, "VIDEO_BUTTON_HIGHLIGHT_COLOR", "FFFFFF") + +VIDEO_PLUGIN_ENABLE_ADVANCED_SETTINGS = getattr(settings, "VIDEO_PLUGIN_ENABLE_ADVANCED_SETTINGS", True) diff --git a/cmsplugin_filer_video/templates/cmsplugin_filer_video/video.html b/cmsplugin_filer_video/templates/cmsplugin_filer_video/video.html new file mode 100644 index 00000000..92c957b9 --- /dev/null +++ b/cmsplugin_filer_video/templates/cmsplugin_filer_video/video.html @@ -0,0 +1,46 @@ +{% load i18n sekizai_tags cmsplugin_filer_js_tmp %} + +
{% trans 'Missing flash plugin. Download here.' %}
+ +{% addtoblock "js" %} + +{% endaddtoblock %} + +{% addtoblock "js" %} + +{% endaddtoblock %} diff --git a/cmsplugin_filer_video/templatetags/__init__.py b/cmsplugin_filer_video/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cmsplugin_filer_video/templatetags/cmsplugin_filer_js_tmp.py b/cmsplugin_filer_video/templatetags/cmsplugin_filer_js_tmp.py new file mode 100644 index 00000000..19b5b982 --- /dev/null +++ b/cmsplugin_filer_video/templatetags/cmsplugin_filer_js_tmp.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +from django.template import Library +# TODO: Remove this templatetag entirely when the minimum supported Django-CMS version will be moved to 2.3 and updated the template to use cms_js_tags templatetag + + +register = Library() + + +@register.filter +def bool(value): + if value: + return 'true' + else: + return 'false' diff --git a/stored_messages/LICENSE b/stored_messages/LICENSE new file mode 100644 index 00000000..1cea11e2 --- /dev/null +++ b/stored_messages/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2013, evonove +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of django-stored-messages nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stored_messages/__init__.py b/stored_messages/__init__.py new file mode 100644 index 00000000..9080d090 --- /dev/null +++ b/stored_messages/__init__.py @@ -0,0 +1,11 @@ +# flake8: noqa +from __future__ import absolute_import + +from django.contrib.messages.api import * +from stored_messages.api import * +from stored_messages.constants import * + + +__version__ = '1.4.0' + +VERSION = __version__ # synonym diff --git a/stored_messages/admin.py b/stored_messages/admin.py new file mode 100644 index 00000000..8447ee02 --- /dev/null +++ b/stored_messages/admin.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from .models import Inbox, Message, MessageArchive + + +admin.site.register(Inbox) +admin.site.register(Message) +admin.site.register(MessageArchive) diff --git a/stored_messages/api.py b/stored_messages/api.py new file mode 100644 index 00000000..697be93e --- /dev/null +++ b/stored_messages/api.py @@ -0,0 +1,69 @@ +from .settings import stored_messages_settings + + +__all__ = ( + 'add_message_for', + 'broadcast_message', + 'mark_read', + 'mark_all_read', +) + + +def add_message_for(users, level, message_text, extra_tags='', date=None, url=None, fail_silently=False): + """ + Send a message to a list of users without passing through `django.contrib.messages` + + :param users: an iterable containing the recipients of the messages + :param level: message level + :param message_text: the string containing the message + :param extra_tags: like the Django api, a string containing extra tags for the message + :param date: a date, different than the default timezone.now + :param url: an optional url + :param fail_silently: not used at the moment + """ + BackendClass = stored_messages_settings.STORAGE_BACKEND + backend = BackendClass() + m = backend.create_message(level, message_text, extra_tags, date, url) + backend.archive_store(users, m) + backend.inbox_store(users, m) + + +def broadcast_message(level, message_text, extra_tags='', date=None, url=None, fail_silently=False): + """ + Send a message to all users aka broadcast. + + :param level: message level + :param message_text: the string containing the message + :param extra_tags: like the Django api, a string containing extra tags for the message + :param date: a date, different than the default timezone.now + :param url: an optional url + :param fail_silently: not used at the moment + """ + from django.contrib.auth import get_user_model + users = get_user_model().objects.all() + add_message_for(users, level, message_text, extra_tags=extra_tags, date=date, url=url, fail_silently=fail_silently) + + +def mark_read(user, message): + """ + Mark message instance as read for user. + Returns True if the message was `unread` and thus actually marked as `read` or False in case + it is already `read` or it does not exist at all. + + :param user: user instance for the recipient + :param message: a Message instance to mark as read + """ + BackendClass = stored_messages_settings.STORAGE_BACKEND + backend = BackendClass() + backend.inbox_delete(user, message) + + +def mark_all_read(user): + """ + Mark all message instances for a user as read. + + :param user: user instance for the recipient + """ + BackendClass = stored_messages_settings.STORAGE_BACKEND + backend = BackendClass() + backend.inbox_purge(user) diff --git a/stored_messages/backends/__init__.py b/stored_messages/backends/__init__.py new file mode 100644 index 00000000..78ce3276 --- /dev/null +++ b/stored_messages/backends/__init__.py @@ -0,0 +1,3 @@ +# flake8: noqa +from .default.backend import DefaultBackend +from .redis.backend import RedisBackend diff --git a/stored_messages/backends/base.py b/stored_messages/backends/base.py new file mode 100644 index 00000000..df8a026b --- /dev/null +++ b/stored_messages/backends/base.py @@ -0,0 +1,159 @@ + +class StoredMessagesBackend(object): + """ + + """ + def create_message(self, level, msg_text, extra_tags, date=None): + """ + Create and return a `Message` instance. + Instance types depend on backends implementation. + + Params: + `level`: message level (see django.contrib.messages) + `msg_text`: what you think it is + `extra_tags`: see django.contrib.messages + `date`: a DateTime (optional) + + Return: + `Message` instance + """ + raise NotImplementedError() + + def inbox_list(self, user): + """ + Retrieve all the messages in `user`'s Inbox. + + Params: + `user`: Django User instance + + Return: + An iterable containing `Message` instances + """ + raise NotImplementedError() + + def inbox_purge(self, user): + """ + Delete all the messages in `user`'s Inbox. + + Params: + user: Django User instance + + Return: + None + """ + raise NotImplementedError() + + def inbox_store(self, users, msg_instance): + """ + Store a `Message` instance in the inbox for a list + of users. + + Params: + users: a list or iterable containing Django User instances + msg_instance: Message instance to persist in inbox + + Return: + None + + Raise: + MessageTypeNotSupported if `msg_instance` cannot be managed by current backend + """ + raise NotImplementedError() + + def inbox_delete(self, user, msg_id): + """ + Remove a `Message` instance from `user`'s inbox. + + Params: + user: Django User instance + msg_id: Message identifier + + Return: + None + + Raise: + MessageDoesNotExist if msg_id was not found + """ + raise NotImplementedError() + + def inbox_get(self, user, msg_id): + """ + Retrieve a `Message` instance from `user`'s inbox. + + Params: + user: Django User instance + msg_id: Message identifier + + Return: + A `Message` instance + + Raise: + MessageDoesNotExist if msg_id was not found + """ + + def archive_store(self, users, msg_instance): + """ + Store a `Message` instance in the archive for a list + of users. + + Params: + users: a list or iterable containing Django User instances + msg_instance: Message instance to persist in archive + + Return: + None + + Raise: + MessageTypeNotSupported if `msg_instance` cannot be managed by current backend + """ + raise NotImplementedError() + + def archive_list(self, user): + """ + Retrieve all the messages in `user`'s archive. + + Params: + user: Django User instance + + Return: + An iterable containing `Message` instances + """ + raise NotImplementedError() + + def can_handle(self, msg_instance): + """ + Determine if this backend can handle messages + of the same type of `msg_instance`. + + Params: + `msg_instance`: `Message` instance + + Return: + True if type is correct, False otherwise + """ + raise NotImplementedError() + + def expired_messages_cleanup(self): + """ + Remove messages that have been expired. + + Params: + None + + Return: + None + """ + raise NotImplementedError() + + def _flush(self): + """ + Clear all backend data. + Warning: heavily destructive! Here for convenience, not used by the API anyway. + + Params: + None + + Return: + None + """ + raise NotImplementedError() diff --git a/stored_messages/backends/default/__init__.py b/stored_messages/backends/default/__init__.py new file mode 100644 index 00000000..e4a0cd42 --- /dev/null +++ b/stored_messages/backends/default/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .backend import DefaultBackend diff --git a/stored_messages/backends/default/backend.py b/stored_messages/backends/default/backend.py new file mode 100644 index 00000000..822b502a --- /dev/null +++ b/stored_messages/backends/default/backend.py @@ -0,0 +1,81 @@ +from django.utils import timezone + +from ..base import StoredMessagesBackend +from ..exceptions import MessageTypeNotSupported, MessageDoesNotExist +from .. import signals +from ...models import Inbox, Message, MessageArchive +from ...settings import stored_messages_settings + + +class DefaultBackend(StoredMessagesBackend): + """ + + """ + def inbox_list(self, user): + if user.is_anonymous(): + return [] + inbox = Inbox.objects.filter(user=user).select_related("message") + return [m.message for m in inbox] + + def inbox_purge(self, user): + if user.is_authenticated(): + Inbox.objects.filter(user=user).delete() + signals.inbox_purged.send(sender=self.__class__, user=user) + + def inbox_store(self, users, msg_instance): + if not self.can_handle(msg_instance): + raise MessageTypeNotSupported() + + for user in users: + Inbox.objects.get_or_create(user=user, message=msg_instance) + signals.inbox_stored.send(sender=self.__class__, user=user, message=msg_instance) + + def inbox_delete(self, user, msg_id): + try: + inbox_m = Inbox.objects.filter(user=user, message=msg_id).get() + inbox_m.delete() + signals.inbox_deleted.send(sender=self.__class__, user=user, message_id=msg_id) + except Inbox.DoesNotExist: + raise MessageDoesNotExist("Message with id %s does not exist" % msg_id) + + def inbox_get(self, user, msg_id): + try: + return Inbox.objects.get(pk=msg_id).message + except Inbox.DoesNotExist: + raise MessageDoesNotExist("Message with id %s does not exist" % msg_id) + + def create_message(self, level, msg_text, extra_tags='', date=None, url=None): + kwargs = { + 'message': msg_text, + 'level': level, + 'tags': extra_tags, + 'url': url, + } + if date: + kwargs['date'] = date + m_instance = Message.objects.create(**kwargs) + return m_instance + + def archive_store(self, users, msg_instance): + if not self.can_handle(msg_instance): + raise MessageTypeNotSupported() + + for user in users: + MessageArchive.objects.create(user=user, message=msg_instance) + signals.archive_stored.send(sender=self.__class__, user=user, message=msg_instance) + + def archive_list(self, user): + return list(MessageArchive.objects.filter(user=user)) + + def can_handle(self, message): + return isinstance(message, Message) + + def expired_messages_cleanup(self): + expiration_date = timezone.now() + timezone.timedelta( + days=-stored_messages_settings.MESSAGE_EXPIRE_DAYS) + Message.objects.filter(date__lte=expiration_date).delete() + + def _flush(self): + Inbox.objects.all().delete() + MessageArchive.objects.all().delete() + Message.objects.all().delete() diff --git a/stored_messages/backends/exceptions.py b/stored_messages/backends/exceptions.py new file mode 100644 index 00000000..12046f4d --- /dev/null +++ b/stored_messages/backends/exceptions.py @@ -0,0 +1,8 @@ + + +class MessageTypeNotSupported(Exception): + pass + + +class MessageDoesNotExist(Exception): + pass diff --git a/stored_messages/backends/redis/__init__.py b/stored_messages/backends/redis/__init__.py new file mode 100644 index 00000000..cdfb2bbf --- /dev/null +++ b/stored_messages/backends/redis/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .backend import RedisBackend, Message diff --git a/stored_messages/backends/redis/backend.py b/stored_messages/backends/redis/backend.py new file mode 100644 index 00000000..61c5fcf5 --- /dev/null +++ b/stored_messages/backends/redis/backend.py @@ -0,0 +1,143 @@ +from __future__ import unicode_literals + +from django.utils import timezone +from django.utils.encoding import force_text +from django.core.serializers.json import DjangoJSONEncoder + +import json +from collections import namedtuple +import hashlib + +from ..exceptions import MessageTypeNotSupported, MessageDoesNotExist +from ..base import StoredMessagesBackend +from .. import signals +from ...settings import stored_messages_settings + +try: + # Let django project bootstrap anyway when not using this backend + import redis +except ImportError: + pass + + +Message = namedtuple('Message', ['id', 'message', 'level', 'tags', 'date', 'url']) + + +class RedisBackend(StoredMessagesBackend): + """ + + """ + def __init__(self): + self.client = redis.StrictRedis.from_url(stored_messages_settings.REDIS_URL) + + def _flush(self): + self.client.flushdb() + + def _toJSON(self, msg_instance): + """ + Dump a Message instance into a JSON string + """ + return json.dumps(msg_instance._asdict(), cls=DjangoJSONEncoder) + + def _fromJSON(self, json_msg): + """ + Return a Message instance built from data contained in a JSON string + """ + return Message(**json.loads(force_text(json_msg))) + + def _list_key(self, key): + """ + boilerplate + """ + ret = [] + for msg_json in self.client.lrange(key, 0, -1): + ret.append(self._fromJSON(msg_json)) + return ret + + def _list(self, key_tpl, user): + return self._list_key(key_tpl % user.pk) + + def create_message(self, level, msg_text, extra_tags='', date=None, url=None): + """ + Message instances are namedtuples of type `Message`. + The date field is already serialized in datetime.isoformat ECMA-262 format + """ + if not date: + now = timezone.now() + else: + now = date + r = now.isoformat() + if now.microsecond: + r = r[:23] + r[26:] + if r.endswith('+00:00'): + r = r[:-6] + 'Z' + + fingerprint = r + msg_text + + msg_id = hashlib.sha256(fingerprint.encode('ascii', 'ignore')).hexdigest() + return Message(id=msg_id, message=msg_text, level=level, tags=extra_tags, date=r, url=url) + + def inbox_list(self, user): + if user.is_anonymous(): + return [] + return self._list('user:%d:notifications', user) + + def inbox_purge(self, user): + if user.is_authenticated(): + self.client.delete('user:%d:notifications' % user.pk) + self.client.delete('user:%d:notificationsidx' % user.pk) + signals.inbox_purged.send(sender=self.__class__, user=user) + + def inbox_store(self, users, msg_instance): + if not self.can_handle(msg_instance): + raise MessageTypeNotSupported() + + for user in users: + if self.client.sismember('user:%d:notificationsidx' % user.pk, msg_instance.id): + return # a duplicate, NOOP + else: + self.client.sadd('user:%d:notificationsidx' % user.pk, msg_instance.id) + + self.client.rpush('user:%d:notifications' % user.pk, self._toJSON(msg_instance)) + signals.inbox_stored.send(sender=self.__class__, user=user, message=msg_instance) + + def inbox_delete(self, user, msg_id): + for m in self._list('user:%d:notifications', user): + if m.id == msg_id: + msg = self.client.lrem('user:%d:notifications' % user.pk, 0, json.dumps(m._asdict())) + signals.inbox_deleted.send(sender=self.__class__, user=user, message_id=msg_id) + return msg + raise MessageDoesNotExist("Message with id %s does not exist" % msg_id) + + def inbox_get(self, user, msg_id): + for m in self._list('user:%d:notifications', user): + if m.id == msg_id: + return m + raise MessageDoesNotExist("Message with id %s does not exist" % msg_id) + + def archive_store(self, users, msg_instance): + if not self.can_handle(msg_instance): + raise MessageTypeNotSupported() + + for user in users: + self.client.rpush('user:%d:archive' % user.pk, self._toJSON(msg_instance)) + signals.archive_stored.send(sender=self.__class__, user=user, message=msg_instance) + + def archive_list(self, user): + return self._list('user:%d:archive', user) + + def can_handle(self, msg_instance): + return isinstance(msg_instance, Message) + + def expired_messages_cleanup(self): + expiration_date = timezone.now() + timezone.timedelta( + days=-stored_messages_settings.MESSAGE_EXPIRE_DAYS) + keys = self.client.keys('user:*:notifications') + for k in keys: + _, user, _ = k.split(':') + for m in self._list_key(k): + if m.date <= expiration_date: + msg = json.dumps(m._asdict()) + self.client.lrem(k, 0, msg) + self.client.srem('user:%s:notificationsidx' % user, m.id) + self.client.rpop('user:%d:archive' % user, msg) diff --git a/stored_messages/backends/signals.py b/stored_messages/backends/signals.py new file mode 100644 index 00000000..8d394260 --- /dev/null +++ b/stored_messages/backends/signals.py @@ -0,0 +1,7 @@ +from django.dispatch import Signal + +inbox_stored = Signal(providing_args=["user", "message"]) +inbox_deleted = Signal(providing_args=["user", "message_id"]) +inbox_purged = Signal(providing_args=["user"]) + +archive_stored = Signal(providing_args=["user", "message"]) diff --git a/stored_messages/compat.py b/stored_messages/compat.py new file mode 100644 index 00000000..7bc3d2f1 --- /dev/null +++ b/stored_messages/compat.py @@ -0,0 +1,6 @@ +""" +The `compat` module provides support for backwards compatibility with older +versions of Django and Python. Please, add in this module the compatibility code. +""" + +from __future__ import unicode_literals diff --git a/stored_messages/constants.py b/stored_messages/constants.py new file mode 100644 index 00000000..9499c2eb --- /dev/null +++ b/stored_messages/constants.py @@ -0,0 +1,16 @@ +from django.contrib.messages.constants import * + + +STORED_DEBUG = DEBUG + 1 +STORED_INFO = INFO + 1 +STORED_SUCCESS = SUCCESS + 1 +STORED_WARNING = WARNING + 1 +STORED_ERROR = ERROR + 1 + +DEFAULT_TAGS.update({ + STORED_DEBUG: 'persisted debug', + STORED_INFO: 'persisted info', + STORED_SUCCESS: 'persisted success', + STORED_WARNING: 'persisted warning', + STORED_ERROR: 'persisted error', +}) diff --git a/stored_messages/migrations/0001_initial.py b/stored_messages/migrations/0001_initial.py new file mode 100644 index 00000000..78fb57ee --- /dev/null +++ b/stored_messages/migrations/0001_initial.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +import django.utils.timezone + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Inbox', + fields=[ + ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), + ], + options={ + 'verbose_name_plural': 'inboxes', + }, + ), + migrations.CreateModel( + name='Message', + fields=[ + ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), + ('message', models.TextField()), + ('level', models.IntegerField()), + ('tags', models.TextField()), + ('date', models.DateTimeField(default=django.utils.timezone.now)), + ], + ), + migrations.CreateModel( + name='MessageArchive', + fields=[ + ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), + ('message', models.ForeignKey(to='stored_messages.Message', on_delete=models.CASCADE)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), + ], + ), + migrations.AddField( + model_name='inbox', + name='message', + field=models.ForeignKey(to='stored_messages.Message', on_delete=models.CASCADE), + ), + migrations.AddField( + model_name='inbox', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE), + ), + ] diff --git a/stored_messages/migrations/0002_message_url.py b/stored_messages/migrations/0002_message_url.py new file mode 100644 index 00000000..807368c8 --- /dev/null +++ b/stored_messages/migrations/0002_message_url.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('stored_messages', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='message', + name='url', + field=models.URLField(blank=True, null=True), + ), + ] diff --git a/stored_messages/migrations/__init__.py b/stored_messages/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/stored_messages/models.py b/stored_messages/models.py new file mode 100644 index 00000000..352715d1 --- /dev/null +++ b/stored_messages/models.py @@ -0,0 +1,58 @@ +from __future__ import unicode_literals + +from django.db import models +from django.conf import settings +from django.utils import timezone +from django.utils.translation import ugettext_lazy as _ + +from .settings import stored_messages_settings + + +class Message(models.Model): + """ + This model represents a message on the database. Fields are the same as in + `contrib.messages` + """ + message = models.TextField() + level = models.IntegerField() + tags = models.TextField() + url = models.URLField(null=True, blank=True) + date = models.DateTimeField(default=timezone.now) + + def __str__(self): + return self.message + + +class MessageArchive(models.Model): + """ + This model holds all the messages users received. Corresponding + database table will grow indefinitely depending on messages traffic. + """ + user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) + message = models.ForeignKey(Message, on_delete=models.CASCADE) + + def __str__(self): + return "[%s] %s" % (self.user, self.message) + + +class Inbox(models.Model): + """ + Inbox messages are stored in this model until users read them. Once read, + inbox messages are deleted. Inbox messages have an expire time, after + that they could be removed by a proper django command. We do not expect + database table corresponding to this model to grow much. + """ + user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) + message = models.ForeignKey(Message, on_delete=models.CASCADE) + + class Meta: + verbose_name_plural = _('inboxes') + + def expired(self): + expiration_date = self.message.date + timezone.timedelta( + days=stored_messages_settings.INBOX_EXPIRE_DAYS) + return expiration_date <= timezone.now() + expired.boolean = True # show a nifty icon in the admin + + def __str__(self): + return "[%s] %s" % (self.user, self.message) diff --git a/stored_messages/serializers.py b/stored_messages/serializers.py new file mode 100644 index 00000000..702a9f94 --- /dev/null +++ b/stored_messages/serializers.py @@ -0,0 +1,10 @@ +from rest_framework import serializers + + +class InboxSerializer(serializers.Serializer): + id = serializers.CharField() + message = serializers.CharField() + level = serializers.IntegerField() + tags = serializers.CharField() + date = serializers.DateTimeField(format=None) + url = serializers.URLField(required=False) diff --git a/stored_messages/settings.py b/stored_messages/settings.py new file mode 100644 index 00000000..cea53809 --- /dev/null +++ b/stored_messages/settings.py @@ -0,0 +1,130 @@ +""" +This module is largely inspired by django-rest-framework settings. + +Settings for the Stored Messages framework are all namespaced in the +STORED_MESSAGES setting. +For example your project's `settings.py` file might look like this:: + + STORED_MESSAGES = { + 'INBOX_EXPIRE_DAYS': 30, + } + +This module provides the `stored_messages_settings` object, that is used to +access Stored Messages framework settings, checking for user settings first, +then falling back to the defaults. +""" +from __future__ import unicode_literals + +import importlib + +from django.conf import settings + + +from .constants import * + + +USER_SETTINGS = getattr(settings, 'STORED_MESSAGES', None) +MESSAGE_TAGS = getattr(settings, 'MESSAGE_TAGS', {}) + +DEFAULTS = { + 'STORE_LEVELS': ( + STORED_DEBUG, + STORED_INFO, + STORED_SUCCESS, + STORED_WARNING, + STORED_ERROR, + ), + 'MESSAGE_TAGS': MESSAGE_TAGS.update({ + STORED_DEBUG: 'stored debug', + STORED_INFO: 'stored info', + STORED_SUCCESS: 'stored success', + STORED_WARNING: 'stored warning', + STORED_ERROR: 'stored error', + }), + 'INBOX_EXPIRE_DAYS': 30, + 'MESSAGE_EXPIRE_DAYS': 120, + 'STORAGE_BACKEND': 'stored_messages.backends.DefaultBackend', + # Only for Redis backend + 'REDIS_URL': 'redis://username:password@localhost:6379/0', +} + +# List of settings that cannot be empty +MANDATORY = ( + +) + +# List of settings that may be in string import notation. +IMPORT_STRINGS = ( + 'STORAGE_BACKEND', +) + + +def perform_import(val, setting_name): + """ + If the given setting is a string import notation, + then perform the necessary import or imports. + """ + if isinstance(val, str): + return import_from_string(val, setting_name) + elif isinstance(val, (list, tuple)): + return [import_from_string(item, setting_name) for item in val] + return val + + +def import_from_string(val, setting_name): + """ + Attempt to import a class from a string representation. + """ + try: + parts = val.split('.') + module_path, class_name = '.'.join(parts[:-1]), parts[-1] + module = importlib.import_module(module_path) + return getattr(module, class_name) + except ImportError as e: + msg = "Could not import '%s' for setting '%s'. %s: %s." % (val, setting_name, + e.__class__.__name__, e) + raise ImportError(msg) + + +class StoredMessagesSettings(object): + """ + A settings object, that allows settings to be accessed as properties. + + Any setting with string import paths will be automatically resolved + and return the class, rather than the string literal. + """ + + def __init__(self, user_settings=None, defaults=None, import_strings=None, mandatory=None): + self.user_settings = user_settings or {} + self.defaults = defaults or {} + self.import_strings = import_strings or () + self.mandatory = mandatory or () + + def __getattr__(self, attr): + if attr not in self.defaults.keys(): + raise AttributeError("Invalid Stored Messages setting: '%s'" % attr) + + try: + # Check if present in user settings + val = self.user_settings[attr] + except KeyError: + # Fall back to defaults + val = self.defaults[attr] + + # Coerce import strings into classes + if val and attr in self.import_strings: + val = perform_import(val, attr) + + self.validate_setting(attr, val) + + # Cache the result + setattr(self, attr, val) + return val + + def validate_setting(self, attr, val): + if not val and attr in self.mandatory: + raise AttributeError("Stored Messages setting: '%s' is mandatory" % attr) + + +stored_messages_settings = StoredMessagesSettings(USER_SETTINGS, DEFAULTS, IMPORT_STRINGS, + MANDATORY) diff --git a/stored_messages/static/js/stored_messages.js b/stored_messages/static/js/stored_messages.js new file mode 100644 index 00000000..e69de29b diff --git a/stored_messages/storage.py b/stored_messages/storage.py new file mode 100644 index 00000000..c23bc3b9 --- /dev/null +++ b/stored_messages/storage.py @@ -0,0 +1,103 @@ +from django.contrib.messages.storage.fallback import FallbackStorage + +from .settings import stored_messages_settings +from .backends.exceptions import MessageTypeNotSupported + + +class StorageMixin(object): + """ + This mixin implements a message storage compliant with + `django.contrib.messages` which stores messages on the database when + needed, delegating to the sibling class otherwise. Messages are stored + only when the user is authenticated and the message level is configured + for being persisted. The mixin can be derived together with another class + implementing a storage, tipically one of the three provided by Django out + of the box. + """ + def __init__(self, request, *args, **kwargs): + self.user = request.user + BackendClass = stored_messages_settings.STORAGE_BACKEND + self.backend = BackendClass() + super(StorageMixin, self).__init__(request, *args, **kwargs) + + def _get(self, *args, **kwargs): + """ + Retrieve unread messages for current user, both from the inbox and + from other storages + """ + messages, all_retrieved = super(StorageMixin, self)._get(*args, **kwargs) + if self.user.is_authenticated(): + inbox_messages = self.backend.inbox_list(self.user) + else: + inbox_messages = [] + + return messages + inbox_messages, all_retrieved + + def add(self, level, message, extra_tags=''): + """ + If the message level was configured for being stored and request.user + is not anonymous, save it to the database. Otherwise, let some other + class handle the message. + + Notice: controls like checking the message is not empty and the level + is above the filter need to be performed here, but it could happen + they'll be performed again later if the message does not need to be + stored. + """ + if not message: + return + # Check that the message level is not less than the recording level. + level = int(level) + if level < self.level: + return + # Check if the message doesn't have a level that needs to be persisted + if level not in stored_messages_settings.STORE_LEVELS or self.user.is_anonymous(): + return super(StorageMixin, self).add(level, message, extra_tags) + + self.added_new = True + m = self.backend.create_message(level, message, extra_tags) + self.backend.archive_store([self.user], m) + self._queued_messages.append(m) + + def _store(self, messages, response, *args, **kwargs): + """ + persistent messages are already in the database inside the 'archive', + so we can say they're already "stored". + Here we put them in the inbox, or remove from the inbox in case the + messages were iterated. + + messages contains only new msgs if self.used==True + else contains both new and unread messages + """ + contrib_messages = [] + if self.user.is_authenticated(): + if not messages: + # erase inbox + self.backend.inbox_purge(self.user) + else: + for m in messages: + try: + self.backend.inbox_store([self.user], m) + except MessageTypeNotSupported: + contrib_messages.append(m) + + super(StorageMixin, self)._store(contrib_messages, response, *args, **kwargs) + + def _prepare_messages(self, messages): + """ + Like the base class method, prepares a list of messages for storage + but avoid to do this for `models.Message` instances. + """ + for message in messages: + if not self.backend.can_handle(message): + message._prepare() + + +class PersistentStorage(StorageMixin, FallbackStorage): + """ + This class is provided for convenience: it implements `StorageMixin` which + persists messages having a type configured to be persisted and passes + other messages to `FallbackStorage`, one of the defaults provided by + Django which stores messages inside cookies or sessions. + """ + pass diff --git a/stored_messages/templates/stored_messages/base.html b/stored_messages/templates/stored_messages/base.html new file mode 100644 index 00000000..09d26f38 --- /dev/null +++ b/stored_messages/templates/stored_messages/base.html @@ -0,0 +1,21 @@ + +{% comment %} +As the developer of this package, don't place anything here if you can help it +since this allows developers to have interoperability between your template +structure and their own. + +Example: Developer melding the 2SoD pattern to fit inside with another pattern:: + + {% extends "base.html" %} + {% load static %} + + + {% block extra_js %} + + + {% block javascript %} + + {% endblock javascript %} + + {% endblock extra_js %} +{% endcomment %} diff --git a/stored_messages/templates/stored_messages/stored_messages_list.html b/stored_messages/templates/stored_messages/stored_messages_list.html new file mode 100644 index 00000000..ec695c8f --- /dev/null +++ b/stored_messages/templates/stored_messages/stored_messages_list.html @@ -0,0 +1,7 @@ +{% if messages %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+{% endif %} \ No newline at end of file diff --git a/stored_messages/templatetags/__init__.py b/stored_messages/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/stored_messages/templatetags/stored_messages_tags.py b/stored_messages/templatetags/stored_messages_tags.py new file mode 100644 index 00000000..49271694 --- /dev/null +++ b/stored_messages/templatetags/stored_messages_tags.py @@ -0,0 +1,49 @@ +from __future__ import unicode_literals + +from django import template + +from ..models import Inbox, MessageArchive + + +register = template.Library() + + +@register.inclusion_tag("stored_messages/stored_messages_list.html", takes_context=True) +def stored_messages_list(context, num_elements=10): + """ + Renders a list of unread stored messages for the current user + """ + if "user" in context: + user = context["user"] + if user.is_authenticated(): + qs = Inbox.objects.select_related("message").filter(user=user) + return { + "messages": qs[:num_elements], + "count": qs.count(), + } + + +@register.simple_tag(takes_context=True) +def stored_messages_count(context): + """ + Renders a list of unread stored messages for the current user + """ + if "user" in context: + user = context["user"] + if user.is_authenticated(): + return Inbox.objects.select_related("message").filter(user=user).count() + + +@register.inclusion_tag("stored_messages/stored_messages_list.html", takes_context=True) +def stored_messages_archive(context, num_elements=10): + """ + Renders a list of archived messages for the current user + """ + if "user" in context: + user = context["user"] + if user.is_authenticated(): + qs = MessageArchive.objects.select_related("message").filter(user=user) + return { + "messages": qs[:num_elements], + "count": qs.count(), + } diff --git a/stored_messages/urls.py b/stored_messages/urls.py new file mode 100644 index 00000000..7b40d2eb --- /dev/null +++ b/stored_messages/urls.py @@ -0,0 +1,17 @@ +""" +At the moment this module does something only when restframework is available +""" +from django.conf import settings + +if 'rest_framework' in settings.INSTALLED_APPS: + from rest_framework.routers import DefaultRouter + from django.conf.urls import url, include + from . import views + + router = DefaultRouter() + router.register(r'inbox', views.InboxViewSet, base_name='inbox') + + urlpatterns = [ + url(r'^', include(router.urls)), + url(r'^mark_all_read/$', views.mark_all_read, name='mark_all_read'), + ] diff --git a/stored_messages/views.py b/stored_messages/views.py new file mode 100644 index 00000000..c9979327 --- /dev/null +++ b/stored_messages/views.py @@ -0,0 +1,60 @@ +from rest_framework import viewsets +from rest_framework.decorators import api_view, detail_route +from rest_framework.response import Response + +from django.contrib.auth.decorators import login_required + +from .serializers import InboxSerializer +from .backends.exceptions import MessageDoesNotExist + + +class InboxViewSet(viewsets.ViewSet): + """ + Provides `list` and `detail` actions, plus a `read` POST endpoint for + marking inbox messages as read. + """ + def list(self, request): + from .settings import stored_messages_settings + backend = stored_messages_settings.STORAGE_BACKEND() + messages = backend.inbox_list(request.user) + serializer = InboxSerializer(messages, many=True) + return Response(serializer.data) + + def retrieve(self, request, pk=None): + from .settings import stored_messages_settings + backend = stored_messages_settings.STORAGE_BACKEND() + + try: + msg = backend.inbox_get(request.user, pk) + except MessageDoesNotExist as e: + return Response(e.message, status='404') + + serializer = InboxSerializer(msg, many=False) + return Response(serializer.data) + + @detail_route(methods=['POST']) + def read(self, request, pk=None): + """ + Mark the message as read (i.e. delete from inbox) + """ + from .settings import stored_messages_settings + backend = stored_messages_settings.STORAGE_BACKEND() + + try: + backend.inbox_delete(request.user, pk) + except MessageDoesNotExist as e: + return Response(e.message, status='404') + + return Response({'status': 'message marked as read'}) + + +@login_required +@api_view(['POST']) +def mark_all_read(request): + """ + Mark all messages as read (i.e. delete from inbox) for current logged in user + """ + from .settings import stored_messages_settings + backend = stored_messages_settings.STORAGE_BACKEND() + backend.inbox_purge(request.user) + return Response({"message": "All messages read"})