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

Unified Diff: includes/common.tmpl

Issue 5636796054503424: Issue 1170 - [adblockplus.org Anwiki to CMS migration] Migrate content (Closed)
Patch Set: Addressed more of snoack's comments. Created Feb. 27, 2015, 2:56 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
Index: includes/common.tmpl
diff --git a/includes/common.tmpl b/includes/common.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..0308d1db9f10a419c95593ad6acab51dc860b40f
--- /dev/null
+++ b/includes/common.tmpl
@@ -0,0 +1,29 @@
+{#
+ # This file is part of the Adblock Plus website,
+ # Copyright (C) 2006-2015 Eyeo GmbH
+ #
+ # Adblock Plus is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License version 3 as
+ # published by the Free Software Foundation.
+ #
+ # Adblock Plus is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ #}
+
+{% macro description(key_name, links, open="", close="") %}
+ {% for i in range(100) %}
+ {% if i == 0 %}
+ {% set current_key_name = key_name %}
+ {% else %}
+ {% set current_key_name = "%s%d" % (key_name, i) %}
+ {% endif %}
+ {% if current_key_name in localedata %}
+ {{open|safe}}{{ current_key_name|translate(links=links[key_name]) }}{{close|safe}}
+ {% endif %}
+ {% endfor %}
+{% endmacro %}

Powered by Google App Engine
This is Rietveld