Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Enabling multiple Disqus services, Sync langs related to the new feature #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions aldryn_disqus/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin

from .models import DisqusService

admin.site.register(DisqusService)
10 changes: 6 additions & 4 deletions aldryn_disqus/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@


class DisqusPlugin(CMSPluginBase):

model = models.DisqusPlugin
name = _('Disqus Plugin')
render_template = 'aldryn_disqus/disqus.html'
admin_preview = False
name = _('Disqus Plugin')
model = models.DisqusPlugin
page_only = True
allow_children = True

def render(self, context, instance, placeholder):
context['DISQUS_SHORTNAME'] = settings.DISQUS_SHORTNAME
context['DISQUS_SHORTNAME'] = instance.disqus.shortname if instance and instance.disqus and \
instance.disqus.shortname else None
context['instance'] = instance
context['developer_mode'] = settings.DEBUG
return context


plugin_pool.register_plugin(DisqusPlugin)
Binary file modified aldryn_disqus/locale/de/LC_MESSAGES/django.mo
100644 → 100755
Binary file not shown.
42 changes: 31 additions & 11 deletions aldryn_disqus/locale/de/LC_MESSAGES/django.po
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,44 @@ msgid ""
msgstr ""
"Project-Id-Version: cmsplugin-disqus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-14 15:36+0100\n"
"PO-Revision-Date: 2011-11-14 13:45+0000\n"
"POT-Creation-Date: 2018-02-02 20:01+0330\n"
"PO-Revision-Date: 2018-02-02 20:05+0330\n"
"Last-Translator: ojii <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"

#: cms_plugins.py:12
#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "Disqus Plugin"

#: models.py:10
msgid "Title"
msgstr "Titel"
#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr "Kurzer Name"

#: models.py:11
msgid "Title for your comments, if empty, the page title will be used"
msgstr "Titel der Kommentare. Falls leer wird der Seiten Titel benutzt."
#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr "Disqus Service"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""
"Bitte aktivieren Sie JavaScript, um die <a href=“http://disqus.com/?"
"ref_noscript”> Kommentare von Disqus anzuzeigen. </a>"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr ""
"Blogkommentare powered by <span class = “logo-disqus”> Disqus </ span>"

#~ msgid "Title"
#~ msgstr "Titel"

#~ msgid "Title for your comments, if empty, the page title will be used"
#~ msgstr "Titel der Kommentare. Falls leer wird der Seiten Titel benutzt."
Empty file modified aldryn_disqus/locale/en/LC_MESSAGES/django.mo
100644 → 100755
Empty file.
32 changes: 24 additions & 8 deletions aldryn_disqus/locale/en/LC_MESSAGES/django.po
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-14 15:36+0100\n"
"POT-Creation-Date: 2018-02-02 20:01+0330\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -17,14 +17,30 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: cms_plugins.py:12
#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "Disqus Plugin"

#: models.py:10
msgid "Title"
msgstr "Title"
#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr ""

#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr ""

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr ""

#~ msgid "Title"
#~ msgstr "Title"

#: models.py:11
msgid "Title for your comments, if empty, the page title will be used"
msgstr "Title for your comments, if empty, the page title will be used"
#~ msgid "Title for your comments, if empty, the page title will be used"
#~ msgstr "Title for your comments, if empty, the page title will be used"
Binary file added aldryn_disqus/locale/fa/LC_MESSAGES/django.mo
Binary file not shown.
44 changes: 44 additions & 0 deletions aldryn_disqus/locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-02 20:02+0330\n"
"PO-Revision-Date: 2018-02-02 19:40+0330\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.0.6\n"

#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "پلاگین دیسکاس"

#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr "نام کوتاه در Disqus"

#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr "سرویس دیسکاس"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""
"لطفا جاوا اسکریپت را فعال کنید تا <a href=“http://disqus.com/؟ref_noscript”> "
"دیدگاه‌های قدرت گرفته از دیسکاس را مشاهده کنید. </a>"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr ""
"نظرات وبلاگ قدرت گرفته شده توسط <span class = “logo-disqus”> دیسکاس </ span>"
Binary file modified aldryn_disqus/locale/fr/LC_MESSAGES/django.mo
100644 → 100755
Binary file not shown.
43 changes: 32 additions & 11 deletions aldryn_disqus/locale/fr/LC_MESSAGES/django.po
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,45 @@ msgid ""
msgstr ""
"Project-Id-Version: cmsplugin-disqus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-14 15:36+0100\n"
"PO-Revision-Date: 2011-11-14 13:45+0000\n"
"POT-Creation-Date: 2018-02-02 20:02+0330\n"
"PO-Revision-Date: 2018-02-02 20:07+0330\n"
"Last-Translator: ojii <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"

#: cms_plugins.py:12
#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "Disqus Plugin"

#: models.py:10
msgid "Title"
msgstr "Titre"
#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr "Nom court"

#: models.py:11
msgid "Title for your comments, if empty, the page title will be used"
msgstr "Titre des commentaires, si vide, le titre de page sera utilisé"
#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr "Disqus Service"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""
"Veuillez activer JavaScript pour afficher les <a href=“http://disqus."
"com/?ref_noscript”> commentaires générés par Disqus. </a>"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr ""
"commentaires du blog alimentés par <span class = “logo-disqus”> Disqus "
"</ span>"

#~ msgid "Title"
#~ msgstr "Titre"

#~ msgid "Title for your comments, if empty, the page title will be used"
#~ msgstr "Titre des commentaires, si vide, le titre de page sera utilisé"
Binary file modified aldryn_disqus/locale/it/LC_MESSAGES/django.mo
100644 → 100755
Binary file not shown.
42 changes: 31 additions & 11 deletions aldryn_disqus/locale/it/LC_MESSAGES/django.po
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,45 @@ msgid ""
msgstr ""
"Project-Id-Version: cmsplugin-disqus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-14 15:36+0100\n"
"PO-Revision-Date: 2011-11-14 14:18+0000\n"
"POT-Creation-Date: 2018-02-02 20:02+0330\n"
"PO-Revision-Date: 2018-02-02 20:08+0330\n"
"Last-Translator: evildmp <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"

#: cms_plugins.py:12
#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "Plugin Disqus"

#: models.py:10
msgid "Title"
msgstr "Titolo"
#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr "Nome corto"

#: models.py:11
msgid "Title for your comments, if empty, the page title will be used"
#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr "Servizio di Disqus"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""
"Abilitare JavaScript per visualizzare i <a href=“http://disqus.com/?"
"ref_noscript”> commenti pubblicati da Disqus. </a>"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr ""
"Titolo per i vostri commenti; se vuoto, sarà usato il titolo della pagina"
"commenti del blog basati su <span class = “logo-disqus”> Disqus </ span>"

#~ msgid "Title"
#~ msgstr "Titolo"

#~ msgid "Title for your comments, if empty, the page title will be used"
#~ msgstr ""
#~ "Titolo per i vostri commenti; se vuoto, sarà usato il titolo della pagina"
Binary file modified aldryn_disqus/locale/ja/LC_MESSAGES/django.mo
100644 → 100755
Binary file not shown.
43 changes: 31 additions & 12 deletions aldryn_disqus/locale/ja/LC_MESSAGES/django.po
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,43 @@ msgid ""
msgstr ""
"Project-Id-Version: cmsplugin-disqus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-14 15:36+0100\n"
"PO-Revision-Date: 2011-11-14 13:45+0000\n"
"POT-Creation-Date: 2018-02-02 20:02+0330\n"
"PO-Revision-Date: 2018-02-02 20:09+0330\n"
"Last-Translator: ojii <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"

#: cms_plugins.py:12
#: apps/aldryn_disqus/aldryn_disqus/cms_plugins.py:12
msgid "Disqus Plugin"
msgstr "Disqusのプラグイン"
msgstr "Disqus プラグイン"

#: models.py:10
msgid "Title"
msgstr "タイトル"
#: apps/aldryn_disqus/aldryn_disqus/models.py:9
msgid "Shortname"
msgstr "ショートネーム"

#: models.py:11
msgid "Title for your comments, if empty, the page title will be used"
msgstr "コメントのタイトル。空の場合、ページのタイトルが使用されます。"
#: apps/aldryn_disqus/aldryn_disqus/models.py:21
msgid "Disqus Service"
msgstr ""

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:4
msgid ""
"Please enable JavaScript to view the <a href=\"http://disqus.com/?"
"ref_noscript\">comments powered by Disqus.</a>"
msgstr ""
"<a href=“http://disqus.com/?ref_noscript”> Disqusが提供するコメントを表"
"示するには、JavaScriptを有効にしてください。</a>"

#: apps/aldryn_disqus/aldryn_disqus/templates/aldryn_disqus/disqus.html:5
msgid "blog comments powered by <span class=\"logo-disqus\">Disqus</span>"
msgstr "<span class = “logo-disqus”> Disqus </ span>のブログコメント"

#~ msgid "Title"
#~ msgstr "タイトル"

#~ msgid "Title for your comments, if empty, the page title will be used"
#~ msgstr "コメントのタイトル。空の場合、ページのタイトルが使用されます。"
32 changes: 32 additions & 0 deletions aldryn_disqus/migrations/0002_auto_20180202_1919.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('aldryn_disqus', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='DisqusService',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
('shortname', models.CharField(verbose_name='Shortname', max_length=100, blank=True, unique=True)),
],
),
migrations.AlterField(
model_name='disqusplugin',
name='cmsplugin_ptr',
field=models.OneToOneField(primary_key=True, to='cms.CMSPlugin', related_name='aldryn_disqus_disqusplugin', serialize=False, auto_created=True, parent_link=True),
),
migrations.AddField(
model_name='disqusplugin',
name='disqus',
field=models.ForeignKey(to='aldryn_disqus.DisqusService', on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='Disqus Service', null=True),
),
]
Loading