locales, forms, plugins changed
This commit is contained in:
parent
533785f731
commit
8774a508f4
|
@ -30,18 +30,27 @@ class TextPlugin(CMSPluginBase):
|
|||
class TextPluginForm(self.form):
|
||||
pass
|
||||
widget = self.get_editor_widget(request, plugins)
|
||||
TextPluginForm.declared_fields["body"] = CharField(widget=widget, required=False)
|
||||
TextPluginForm.declared_fields["body"] = CharField(
|
||||
widget=widget, required=False
|
||||
)
|
||||
return TextPluginForm
|
||||
|
||||
def get_form(self, request, obj=None, **kwargs):
|
||||
plugins = plugin_pool.get_text_enabled_plugins(self.placeholder, self.page)
|
||||
plugins = plugin_pool.get_text_enabled_plugins(
|
||||
self.placeholder,
|
||||
self.page
|
||||
)
|
||||
form = self.get_form_class(request, plugins)
|
||||
kwargs['form'] = form # override standard form
|
||||
kwargs['form'] = form # override standard form
|
||||
return super(TextPlugin, self).get_form(request, obj, **kwargs)
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context.update({
|
||||
'body': plugin_tags_to_user_html(instance.body, context, placeholder),
|
||||
'body': plugin_tags_to_user_html(
|
||||
instance.body,
|
||||
context,
|
||||
placeholder
|
||||
),
|
||||
'placeholder': placeholder,
|
||||
'object': instance
|
||||
})
|
||||
|
|
|
@ -3,9 +3,16 @@ from django import forms
|
|||
from django.forms.models import ModelForm
|
||||
from djangocms_text_ckeditor.models import TextCKEditor
|
||||
|
||||
|
||||
class TextForm(ModelForm):
|
||||
body = forms.CharField()
|
||||
|
||||
class Meta:
|
||||
model = TextCKEditor
|
||||
exclude = ('page', 'position', 'placeholder', 'language', 'plugin_type')
|
||||
exclude = (
|
||||
'page',
|
||||
'position',
|
||||
'placeholder',
|
||||
'language',
|
||||
'plugin_type',
|
||||
)
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
# 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 <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: djangocms text ckeditor\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Project-Id-Version: django-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 16:40+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 16:02+0000\n"
|
||||
"Last-Translator: Patrick Lauber <patrick.lauber@divio.ch>\n"
|
||||
"Language-Team: DE <info@divio.ch>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"Language: German\n"
|
||||
|
||||
#: cms_plugins.py:13
|
||||
msgid "Text"
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# 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-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 15:37+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Gujarati (http://www.transifex.com/projects/p/django-cms/language/gu/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: gu\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: cms_plugins.py:13
|
||||
msgid "Text"
|
||||
msgstr ""
|
||||
|
||||
#: models.py:12
|
||||
msgid "body"
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:28
|
||||
msgid "Please select a plugin type."
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:34
|
||||
msgid "Text editor does not support inserting objects."
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:46
|
||||
msgid "Text editor does not support editing objects."
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:51
|
||||
msgid "No object selected."
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:55
|
||||
msgid "Not a plugin object"
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:67
|
||||
msgid "Available Plugins"
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:70
|
||||
msgid "Insert plugin"
|
||||
msgstr ""
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:71
|
||||
msgid "Edit selected plugin"
|
||||
msgstr ""
|
|
@ -0,0 +1,58 @@
|
|||
# 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-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 15:37+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Hindi (http://www.transifex.com/projects/p/django-cms/language/hi/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: hi\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: cms_plugins.py:13
|
||||
msgid "Text"
|
||||
msgstr "पाठ"
|
||||
|
||||
#: models.py:12
|
||||
msgid "body"
|
||||
msgstr "शरीर"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:28
|
||||
msgid "Please select a plugin type."
|
||||
msgstr "कृपया एक प्लगइन प्रकार का चयन करें."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:34
|
||||
msgid "Text editor does not support inserting objects."
|
||||
msgstr "पाठ संपादक वस्तुओं डालने का समर्थन नहीं करता."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:46
|
||||
msgid "Text editor does not support editing objects."
|
||||
msgstr "पाठ संपादक संपादन वस्तुओं का समर्थन नहीं करता."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:51
|
||||
msgid "No object selected."
|
||||
msgstr "कोई चयनित वस्तु."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:55
|
||||
msgid "Not a plugin object"
|
||||
msgstr "नहीं एक प्लगइन वस्तु"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:67
|
||||
msgid "Available Plugins"
|
||||
msgstr "उपलब्ध प्लगइन्स"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:70
|
||||
msgid "Insert plugin"
|
||||
msgstr "डालें प्लगइन"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:71
|
||||
msgid "Edit selected plugin"
|
||||
msgstr "संपादित करें प्लगइन का चयन"
|
|
@ -0,0 +1,59 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Bouke Haarsma <bouke@webatoom.nl>, 2012.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 16:02+0000\n"
|
||||
"Last-Translator: Bouke Haarsma <bouke@webatoom.nl>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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:13
|
||||
msgid "Text"
|
||||
msgstr "Tekst"
|
||||
|
||||
#: models.py:12
|
||||
msgid "body"
|
||||
msgstr "inhoud"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:28
|
||||
msgid "Please select a plugin type."
|
||||
msgstr "Selecteer een plug-in."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:34
|
||||
msgid "Text editor does not support inserting objects."
|
||||
msgstr "Tekstbewerker kan geen objecten invoegen."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:46
|
||||
msgid "Text editor does not support editing objects."
|
||||
msgstr "Tekstbewerker kan geen objecten bewerken."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:51
|
||||
msgid "No object selected."
|
||||
msgstr "Geen object geselecteerd."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:55
|
||||
msgid "Not a plugin object"
|
||||
msgstr "Geen plug-inobject"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:67
|
||||
msgid "Available Plugins"
|
||||
msgstr "Beschikbare Plug-ins"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:70
|
||||
msgid "Insert plugin"
|
||||
msgstr "Voeg plug-in toe"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:71
|
||||
msgid "Edit selected plugin"
|
||||
msgstr "Bewerk geselecteerde plug-in"
|
|
@ -0,0 +1,58 @@
|
|||
# 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-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 15:37+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/django-cms/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:13
|
||||
msgid "Text"
|
||||
msgstr "Texto"
|
||||
|
||||
#: models.py:12
|
||||
msgid "body"
|
||||
msgstr "corpo"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:28
|
||||
msgid "Please select a plugin type."
|
||||
msgstr "Por favor, selecione um tipo de plugin"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:34
|
||||
msgid "Text editor does not support inserting objects."
|
||||
msgstr "Editor de texto não suporta inserção de objetos."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:46
|
||||
msgid "Text editor does not support editing objects."
|
||||
msgstr "Editor de texto não suporta edição de objetos."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:51
|
||||
msgid "No object selected."
|
||||
msgstr "Nenhum objeto selecionado"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:55
|
||||
msgid "Not a plugin object"
|
||||
msgstr "Não é um plugin"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:67
|
||||
msgid "Available Plugins"
|
||||
msgstr "Plugins disponíveis"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:70
|
||||
msgid "Insert plugin"
|
||||
msgstr "Inserir plugin"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:71
|
||||
msgid "Edit selected plugin"
|
||||
msgstr "Editar plugin selecionado"
|
|
@ -0,0 +1,58 @@
|
|||
# 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-cms\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
|
||||
"POT-Creation-Date: 2012-11-27 16:37+0100\n"
|
||||
"PO-Revision-Date: 2012-11-27 15:37+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Turkish (http://www.transifex.com/projects/p/django-cms/language/tr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: tr\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: cms_plugins.py:13
|
||||
msgid "Text"
|
||||
msgstr "Metin"
|
||||
|
||||
#: models.py:12
|
||||
msgid "body"
|
||||
msgstr "gövde"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:28
|
||||
msgid "Please select a plugin type."
|
||||
msgstr "Lütfen bir eklenti türü seçin."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:34
|
||||
msgid "Text editor does not support inserting objects."
|
||||
msgstr "Metin editörü nesne yerleştirmesini desteklemiyor."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:46
|
||||
msgid "Text editor does not support editing objects."
|
||||
msgstr "Metin editörü nesnelerin düzenlenmesini desteklemiyor."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:51
|
||||
msgid "No object selected."
|
||||
msgstr "Hiç nesne seçilmedi."
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:55
|
||||
msgid "Not a plugin object"
|
||||
msgstr "Bir eklenti nesnesi değil"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:67
|
||||
msgid "Available Plugins"
|
||||
msgstr "Mevcut Eklentiler"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:70
|
||||
msgid "Insert plugin"
|
||||
msgstr "Eklenti Ekle"
|
||||
|
||||
#: templates/cms/plugins/widgets/ckeditor.html:71
|
||||
msgid "Edit selected plugin"
|
||||
msgstr "Seçilmiş eklentiyi düzenle"
|
|
@ -34,9 +34,10 @@ TEMPLATE_CONTEXT_PROCESSORS = [
|
|||
|
||||
ROOT_URLCONF = 'cms.urls'
|
||||
|
||||
|
||||
def schemamigration():
|
||||
# turn ``schemamigration.py --initial`` into
|
||||
# ``manage.py schemamigration cmsplugin_disqus --initial`` and setup the
|
||||
# ``manage.py schemamigration cmsplugin_disqus --initial`` and setup the
|
||||
# enviroment
|
||||
from django.conf import settings
|
||||
|
||||
|
|
Reference in New Issue