From 3170e36c66555557ba8bba53dcdf6b0b5a93aa88 Mon Sep 17 00:00:00 2001 From: Mark Hoeber Date: Fri, 17 Oct 2014 13:06:17 -0400 Subject: [PATCH] Removed highlight underscore, which was breaking on RTD --- docs/en_us/developers/source/i18n.rst | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/en_us/developers/source/i18n.rst b/docs/en_us/developers/source/i18n.rst index 7a6e75bab9..5028dc950c 100644 --- a/docs/en_us/developers/source/i18n.rst +++ b/docs/en_us/developers/source/i18n.rst @@ -202,8 +202,6 @@ native Coffeescript features that break the extraction from the .js files: Underscore template files ========================= -.. highlight:: underscore - Underscore template files are used in conjunction with JavaScript, and so the same techniques are used for localization. Ensure that the i18n JavaScript library has already been loaded, and then use the regular i18n functions @@ -211,19 +209,13 @@ such as ``gettext`` and ``interpolate`` from your template. For example:: -
- <% if (group.group_name) { %> - <%- - interpolate( - gettext('This post is visible only to %(group_name)s.'), + <%- + interpolate( + gettext('This post is visible only to %(group_name)s.'), {group_name: group.group_name}, true - ) - %> - <% } else { %> - <%- gettext('This post is visible to everyone.') %> - <% } %> -
+ ) + %> Note: it is recommended that you use ``<%-`` for all translated strings as this will HTML escape the string before including it in the page. This