Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Yonk 1136 b fixes #186

Open
wants to merge 38 commits into
base: hamzamunir/Yonk-1136-b
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c4705b6
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
57c3979
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
f936256
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
7831566
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
e79e9fb
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
38e9ce3
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
b39d1bc
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
7086e12
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
3aadc3e
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
18fa62f
fixing version in setup.py
hamzamunir7300 Nov 28, 2018
e4d88c0
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
c4ab578
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
edde14d
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
3a44be1
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
623e429
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
b5f9848
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
2d7fa4c
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
73bac3f
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
5216034
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
122b08d
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
b11ea96
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
b87de0f
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
2cc58ae
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
7bb330a
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
2872297
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
736cce3
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
f6316cc
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
42f6949
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
71d9469
fixing version in setup.py
hamzamunir7300 Nov 29, 2018
c3e2621
fixing version in setup.py
hamzamunir7300 Dec 4, 2018
18d9582
fixing version in setup.py
hamzamunir7300 Dec 4, 2018
4cd2f7b
fixing version in setup.py
hamzamunir7300 Dec 4, 2018
2e5fd9b
fixing version in setup.py
hamzamunir7300 Dec 4, 2018
5a5664f
fixing version in setup.py
hamzamunir7300 Dec 4, 2018
fee788e
announcement on strings fied
hamzamunir7300 Dec 4, 2018
ef3cb87
small nit
hamzamunir7300 Dec 4, 2018
c7d1b51
small nit
hamzamunir7300 Dec 5, 2018
2baa474
Version Fix plus fixes for translations in api endpoints.
hamzamunir7300 Dec 5, 2018
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
Binary file modified edx_notifications/locale/ar/LC_MESSAGES/django.mo
Binary file not shown.
16 changes: 13 additions & 3 deletions edx_notifications/locale/ar/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -47,7 +47,9 @@ msgstr "استلام بريد إلكتروني يوميًا"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "هذا الإعداد سيؤدي لإرسال ملخص يومي بجميع الإشعارات إلى عنوان بريدك الإلكتروني المسجل"
msgstr ""
"هذا الإعداد سيؤدي لإرسال ملخص يومي بجميع الإشعارات إلى عنوان بريدك "
"الإلكتروني المسجل"

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -57,4 +59,12 @@ msgstr "استلام بريد إلكتروني أسبوعيًا"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "هذا الإعداد سيؤدي لإرسال ملخص أسبوعي بجميع الإشعارات إلى عنوان بريدك الإلكتروني المسجل"
msgstr ""
"هذا الإعداد سيؤدي لإرسال ملخص أسبوعي بجميع الإشعارات إلى عنوان بريدك "
"الإلكتروني المسجل"

#: stores/sql/models.py:145
#, python-brace-format
#| msgid "Announcement on {annoucement_date}"
msgid "Announcement on {annoucement_date}"
msgstr "{annoucement_date} الإعلان على"
Binary file modified edx_notifications/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
17 changes: 12 additions & 5 deletions edx_notifications/locale/de/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -46,8 +46,9 @@ msgstr "Tägliche E-Mail erhalten"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "Bei dieser Einstellung wird eine tägliche Zusammenfassung aller Nachrichten an "
"Ihre eingetragene E-Mail Adresse geschickt."
msgstr ""
"Bei dieser Einstellung wird eine tägliche Zusammenfassung aller Nachrichten "
"an Ihre eingetragene E-Mail Adresse geschickt."

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -57,5 +58,11 @@ msgstr "Wöchentliche E-Mail erhalten"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "Bei dieser Einstellung wird eine wöchentliche Zusammenfassung aller"
"Nachrichten an Ihre eingetragene E-Mail Adresse geschickt."
msgstr ""
"Bei dieser Einstellung wird eine wöchentliche Zusammenfassung "
"allerNachrichten an Ihre eingetragene E-Mail Adresse geschickt."

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "Ankündigung am {annoucement_date}"
Binary file modified edx_notifications/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
11 changes: 10 additions & 1 deletion edx_notifications/locale/en/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -37,6 +37,10 @@ msgstr ""
msgid "Other"
msgstr ""

#: const.py:167
msgid "Announcement"
msgstr ""

#: digests.py:200
msgid "Receive daily email"
msgstr ""
Expand All @@ -56,3 +60,8 @@ msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr ""

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr ""
Binary file modified edx_notifications/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
17 changes: 12 additions & 5 deletions edx_notifications/locale/es/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -46,8 +46,9 @@ msgstr "Recibir a diario por correo electrónico"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "Esta configuración le permite seleccionar que todas las notificaciones se envíen "
"a diario a la dirección de correo electrónico registrada."
msgstr ""
"Esta configuración le permite seleccionar que todas las notificaciones se "
"envíen a diario a la dirección de correo electrónico registrada."

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -57,5 +58,11 @@ msgstr "Recibir una vez semana por correo electrónico"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "Esta configuración le permite seleccionar que todas las notificaciones"
"se envíen una vez por semana a la dirección de correo electrónico registrada."
msgstr ""
"Esta configuración le permite seleccionar que todas las notificacionesse "
"envíen una vez por semana a la dirección de correo electrónico registrada."

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "anuncio el {annoucement_date}"
Binary file modified edx_notifications/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
15 changes: 12 additions & 3 deletions edx_notifications/locale/fr/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -46,7 +46,9 @@ msgstr "Recevoir un courriel quotidien"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "Ce paramètre résultera en l'envoi d'un résumé quotidien de toutes les notifications à votre adresse de courriel enregistré"
msgstr ""
"Ce paramètre résultera en l'envoi d'un résumé quotidien de toutes les "
"notifications à votre adresse de courriel enregistré"

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -56,4 +58,11 @@ msgstr "Recevoir un courriel hebdomadaire"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "Ce paramètre résultera en l'envoi d'un résumé hebdomadaire de toutes les notifications à votre adresse de courriel enregistrée"
msgstr ""
"Ce paramètre résultera en l'envoi d'un résumé hebdomadaire de toutes les "
"notifications à votre adresse de courriel enregistrée"

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "annonce le {annoucement_date}"
Binary file modified edx_notifications/locale/ja/LC_MESSAGES/django.mo
Binary file not shown.
15 changes: 12 additions & 3 deletions edx_notifications/locale/ja/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -46,7 +46,9 @@ msgstr "デイリーメールを受信する"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "この設定により、すべての通知の日々のダイジェスト版が、あなたの登録メールアドレスに送信されます。"
msgstr ""
"この設定により、すべての通知の日々のダイジェスト版が、あなたの登録メールアド"
"レスに送信されます。"

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -56,4 +58,11 @@ msgstr "ウィークリーメールを受信する"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "この設定により、すべての通知の週間ダイジェスト版が、あなたの登録メールアドレスに送信されます。"
msgstr ""
"この設定により、すべての通知の週間ダイジェスト版が、あなたの登録メールアドレ"
"スに送信されます。"

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "についての発表 {annoucement_date}"
Binary file modified edx_notifications/locale/nl/LC_MESSAGES/django.mo
Binary file not shown.
11 changes: 10 additions & 1 deletion edx_notifications/locale/nl/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -38,6 +38,10 @@ msgstr ""
msgid "Other"
msgstr ""

#: const.py:167
msgid "Announcement"
msgstr ""

#: digests.py:200
msgid "Receive daily email"
msgstr ""
Expand All @@ -57,3 +61,8 @@ msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr ""

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr ""
Binary file modified edx_notifications/locale/pt/LC_MESSAGES/django.mo
Binary file not shown.
17 changes: 12 additions & 5 deletions edx_notifications/locale/pt/LC_MESSAGES/django.po
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -46,8 +46,9 @@ msgstr "Receber e-mail diário"
msgid ""
"This setting will cause a daily digest of all notifications to be sent to "
"your registered email address"
msgstr "Esta configuração fará com que um resumo diário de todas as"
"notificações seja enviado para seu endereço de e-mail registrado"
msgstr ""
"Esta configuração fará com que um resumo diário de todas asnotificações seja "
"enviado para seu endereço de e-mail registrado"

#: digests.py:210
msgid "Receive weekly email"
Expand All @@ -57,5 +58,11 @@ msgstr "Receber e-mail semanal"
msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "Esta configuração fará com que um resumo semanal de todas"
"as notificações seja enviado para o seu endereço de e-mail cadastrado"
msgstr ""
"Esta configuração fará com que um resumo semanal de todasas notificações "
"seja enviado para o seu endereço de e-mail cadastrado"

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "anúncio em {annoucement_date}"
Binary file removed edx_notifications/locale/zh-ch/LC_MESSAGES/django.mo
Binary file not shown.
Binary file not shown.
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: 2018-10-30 22:48+0500\n"
"POT-Creation-Date: 2018-11-29 17:12+0500\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 Down Expand Up @@ -56,3 +56,8 @@ msgid ""
"This setting will cause a weekly digest of all notifications to be sent to "
"your registered email address"
msgstr "此设置将使所有通知的每周摘要都发送到您注册的电子邮件地址"

#: stores/sql/models.py:145
#, python-brace-format
msgid "Announcement on {annoucement_date}"
msgstr "公告 {annoucement_date}"
15 changes: 14 additions & 1 deletion edx_notifications/stores/sql/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,27 @@ def to_data_object(self, options=None): # pylint: disable=unused-argument
deliver_no_earlier_than=self.deliver_no_earlier_than,
expires_at=self.expires_at,
expires_secs_after_read=self.expires_secs_after_read,
payload=DictField.from_json(self.payload), # special case, dict<-->JSON string
payload=self.translate_payload_title
(DictField.from_json(self.payload)), # special case, dict<-->JSON string
created=self.created,
resolve_links=DictField.from_json(self.resolve_links), # special case, dict<-->JSON string
object_id=self.object_id
)

return msg

def translate_payload_title(self, payload):
"""
translate a the title of any announcement to the current course language
:param payload:
:return:
"""
if payload and 'notification_type' in payload and payload['notification_type'] == "courseannouncement":
announcement_date = payload['announcement_date']
title = _('Announcement on {annoucement_date}').format(annoucement_date=announcement_date) # pylint: disable=line-too-long, no-member
payload['title'] = title
return payload

@classmethod
def from_data_object(cls, msg):
"""
Expand Down
4 changes: 1 addition & 3 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""
Django settings file for local development purposes
"""
import sys


# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
Expand Down Expand Up @@ -65,7 +63,7 @@
('es', u'Español'),
('nl', u'Dutch '),
('pt', u'Português'),
('zh-ch', u'中文(简体)'),
('zh-cn', u'中文(简体)'),
('fr', u'Français'),
('jp', u'日本人'),
('de', u'Deutsche'),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):

setup(
name='edx-notifications',
version='0.6.8',
version='0.6.9',
description='Notification subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
Expand Down
2 changes: 1 addition & 1 deletion testserver/bokchoy_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
('es', u'Español'),
('nl', u'Dutch '),
('pt', u'Português'),
('zh-ch', u'中文(简体)'),
('zh-cn', u'中文(简体)'),
('fr', u'Français'),
('jp', u'日本人'),
('de', u'Deutsche'),
Expand Down