]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/notifications/digest.html
notifications improvement, now we make sure that the username has passed through...
[osqa.git] / forum / skins / default / templates / notifications / digest.html
index e986d4b5907948bcd7fabef80c1c36a63c1e13ac..91757b86f4fe22af07b3fa4386bbbac6e03f7ebb 100644 (file)
@@ -1,11 +1,11 @@
 {% load i18n extra_tags email_tags %}
 
 {% declare %}
-    prefix = html.mark_safe(settings.EMAIL_SUBJECT_PREFIX)
-    app_name = settings.APP_SHORT_NAME
+    prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
+    app_name = smart_unicode(settings.APP_SHORT_NAME)
     app_url = settings.APP_URL
 
-    new_member_links = html.mark_safe(", ".join([html.objlink(u, style=settings.EMAIL_ANCHOR_STYLE) for u in new_members]))
+    new_member_links = html.mark_safe(smart_unicode(", ".join([html.objlink(u, style=settings.EMAIL_ANCHOR_STYLE) for u in new_members])))
     new_question_count = digest.count
 
 {% enddeclare %}
 
     {% htmlcontent notifications/base.html %}
         {% declare %}
-            new_questions_link = html.hyperlink(app_url + reverse('questions') + '?sort=' + _('latest'), _('new questions'), style=a_style)
+            new_questions_link = html.hyperlink(smart_unicode(app_url) + reverse('questions') + '?sort=' + _('latest'), smart_unicode(_('new questions')), style=a_style)
             user_questions = digest.get_for_user(recipient)
-            subscriptions_link = html.hyperlink(app_url + recipient.get_subscribed_url(), _('subscriptions'), style=a_style)
+            subscribed_url = '%s%s' % (app_url, recipient.get_subscribed_url())
+            subscriptions_link = html.hyperlink(subscribed_url, _('subscriptions'), style=a_style)
         {% enddeclare %}
 
         <p style="{{ p_style }}">
@@ -92,7 +93,7 @@
 
         {% if recipient.is_superuser %}
         {% declare %}
-            flagged_url = html.hyperlink(app_url + reverse('admin_flagged_posts'), str(flagged_count) + ' ' + _('posts'), style=a_style)
+            flagged_url = html.hyperlink(smart_unicode(app_url + reverse('admin_flagged_posts')), smart_unicode(str(flagged_count) + ' ' + _('posts')), style=a_style)
         {% enddeclare %}
         <p style="{{ p_style }}">
             {% blocktrans %}