Skip to content

fix jobunit translations #38

Open
nickburlett wants to merge 59 commits intoallink:masterfrom
nickburlett:master
Open

fix jobunit translations #38
nickburlett wants to merge 59 commits intoallink:masterfrom
nickburlett:master

Conversation

@nickburlett
Copy link
Copy Markdown

jobunit/change_form.html has {% trans "Newsletter Erstellen" %}, but it
should read {% trans "Send Newsletter" %} and allow the translations to
convert it appropriately.

Fixes #37

frog32 and others added 30 commits September 7, 2011 16:01
Conflicts:
	pennyblack/__init__.py
Conflicts:
	pennyblack/__init__.py
this feature worked for me in a local development setup but isn't field testet yet
closes allink#9
this now finally closes allink#31
thanks to @sspross for reporting this issue
…hich aren't http or https

this also inserts analytics data in the right place when a url has fragments
this feature is hidden by default because you should not send large emails to a bit mailing list
frog32 and others added 25 commits February 11, 2013 10:35
jobunit/change_form.html has {% trans "Newsletter Erstellen" %}, but it
should read {% trans "Send Newsletter" %} and allow the translations to
convert it appropriately.
Fix jobunit/change_form translations
Adding the request context to the unsubscribe view allows for a more
versatile unsubscribe template
Some newsletters should be viewable by the public. A new `public_slug`
field on the Job model describes which jobs should be viewable, and by
what URL.

Additionally, new public_url newsletter template parameter allows
sharing links in the newsletter to point to the public location instead
of the mail-specific url.
from PIL import Image works on both PIL and Pillow
jobunit/change_form.html has {% trans "Newsletter Erstellen" %}, but it
should read {% trans "Send Newsletter" %} and allow the translations to
convert it appropriately.
Adding the request context to the unsubscribe view allows for a more
versatile unsubscribe template
from PIL import Image works on both PIL and Pillow
This fixes issue allink#43:

The `NewsletterSubscriber.date_subscribed` default is `datetime.datetime.now()`, which has two problems:

1. The time is fixed when the module is loaded (it's the same for every added subscriber during one run of a script, or until the webserver is reloaded)
2. The date/time is not timezone-aware, causing warnings when timezones are enabled in Django 1.4 and newer
This fixes issue allink#43:

The `NewsletterSubscriber.date_subscribed` default is `datetime.datetime.now()`, which has two problems:

1. The time is fixed when the module is loaded (it's the same for every added subscriber during one run of a script, or until the webserver is reloaded)
2. The date/time is not timezone-aware, causing warnings when timezones are enabled in Django 1.4 and newer

Conflicts:
	pennyblack/module/subscriber/models.py
The fix for issue allink#43 in pull request allink#44 only works in Django 1.4 and earlier. Pennyblack needs to work with Django 1.3, so try to import `django.utils.timezone.now`, but if that fails then fall back to datetime.now
`Job.public_slug` is supposed to be able to be blank, but the uniqueness
constraint means that there can be only one blank ('')  slug.

Fix this by changing "" -> None in `clean()`, and return None
for the `public_url` if there is no slug or if there is no valid reverse
url mapping.
Fix `Job.send`:

1. if `connection.send_messages raises` an exception, the `Job` status is set to 41 (error) but was not saved, so the `Job` status stays pending. Now it's saved on exception
2. Additionally, the `smtplib.SMTPRecipientsRefused` exception can be raised from `send_messages`, indicating that one of the messages could not be sent. This doesn't mean that the entire job is in error, just one of the recipients, but Job.send would abort the remainder of the sending anyway.  Fix this by calling `newsletter_mail.bounce()` when this is encountered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jobunit/change_form.html translation error

4 participants