Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: includes/toc.tmpl

Issue 5656283008991232: Noissue - Localize page title in toc() macro (Closed)
Patch Set: Created May 5, 2015, 4:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/toc.tmpl
===================================================================
--- a/includes/toc.tmpl
+++ b/includes/toc.tmpl
@@ -15,17 +15,17 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
#}
{% macro toc(page, title_tag=None) %}
{% set page_content = get_page_content(page) %}
{% set toclist = page_content["body"]|toclist %}
{% if title_tag %}
- <{{ title_tag }}>{{ page_content["title"] }}</{{ title_tag }}>
+ <{{ title_tag }}>{{ page_content.localedata.get("title", page_content["title"]) }}</{{ title_tag }}>
{% endif %}
<ul>
{% for item in toclist %}
<li>
{{ (page + '#' + item.anchor)|linkify }}{{ item.title }}</a>
{% if item.subitems %}{{ toc(item.subitems) }}{% endif %}
</li>
{% endfor %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld