summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/context.py2
-rw-r--r--askbot/locale/pt_BR/pt-br.tgzbin0 -> 450560 bytes
-rw-r--r--askbot/media/js/live_search.js1
-rw-r--r--askbot/media/style/style.css1
-rw-r--r--askbot/media/style/style.less1
-rw-r--r--askbot/skins/loaders.py3
-rw-r--r--askbot/templates/base.html2
-rw-r--r--askbot/templates/meta/bottom_scripts.html1
-rw-r--r--askbot/utils/translation.py9
-rw-r--r--askbot/views/users.py3
10 files changed, 17 insertions, 6 deletions
diff --git a/askbot/context.py b/askbot/context.py
index 69e2c15c..7de6cf0d 100644
--- a/askbot/context.py
+++ b/askbot/context.py
@@ -6,7 +6,6 @@ import sys
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils import simplejson
-from django.utils.translation import get_language
import askbot
from askbot import api
@@ -17,6 +16,7 @@ from askbot.skins.loaders import get_skin
from askbot.utils import url_utils
from askbot.utils.slug import slugify
from askbot.utils.html import site_url
+from askbot.utils.translation import get_language
def application_settings(request):
"""The context processor function"""
diff --git a/askbot/locale/pt_BR/pt-br.tgz b/askbot/locale/pt_BR/pt-br.tgz
new file mode 100644
index 00000000..a3c1cbab
--- /dev/null
+++ b/askbot/locale/pt_BR/pt-br.tgz
Binary files differ
diff --git a/askbot/media/js/live_search.js b/askbot/media/js/live_search.js
index 2cb62b2b..f6eecff1 100644
--- a/askbot/media/js/live_search.js
+++ b/askbot/media/js/live_search.js
@@ -375,6 +375,7 @@ var FullTextSearch = function() {
/** @todo: the questions/ needs translation... */
this._searchUrl = '/scope:all/sort:activity-desc/page:1/'
this._askButtonEnabled = true;
+ this._fullTextSearchEnabled = true;
};
inherits(FullTextSearch, WrappedElement);
diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css
index e9d5d126..80f56e00 100644
--- a/askbot/media/style/style.css
+++ b/askbot/media/style/style.css
@@ -1174,7 +1174,6 @@ body.anon.ask-page .search-drop-menu {
font-weight: bold;
font-size: 20px;
color: #7ea9b3;
- width: 200px;
float: left;
margin-bottom: 6px;
padding-top: 6px;
diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less
index c85bfcbf..d6c096bb 100644
--- a/askbot/media/style/style.less
+++ b/askbot/media/style/style.less
@@ -1226,7 +1226,6 @@ body.anon.ask-page .search-drop-menu {
font-weight:bold;
font-size:20px;
color:@section-title;
- width:200px;
float:left;
margin-bottom:6px;
padding-top: 6px;
diff --git a/askbot/skins/loaders.py b/askbot/skins/loaders.py
index 1ef2e67c..bf6b5b60 100644
--- a/askbot/skins/loaders.py
+++ b/askbot/skins/loaders.py
@@ -12,6 +12,7 @@ from jinja2.exceptions import TemplateNotFound
from jinja2.utils import open_if_exists
from askbot.conf import settings as askbot_settings
from askbot.skins import utils
+from askbot.utils.translation import get_language
from coffin import template
template.add_to_builtins('askbot.templatetags.extra_filters_jinja')
@@ -100,7 +101,7 @@ def get_skin():
"""retreives the skin environment
for a given request (request var is not used at this time)"""
skin_name = askbot_settings.ASKBOT_DEFAULT_SKIN
- skin_name += '-' + translation.get_language()
+ skin_name += '-' + get_language()
try:
return SKINS[skin_name]
diff --git a/askbot/templates/base.html b/askbot/templates/base.html
index 93f1c170..69e51c1f 100644
--- a/askbot/templates/base.html
+++ b/askbot/templates/base.html
@@ -33,7 +33,7 @@
{{ settings.CUSTOM_HTML_HEAD }}
{% endif %}
</head>
- <body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}{% if request.user.is_anonymous() %} anon{% endif %} lang-{{ language_code }}">
+ <body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}{% if request.user.is_anonymous() %} anon{% endif %} lang-{{ current_language_code }}">
{% include "widgets/system_messages.html" %}
{% include "debug_header.html" %}
{% if settings.MULTILINGUAL %}
diff --git a/askbot/templates/meta/bottom_scripts.html b/askbot/templates/meta/bottom_scripts.html
index f1180339..4612a0f3 100644
--- a/askbot/templates/meta/bottom_scripts.html
+++ b/askbot/templates/meta/bottom_scripts.html
@@ -113,6 +113,7 @@
$('abbr.timeago').timeago();
/*]]>*/
</script>
+{% include "meta/custom_javascript.html" ignore missing %}
{% endcompress %}
{# stuff below should not be compressed #}
{% if settings.ENABLE_MATHJAX %}
diff --git a/askbot/utils/translation.py b/askbot/utils/translation.py
new file mode 100644
index 00000000..6aadd533
--- /dev/null
+++ b/askbot/utils/translation.py
@@ -0,0 +1,9 @@
+from django.conf import settings as django_settings
+from django.utils import translation
+
+def get_language():
+ if django_settings.ASKBOT_MULTILINGUAL:
+ return translation.get_language()
+ else:
+ return django_settings.LANGUAGE_CODE
+
diff --git a/askbot/views/users.py b/askbot/views/users.py
index 173ccb85..a0ebc079 100644
--- a/askbot/views/users.py
+++ b/askbot/views/users.py
@@ -27,6 +27,7 @@ from django.http import HttpResponse, HttpResponseForbidden
from django.http import HttpResponseRedirect, Http404
from django.utils.translation import ugettext as _
from django.utils import simplejson
+from django.utils.html import strip_tags as strip_all_tags
from django.views.decorators import csrf
from askbot.utils.slug import slugify
@@ -327,7 +328,7 @@ def edit_user(request, id):
group.name = format_personal_group_name(user)
group.save()
- user.real_name = sanitize_html(form.cleaned_data['realname'])
+ user.real_name = strip_all_tags(form.cleaned_data['realname'])
user.website = sanitize_html(form.cleaned_data['website'])
user.location = sanitize_html(form.cleaned_data['city'])
user.date_of_birth = form.cleaned_data.get('birthday', None)