From 669decb149508e86fb43edef5274e9284dca66e7 Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Thu, 10 Sep 2020 00:19:15 +0300 Subject: [PATCH 1/4] Update models.py python_2_unicode_compatible feature has only been added in Django 1.5 version. changed to six module --- django_messages/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_messages/models.py b/django_messages/models.py index eee3096..6cf18cf 100644 --- a/django_messages/models.py +++ b/django_messages/models.py @@ -6,7 +6,7 @@ from django.db import models from django.db.models import signals from django.utils import timezone -from django.utils.encoding import python_2_unicode_compatible +from six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') From 2b411e56e00faf85a9c690426dcf86aa389eca79 Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Thu, 10 Sep 2020 00:20:11 +0300 Subject: [PATCH 2/4] Update README.rst url include has changed for django 3+ versions --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 353cf3c..e78663f 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,7 @@ Usage ----- Add ``django_messages`` to your ``INSTALLED_APPS`` setting and add an -``include('django_messages.urls')`` at any point in your url-conf. +``path('', include('django_messages.urls'))`` at any point in your url-conf. The app includes some default templates, which are pretty simple. They extend a template called ``base.html`` and only emit stuff in the block From ee2553daaeb1b70e54b31d254a7f39c2910f5358 Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Thu, 10 Sep 2020 00:58:41 +0300 Subject: [PATCH 3/4] Adding 'tr' locale contributed by Bilal Tonga --- .../locale/tr/LC_MESSAGES/django.mo | Bin 0 -> 6171 bytes .../locale/tr/LC_MESSAGES/django.po | 393 ++++++++++++++++++ 2 files changed, 393 insertions(+) create mode 100644 django_messages/locale/tr/LC_MESSAGES/django.mo create mode 100644 django_messages/locale/tr/LC_MESSAGES/django.po diff --git a/django_messages/locale/tr/LC_MESSAGES/django.mo b/django_messages/locale/tr/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..1533b2b5774a7873e4fc5064bdf667db71bae7a2 GIT binary patch literal 6171 zcmb`KU2Ggz6~`|SnzDS9wh%rWE-9(AO?I8Mw4|F4vTjCZfslg!R+ z=flbRp#l{_K}ZM$~PeU>BEqDj~F08|q^!cUq{VPzue-%pm+i#~&cn6H2hT_jN@a^zF zkWbaCQ0(4DWBGm?yc3Qw@ICOa z@I&wwD0c5ICGGBoRH;4ieehu@{+)o*?olY?KM!SG28w@9TK^<`H_uPOZSb2=#`QzE z7ycNEy%(YQ^B1@q{tHe*jnn7hBCNpY;1qlr9*1=rwcyvF=>B*3dAN^G#h-6LvHuK| zey>1Gs~@D#*P!V0GbnmJ3qJyX2k(O~L(z3RgZ%(J2;=yHpLq*01AXe(5N#HYGD%;C zUw}K{R>Tl{_e1ex0^SWzrqAc0__F{Xf=|G^;7a=b7wP+F;oGSHHN>>~ExZI@fM?)m zX(akxgVN6$#C7#ch>PlZ$e;QnKQvMQOt}STWZc`J#LYgq9X<+0mo60ldQisyB`EQ6 z1xj4}2uj>sPwStD((VN)dcOq4kAI}k|ApeuR)R_1Z-ZigJCt#iAycbrP`;ahqW5D^ z;>?Gm@Dh~qu0a0OPxul4o`VPAi|}*sp7*m>;4&P8--jpRpP>UEBq*oh_n@r5zd_M? z7Gu(1140aq|hONH6hU#w2>lwU_cBMRbOSzvS zv7KEqo^gukTBFD~CMYsK(Oh(Rh$7dK_?PtnAE11iQl{*pWS7kQC)0;VpvZ;UslrpM1s%*;*K8|oPL;-Asb z?r>)uBNZ`PS--(+Dm1!l-*mhsv|aGMPV7?XTfw5XLLIrjX-AIbYugQtzhpVV9^LZX zk&s3>>bZPx2YP|wL|78X9nWo7#0edQo=@ae)p6rEGTXjs+FhH_DF=H>B?&)jj4gdz zy6f9Z3?kPf_NJ(`9WItcumulmmu$DKn;u@dVNg?3?!0$dW%8!f>F~39J(u=YtYGB6 zX%%Y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"PO-Revision-Date: 2020-09-10 01:00+0300\n" +"Last-Translator: Bilal Tonga \n" +"Language-Team: Creworker \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Turkish\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: admin.py:21 +msgid "group" +msgstr "grup" + +#: admin.py:22 +msgid "Creates the message optionally for all users or a group of users." +msgstr "Mesajı kullanıcı için veya grup için oluşturur." + +#: admin.py:30 +msgid "All users" +msgstr "Tüm Kullanıcılar" + +#: admin.py:48 models.py:94 +msgid "Message" +msgstr "Mesaj" + +#: admin.py:55 +msgid "Date/time" +msgstr "Tarih/Saat" + +#: apps.py:6 models.py:95 +msgid "Messages" +msgstr "Mesajlar" + +#: fields.py:56 +#, python-format +msgid "The following usernames are incorrect: %(users)s" +msgstr "Verilen kullanıcı adları yanlış: %(users)s" + +#: forms.py:18 models.py:59 templates/django_messages/outbox.html:9 +#: templates/django_messages/view.html:13 +msgid "Recipient" +msgstr "Alıcı" + +#: forms.py:19 models.py:56 templates/django_messages/inbox.html:9 +#: templates/django_messages/outbox.html:9 +#: templates/django_messages/trash.html:9 templates/django_messages/view.html:7 +msgid "Subject" +msgstr "Konu" + +#: forms.py:20 models.py:57 +msgid "Body" +msgstr "Metin" + +#: management.py:9 +msgid "Message Received" +msgstr "Mesaj Alındı" + +#: management.py:9 +msgid "you have received a message" +msgstr "yeni bir mesajınız var" + +#: management.py:10 +msgid "Message Sent" +msgstr "Mesaj Gönderildi" + +#: management.py:10 +msgid "you have sent a message" +msgstr "mesaj gönderdiniz" + +#: management.py:11 +msgid "Message Replied" +msgstr "Mesaj Cevaplandı" + +#: management.py:11 +msgid "you have replied to a message" +msgstr "mesaja cevap verdiniz" + +#: management.py:12 +msgid "Reply Received" +msgstr "Cevap Alındı" + +#: management.py:12 +msgid "you have received a reply to a message" +msgstr "mesaja cevap aldınız" + +#: management.py:13 +msgid "Message Deleted" +msgstr "Mesaj Silindi" + +#: management.py:13 +msgid "you have deleted a message" +msgstr "bir mesaj sildiniz" + +#: management.py:14 +msgid "Message Recovered" +msgstr "Mesaj Kurtarıldı" + +#: management.py:14 +msgid "you have undeleted a message" +msgstr "mesajı silme işlemini iptal ettiniz" + +#: models.py:58 templates/django_messages/inbox.html:9 +#: templates/django_messages/trash.html:9 templates/django_messages/view.html:9 +msgid "Sender" +msgstr "Gönderici" + +#: models.py:60 +msgid "Parent message" +msgstr "Ana Mesaj" + +#: models.py:61 +msgid "sent at" +msgstr "gönderildi" + +#: models.py:62 +msgid "read at" +msgstr "okundu" + +#: models.py:63 +msgid "replied at" +msgstr "cevaplandı" + +#: models.py:64 +msgid "Sender deleted at" +msgstr "Gönderici sildi" + +#: models.py:65 +msgid "Recipient deleted at" +msgstr "Alıcı sildi" + +#: templates/django_messages/base.html:8 templates/django_messages/inbox.html:5 +#: templates/django_messages/new_message.html:12 +msgid "Inbox" +msgstr "Gelen Kutusu" + +#: templates/django_messages/base.html:9 +#: templates/django_messages/outbox.html:5 +msgid "Sent Messages" +msgstr "Gönderilenler" + +#: templates/django_messages/base.html:10 +msgid "New Message" +msgstr "Yeni Mesaj" + +#: templates/django_messages/base.html:11 +msgid "Trash" +msgstr "Çöp kutusu" + +#: templates/django_messages/compose.html:5 +msgid "Compose Message" +msgstr "Yeni Mesaj" + +#: templates/django_messages/compose.html:11 +msgid "Send" +msgstr "Gönder" + +#: templates/django_messages/inbox.html:9 +msgid "Received" +msgstr "Alındı" + +#: templates/django_messages/inbox.html:9 +#: templates/django_messages/outbox.html:9 +#: templates/django_messages/trash.html:9 +msgid "Action" +msgstr "Eylem" + +#: templates/django_messages/inbox.html:21 +#: templates/django_messages/outbox.html:18 +#: templates/django_messages/trash.html:18 +#: templates/django_messages/view.html:12 +msgid "DATETIME_FORMAT" +msgstr "TARIHZAMAN_FORMATI" + +#: templates/django_messages/inbox.html:22 +#: templates/django_messages/outbox.html:19 +msgid "delete" +msgstr "sil" + +#: templates/django_messages/inbox.html:28 +#: templates/django_messages/outbox.html:25 +#: templates/django_messages/trash.html:25 +msgid "No messages." +msgstr "Yeni mesaj yok." + +#: templates/django_messages/new_message.html:3 +#, python-format +msgid "" +"Hello %(recipient)s,\n" +"\n" +"you received a private message from %(sender)s with\n" +"the following contents:" +msgstr "" +"Merhaba %(recipient)s,\n" +"\n" +"%(sender)s'den yeni bir özel mesaj aldınız\n" +"mesaj içeriği:" + +#: templates/django_messages/new_message.html:11 +#, python-format +msgid "Sent from %(site_url)s" +msgstr "%(site_url)s'den gönderildi" + +#: templates/django_messages/new_message.html:13 +#: templates/django_messages/view.html:19 +msgid "Reply" +msgstr "Cevapla" + +#: templates/django_messages/outbox.html:9 +msgid "Sent" +msgstr "Gönderildi" + +#: templates/django_messages/trash.html:5 +msgid "Deleted Messages" +msgstr "Silinen Mesajlar" + +#: templates/django_messages/trash.html:9 +#: templates/django_messages/view.html:11 +msgid "Date" +msgstr "Tarih" + +#: templates/django_messages/trash.html:19 +msgid "undelete" +msgstr "silmeyi iptal et" + +#: templates/django_messages/trash.html:28 +msgid "" +"Deleted Messages are removed from the trash at unregular intervals, don't " +"rely on this feature for long-time storage." +msgstr "" +"Silinmiş Mesajlar çöp kutusundan rastgele zamanlarda silinir, " +"bu özelliğe uzun süreli depolama için güvenmeyin." + +#: templates/django_messages/view.html:5 +msgid "View Message" +msgstr "Mesajı Görüntüle" + +#: templates/django_messages/view.html:21 +msgid "Delete" +msgstr "Sil" + +#: templates/notification/messages_deleted/full.txt:1 +#, python-format +msgid "You have deleted the message '%(message)s'." +msgstr "'%(message)s' sildiniz." + +#: templates/notification/messages_deleted/notice.html:1 +#, python-format +msgid "" +"You have deleted the message %(message)s." +msgstr "" +"%(message)s mesajı sildiniz." + +#: templates/notification/messages_received/full.txt:1 +#, python-format +msgid "" +"%(message_sender)s has sent you a message:\n" +"\n" +"%(message)s\n" +"\n" +"%(message_body)s\n" +"\n" +"http://%(current_site)s%(message_url)s" +msgstr "" +"%(message_sender) size bir mesaj gönderdi:\n" +"\n" +"%(message)s\n" +"\n" +"%(message_body)s\n" +"\n" +"http://%(current_site)s%(message_url)s" +#: templates/notification/messages_received/notice.html:2 +#, python-format +msgid "" +"You have received the message %(message)s " +"from %(message_sender)s." +msgstr "%(message_sender)s 'den yeni bir mesaj aldınız. %(message)s " + +#: templates/notification/messages_received/short.txt:1 +#: templates/notification/messages_reply_received/short.txt:1 +#, python-format +msgid "%(notice)s by %(message_sender)s" +msgstr "%(message_sender)s 'den %(notice)s" + +#: templates/notification/messages_recovered/full.txt:1 +#, python-format +msgid "You have recovered the message '%(message)s'." +msgstr "'%(message)s' mesajını kurtardınız." + +#: templates/notification/messages_recovered/notice.html:1 +#, python-format +msgid "" +"You have recovered the message %(message)s." +msgstr "" +"%(message)s mesajını kurtardınız." +#: templates/notification/messages_replied/full.txt:1 +#, python-format +msgid "" +"You have replied to '%(message_parent_msg)s' from %(message_recipient)s." +msgstr "" +"%(message_recipient)s 'in '%(message_parent_msg)s' mesajına cevap verdiniz." +#: templates/notification/messages_replied/notice.html:2 +#, python-format +msgid "" +"You have replied to %(message_parent_msg)s " +"from %(message_recipient)s." +msgstr "" +"%(message_parent_msg)s mesaja cevap verdiniz." +"gönderici %(message_recipient)s." + +#: templates/notification/messages_reply_received/full.txt:1 +#, python-format +msgid "" +"%(message_sender)s replied to '%(message_parent_msg)s':\n" +"\n" +"%(message)s\n" +"\n" +"%(message_body)s\n" +"\n" +"http://%(current_site)s%(message_url)s" +msgstr "" +"%(message_sender)s mesajı cevapladı '%(message_parent_msg)s':\n" +"\n" +"%(message)s\n" +"\n" +"%(message_body)s\n" +"\n" +"http://%(current_site)s%(message_url)s" +#: templates/notification/messages_reply_received/notice.html:2 +#, python-format +msgid "%(message_sender)s has sent you a reply to %(message_parent_msg)s." +msgstr "%(message_sender)s kullanıcısı %(message_parent_msg)s mesajına cevap verdi." + +#: templates/notification/messages_sent/full.txt:1 +#, python-format +msgid "You have sent the message '%(message)s' to %(message_recipient)s." +msgstr "%(message_recipient)s kullanıcısına '%(message)s' mesajını gönderdiniz." + +#: templates/notification/messages_sent/notice.html:2 +#, python-format +msgid "" +"You have sent the message %(message)s to " +"%(message_recipient)s." +msgstr "" +"%(message)s mesajını gönderdiniz " +"alıcı: %(message_recipient)s." + +#: utils.py:25 +#, python-format +msgid "" +"%(sender)s wrote:\n" +"%(body)s" +msgstr "" +"%(sender)s yazdı:\n" +"%(body)s" + +#: utils.py:53 +#, python-format +msgid "Re%(prefix)s: %(subject)s" +msgstr "Re%(prefix)s: %(subject)s" + +#: utils.py:59 +#, python-format +msgid "New Message: %(subject)s" +msgstr "Yeni Mesaj: %(subject)s" + +#: views.py:89 views.py:126 +msgid "Message successfully sent." +msgstr "Mesaj başarıyla gönderildi." + +#: views.py:108 views.py:204 +#, python-format +msgid "Re: %(subject)s" +msgstr "Re: %(subject)s" + +#: views.py:169 +msgid "Message successfully deleted." +msgstr "Mesaj başarıyla silindi." + +#: views.py:196 +msgid "Message successfully recovered." +msgstr "Mesaj başarıyla kurtarıldı." From 1d2b29476d11555e4fdf88a787e731c0c4490873 Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Thu, 10 Sep 2020 01:36:02 +0300 Subject: [PATCH 4/4] Update management.py post_syncdb changed to post_migrate in django 3 --- django_messages/management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_messages/management.py b/django_messages/management.py index cac6178..387ff33 100644 --- a/django_messages/management.py +++ b/django_messages/management.py @@ -13,6 +13,6 @@ def create_notice_types(app, created_models, verbosity, **kwargs): notification.create_notice_type("messages_deleted", _("Message Deleted"), _("you have deleted a message"), default=1) notification.create_notice_type("messages_recovered", _("Message Recovered"), _("you have undeleted a message"), default=1) - signals.post_syncdb.connect(create_notice_types, sender=notification) + signals.post_migrate.connect(create_notice_types, sender=notification) else: print("Skipping creation of NoticeTypes as notification app not found")