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

Unified Diff: pages/requirements.tmpl

Issue 6702768332996608: Issue 2432 - Auto-generate browser versions on requirements page (Closed)
Patch Set: Addressed comments Created May 13, 2015, 6:18 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 | « globals/get_browser_versions.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/requirements.tmpl
===================================================================
rename from pages/requirements.html
rename to pages/requirements.tmpl
--- a/pages/requirements.html
+++ b/pages/requirements.tmpl
@@ -1,45 +1,32 @@
title=Adblock Plus system requirements
+{%- macro browser_versions(browser_name, internal_name, versions) %}
+<h2 id="{{ internal_name }}">{{ browser_name }}</h2>
+<ul>
+ {%- set versions = versions or get_browser_versions(internal_name) %}
+ {%- if versions.previous %}
+ <li>{{ browser_name }} {{ versions.previous }}</li>
+ {%- endif %}
+ <li>{{ browser_name }} {{ versions.current }}</li>
+ {%- for version in versions.unreleased %}
+ <li>{{ browser_name }} {{ version }}{{ ': Using <a href="development-builds">Adblock Plus development builds</a> is recommended.'|translate("s3") }}</li>
+ {%- endfor %}
+</ul>
+{%- endmacro %}
<p>
- {{s1 Adblock Plus is a platform-independent extension, which means that it can be installed on any
- operating system provided that a host application is available.}} {{s2 Supported
- programs and versions are listed below.}}
+ {{ "Adblock Plus is a platform-independent extension, which means that it can be installed on any operating system provided that a host application is available."|translate("s1") }}
+ {{ "Supported programs and versions are listed below."|translate("s2") }}
</p>
-<h2 id="firefox">Firefox</h2>
+{% set firefox_versions = get_browser_versions("firefox") -%}
+{{ browser_versions("Firefox", "firefox", firefox_versions) }}
-<ul>
- <li>Firefox 36</li>
- <li>Firefox 37</li>
- <li>{{s3 <fix>Firefox 38</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Firefox 39</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Firefox 40</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
-</ul>
+{{ browser_versions("Google Chrome", "chrome") }}
-<h2 id="chrome">Google Chrome</h2>
+{{ browser_versions("Opera", "opera") }}
-<ul>
- <li>Google Chrome 41</li>
- <li>Google Chrome 42</li>
- <li>Google Chrome 43</li>
- <li>Google Chrome 44</li>
-</ul>
-
-<h2 id="opera">Opera</h2>
-
-<ul>
- <li>Opera 28</li>
- <li>Opera 29</li>
- <li>Opera 30</li>
- <li>Opera 31</li>
-</ul>
-
-<h2 id="opera">Safari</h2>
-
+<h2 id="safari">Safari</h2>
<ul>
<li>Safari 6.0</li>
<li>Safari 6.1</li>
@@ -48,7 +35,6 @@
</ul>
<h2 id="internet-explorer">Internet Explorer</h2>
-
<ul>
<li>Internet Explorer 8</li>
<li>Internet Explorer 9</li>
@@ -56,47 +42,10 @@
<li>Internet Explorer 11</li>
</ul>
-<h2 id="thunderbird">Yandex.Browser</h2>
+{{ browser_versions("Yandex.Browser", "yandex") }}
-<ul>
- <li>Yandex.Browser 15.2</li>
- <li>Yandex.Browser 15.4</li>
-</ul>
+{{ browser_versions("Firefox Mobile", "fennec", firefox_versions) }}
-<h2 id="fennec">Firefox Mobile (Fennec)</h2>
+{{ browser_versions("SeaMonkey", "seamonkey") }}
-<ul>
- <li>Firefox Mobile 36</li>
- <li>Firefox Mobile 37</li>
- <li>{{s3 <fix>Firefox Mobile 38</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Firefox Mobile 39</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Firefox Mobile 40</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
-</ul>
-
-<h2 id="seamonkey">SeaMonkey</h2>
-
-<ul>
- <li>SeaMonkey 2.33</li>
- <li>SeaMonkey 2.34</li>
- <li>{{s3 <fix>SeaMonkey 2.35</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>SeaMonkey 2.36</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>SeaMonkey 2.37</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
-</ul>
-
-<h2 id="thunderbird">Thunderbird</h2>
-
-<ul>
- <li>Thunderbird 31</li>
- <li>{{s3 <fix>Thunderbird 38</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Thunderbird 39</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
- <li>{{s3 <fix>Thunderbird 40</fix>: Using <a href="development-builds">Adblock Plus development
- builds</a> is recommended.}}</li>
-</ul>
+{{ browser_versions("Thunderbird", "thunderbird") }}
« no previous file with comments | « globals/get_browser_versions.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld