From 8774a508f41ba1eab582f3862487a5b8b28b0f21 Mon Sep 17 00:00:00 2001 From: Patrick Lauber Date: Wed, 28 Nov 2012 13:24:39 +0100 Subject: [PATCH] locales, forms, plugins changed --- djangocms_text_ckeditor/cms_plugins.py | 17 ++++-- djangocms_text_ckeditor/forms.py | 9 ++- .../locale/de/LC_MESSAGES/django.po | 15 +++-- .../locale/gu/LC_MESSAGES/django.po | 58 ++++++++++++++++++ .../locale/hi/LC_MESSAGES/django.po | 58 ++++++++++++++++++ .../locale/nl/LC_MESSAGES/django.po | 59 +++++++++++++++++++ .../locale/pt_BR/LC_MESSAGES/django.po | 58 ++++++++++++++++++ .../locale/tr/LC_MESSAGES/django.po | 58 ++++++++++++++++++ schemamigration.py | 3 +- 9 files changed, 321 insertions(+), 14 deletions(-) create mode 100644 djangocms_text_ckeditor/locale/gu/LC_MESSAGES/django.po create mode 100644 djangocms_text_ckeditor/locale/hi/LC_MESSAGES/django.po create mode 100644 djangocms_text_ckeditor/locale/nl/LC_MESSAGES/django.po create mode 100644 djangocms_text_ckeditor/locale/pt_BR/LC_MESSAGES/django.po create mode 100644 djangocms_text_ckeditor/locale/tr/LC_MESSAGES/django.po diff --git a/djangocms_text_ckeditor/cms_plugins.py b/djangocms_text_ckeditor/cms_plugins.py index 133bfc3..0d08d2e 100644 --- a/djangocms_text_ckeditor/cms_plugins.py +++ b/djangocms_text_ckeditor/cms_plugins.py @@ -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 }) diff --git a/djangocms_text_ckeditor/forms.py b/djangocms_text_ckeditor/forms.py index 72e5ed2..2ef6a62 100644 --- a/djangocms_text_ckeditor/forms.py +++ b/djangocms_text_ckeditor/forms.py @@ -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', + ) diff --git a/djangocms_text_ckeditor/locale/de/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/de/LC_MESSAGES/django.po index 5617a90..7e6d486 100644 --- a/djangocms_text_ckeditor/locale/de/LC_MESSAGES/django.po +++ b/djangocms_text_ckeditor/locale/de/LC_MESSAGES/django.po @@ -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 , 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 \n" -"Language-Team: DE \n" +"Language-Team: LANGUAGE \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" diff --git a/djangocms_text_ckeditor/locale/gu/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/gu/LC_MESSAGES/django.po new file mode 100644 index 0000000..fd1a965 --- /dev/null +++ b/djangocms_text_ckeditor/locale/gu/LC_MESSAGES/django.po @@ -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 \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 "" diff --git a/djangocms_text_ckeditor/locale/hi/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/hi/LC_MESSAGES/django.po new file mode 100644 index 0000000..f00d5ca --- /dev/null +++ b/djangocms_text_ckeditor/locale/hi/LC_MESSAGES/django.po @@ -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 \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 "संपादित करें प्लगइन का चयन" diff --git a/djangocms_text_ckeditor/locale/nl/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 0000000..5e8766f --- /dev/null +++ b/djangocms_text_ckeditor/locale/nl/LC_MESSAGES/django.po @@ -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 , 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 \n" +"Language-Team: LANGUAGE \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" diff --git a/djangocms_text_ckeditor/locale/pt_BR/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 0000000..90882ae --- /dev/null +++ b/djangocms_text_ckeditor/locale/pt_BR/LC_MESSAGES/django.po @@ -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 \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" diff --git a/djangocms_text_ckeditor/locale/tr/LC_MESSAGES/django.po b/djangocms_text_ckeditor/locale/tr/LC_MESSAGES/django.po new file mode 100644 index 0000000..230fd9b --- /dev/null +++ b/djangocms_text_ckeditor/locale/tr/LC_MESSAGES/django.po @@ -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 \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" diff --git a/schemamigration.py b/schemamigration.py index 5e918e7..35987c0 100644 --- a/schemamigration.py +++ b/schemamigration.py @@ -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