Commit fffb8610 authored by Leo Iannacone's avatar Leo Iannacone

merge with dev branch

parents 829b0042 031ee228
...@@ -57,7 +57,14 @@ FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l ...@@ -57,7 +57,14 @@ FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l
= forum/templatetags/extra_tags.py = = forum/templatetags/extra_tags.py =
FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l18ned FIXME: proporre cambiamento upstream come da lp:~giuseppeterrasi/ubuntu-it-ask/l18ned
Revert parziale con modifica 64 ramo dev, attraverso questo merge [1]
[1] https://code.launchpad.net/~giuseppeterrasi/ubuntu-it-ask/revert-extra-tag/+merge/121304
= forum_modules/pgfulltext = = forum_modules/pgfulltext =
sostituito "english" con "italian" sostituito "english" con "italian"
= forum/skins/light/templates/notifications/digest.html =
File nel quale sono state apportate direttamente delle traduzioni.
Nello specifico le parole "nuove domande" e "elementi" invece di "posts"
...@@ -167,6 +167,9 @@ this.makeHtml = function(text) { ...@@ -167,6 +167,9 @@ this.makeHtml = function(text) {
// attacklab: Restore tildes // attacklab: Restore tildes
text = text.replace(/~T/g,"~"); text = text.replace(/~T/g,"~");
text = text.replace(/&amp;lt;/g,"<");
text = text.replace(/&amp;gt;/g,">");
return text; return text;
} }
...@@ -1328,4 +1331,4 @@ var Showdown = Attacklab.showdown; ...@@ -1328,4 +1331,4 @@ var Showdown = Attacklab.showdown;
// If anyone's interested, tell the world that this file's been loaded // If anyone's interested, tell the world that this file's been loaded
if (Attacklab.fileLoaded) { if (Attacklab.fileLoaded) {
Attacklab.fileLoaded("showdown.js"); Attacklab.fileLoaded("showdown.js");
} }
\ No newline at end of file
...@@ -28,7 +28,12 @@ function ajaxFileUpload(imageUrl) ...@@ -28,7 +28,12 @@ function ajaxFileUpload(imageUrl)
if(error != ''){ if(error != ''){
alert(error); alert(error);
}else{ }else{
imageUrl.attr('value', appUrl + fileURL); if(fileURL == ''){
alert("There was an internal server error uploading your file.\nPermission denied.");
}
else{
imageUrl.attr('value', appUrl + fileURL);
}
} }
}, },
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="199.99998"
height="150"
viewBox="70.866 70.866 200 150.00001"
id="Layer_1"
xml:space="preserve"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="logo.svg"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="1.5500001"
inkscape:cx="99.999992"
inkscape:cy="75"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><title
id="title3027">Logo chiedi.ubuntu-it.org</title><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Logo chiedi.ubuntu-it.org</dc:title><dc:date>07/08/2012</dc:date><dc:creator><cc:Agent><dc:title>Riccardo Padovani</dc:title></cc:Agent></dc:creator><dc:language>it-IT</dc:language><cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/3.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-sa/3.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" /></cc:License></rdf:RDF></metadata><defs
id="defs9" />
<g
transform="matrix(1.7639018,0,0,1.3229031,-79.134446,-41.629711)"
id="g3">
<path
d="m 170.479,190.605 c -8.43,4.971 -18.256,7.819 -28.747,7.819 -31.312,0 -56.693,-25.382 -56.693,-56.694 0,-31.311 25.382,-56.693 56.693,-56.693 31.31,0 56.692,25.382 56.692,56.693 0,10.328 -2.762,20.008 -7.585,28.346 l -0.012,-0.005 7.597,28.353 -28.354,-7.597 0.409,-0.222 z"
id="path5"
style="fill:#dd4814" />
</g>
<text
x="186.35173"
y="155.3188"
transform="scale(0.91960212,1.0874268)"
id="text2988"
xml:space="preserve"
style="font-size:64.76406097px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
sodipodi:linespacing="125%"><tspan
x="186.35173"
y="155.3188"
id="tspan2990">chiedi</tspan></text>
</svg>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<div id="main-body" style="width:100%;margin-bottom:20px"> <div id="main-body" style="width:100%;margin-bottom:20px">
<p> <p>
<a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} : {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">&#9679;</span>&nbsp;{{ badge.name }}</a> {{ badge.description }} <a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">&#9679;</span>&nbsp;{{ badge.name }}</a> {{ badge.description }}
</p> </p>
<div> <div>
{% if badge.awarded_count %} {% if badge.awarded_count %}
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{% endif %} {% endif %}
</div> </div>
<div class="badgeListItem"> <div class="badgeListItem">
<a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} : {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">&#9679;</span>&nbsp;{{ badge.name }}</a><strong> &#215; {{ badge.awarded_count|intcomma }}</strong> <a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">&#9679;</span>&nbsp;{{ badge.name }}</a><strong> &#215; {{ badge.awarded_count|intcomma }}</strong>
</div> </div>
<p class="badgeListDescription"> <p class="badgeListDescription">
{{ badge.description }} {{ badge.description }}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
{% htmlcontent notifications/base.html %} {% htmlcontent notifications/base.html %}
{% declare %} {% declare %}
new_questions_link = html.hyperlink(smart_unicode(app_url) + reverse('questions') + '?sort=' + _('latest'), smart_unicode(_('new questions')), style=a_style) new_questions_link = html.hyperlink(smart_unicode(app_url) + reverse('questions') + '?sort=' + _('latest'), smart_unicode(_('nuove domande')), style=a_style)
user_questions = digest.get_for_user(recipient) user_questions = digest.get_for_user(recipient)
subscribed_url = '%s%s' % (app_url, recipient.get_subscribed_url()) subscribed_url = '%s%s' % (app_url, recipient.get_subscribed_url())
subscriptions_link = html.hyperlink(subscribed_url, _('subscriptions'), style=a_style) subscriptions_link = html.hyperlink(subscribed_url, _('subscriptions'), style=a_style)
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
{% if recipient.is_superuser %} {% if recipient.is_superuser %}
{% declare %} {% declare %}
flagged_url = html.hyperlink(smart_unicode(app_url + reverse('admin_flagged_posts')), smart_unicode(str(flagged_count) + ' ' + _('posts')), style=a_style) flagged_url = html.hyperlink(smart_unicode(app_url + reverse('admin_flagged_posts')), smart_unicode(str(flagged_count) + ' ' + _('elementi')), style=a_style)
{% enddeclare %} {% enddeclare %}
<p style="{{ p_style }}"> <p style="{{ p_style }}">
{% blocktrans %} {% blocktrans %}
......
...@@ -20,7 +20,7 @@ class MultiUserMailMessage(template.Node): ...@@ -20,7 +20,7 @@ class MultiUserMailMessage(template.Node):
self.nodelist.render(context) self.nodelist.render(context)
messages.append((recipient, context['subject'], context['htmlcontent'], context['textcontent'], context['embeddedmedia'])) messages.append((recipient, context['subject'], context['htmlcontent'], context['textcontent'], context['embeddedmedia']))
create_and_send_mail_messages(messages) create_and_send_mail_messages(messages, sender_data=context['sender'], reply_to=context['reply_to'])
@register.tag @register.tag
def email(parser, token): def email(parser, token):
......
...@@ -167,11 +167,11 @@ def diff_date(date, limen=2): ...@@ -167,11 +167,11 @@ def diff_date(date, limen=2):
elif days == 1: elif days == 1:
return _('yesterday') return _('yesterday')
elif minutes >= 60: elif minutes >= 60:
return ungettext("%(hr)d hour ago", "%(hr)d hours ago", hours) % {'hr':hours} return ungettext('%(hr)d ' + _("hour ago"), '%(hr)d ' + _("hours ago"), hours) % {'hr':hours}
elif diff.seconds >= 60: elif diff.seconds >= 60:
return ungettext("%(min)d min ago", "%(min)d mins ago", minutes) % {'min':minutes} return ungettext('%(min)d ' + _("min ago"), '%(min)d ' + _("mins ago"), minutes) % {'min':minutes}
else: else:
return ungettext("%(sec)d sec ago", "%(sec)d secs ago", diff.seconds) % {'sec':diff.seconds} return ungettext('%(sec)d ' + _("sec ago"), '%(sec)d ' + _("secs ago"), diff.seconds) % {'sec':diff.seconds}
@register.simple_tag @register.simple_tag
def media(url): def media(url):
......
...@@ -24,9 +24,9 @@ from forum.context import application_settings ...@@ -24,9 +24,9 @@ from forum.context import application_settings
from forum.utils.html2text import HTML2Text from forum.utils.html2text import HTML2Text
from threading import Thread from threading import Thread
def send_template_email(recipients, template, context): def send_template_email(recipients, template, context, sender=None, reply_to = None):
t = loader.get_template(template) t = loader.get_template(template)
context.update(dict(recipients=recipients, settings=settings)) context.update(dict(recipients=recipients, settings=settings, sender=sender, reply_to=reply_to))
t.render(Context(context)) t.render(Context(context))
def create_connection(): def create_connection():
...@@ -44,16 +44,23 @@ def create_connection(): ...@@ -44,16 +44,23 @@ def create_connection():
return connection return connection
def create_and_send_mail_messages(messages): def create_and_send_mail_messages(messages, sender_data=None, reply_to=None):
if not settings.EMAIL_HOST: if not settings.EMAIL_HOST:
return return
sender = Header(unicode(settings.APP_SHORT_NAME), 'utf-8') sender = Header(unicode(settings.APP_SHORT_NAME), 'utf-8')
sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))
sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))
reply_to = unicode(settings.DEFAULT_REPLY_TO_EMAIL)
if sender_data == None:
sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))
sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))
else:
sender.append('<%s>' % unicode(sender_data['email']))
sender = u'%s <%s>' % (unicode(sender_data['name']), unicode(sender_data['email']))
if reply_to == None:
reply_to = unicode(settings.DEFAULT_REPLY_TO_EMAIL)
else:
reply_to = unicode(reply_to)
try: try:
connection = None connection = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment