From: Christopher Allan Webber Date: Thu, 2 Jan 2014 20:49:04 +0000 (-0600) Subject: Merge remote-tracking branch 'remotes/jiyda/220_rtl_language_support' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=408aa9cf3b29d778eb7594e4de1720a6bb158024;p=mediagoblin.git Merge remote-tracking branch 'remotes/jiyda/220_rtl_language_support' Conflicts: mediagoblin/templates/mediagoblin/base.html mediagoblin/tools/template.py --- 408aa9cf3b29d778eb7594e4de1720a6bb158024 diff --cc mediagoblin/templates/mediagoblin/base.html index e71f9d12,83bc65d4..6d49ff47 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@@ -16,14 -16,14 +16,18 @@@ # along with this program. If not, see . -#} + - ++ {% block mediagoblin_html_tag %} ++ {% endblock mediagoblin_html_tag %} ++ {% if is_rtl -%} ++ dir="rtl" ++ {%- endif -%} ++ > + + {% block title %}{{ app_config['html_title'] }}{% endblock %} diff --cc mediagoblin/tools/template.py index fa290611,5d320f75..e5acdf45 --- a/mediagoblin/tools/template.py +++ b/mediagoblin/tools/template.py @@@ -26,8 -26,10 +26,10 @@@ from mediagoblin import mg_global from mediagoblin import messages from mediagoblin import _version from mediagoblin.tools import common + from mediagoblin.tools.translate import is_rtl from mediagoblin.tools.translate import set_thread_locale + from mediagoblin.tools.translate import get_locale_from_request -from mediagoblin.tools.pluginapi import get_hook_templates +from mediagoblin.tools.pluginapi import get_hook_templates, hook_transform from mediagoblin.tools.timesince import timesince from mediagoblin.meddleware.csrf import render_csrf_form_token @@@ -76,8 -74,7 +79,8 @@@ def get_jinja_env(template_loader, loca template_env.globals['app_config'] = mg_globals.app_config template_env.globals['global_config'] = mg_globals.global_config template_env.globals['version'] = _version.__version__ + template_env.globals['auth'] = mg_globals.app.auth - + template_env.globals['is_rtl'] = is_rtl(locale) template_env.filters['urlencode'] = url_quote_plus # add human readable fuzzy date time