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

Unified Diff: includes/index.tmpl

Issue 29424810: Issue 5191 - Add Terms of Use to adblockplus.org homepage (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Fixed has_string Created May 2, 2017, 8:43 a.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/platforms.py ('k') | locales/fr/index.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/index.tmpl
===================================================================
--- a/includes/index.tmpl
+++ b/includes/index.tmpl
@@ -62,29 +62,43 @@
</li>
<li id="feature-maxthon" itemprop="featureList">
<div class="sprite"></div>
{{"Integrated by default in"|translate("s11")}} <a href="http://www.maxthon.com/" target="_blank">{{"Maxthon Cloud Browser"|translate("s12")}}</a>
</li>
</ul>
</div>
+ {% if locale == "en" or has_string("terms-message", "index") %}
saroyanm 2017/05/02 09:26:37 We should check against "defaultlocale" I think in
saroyanm 2017/05/02 09:26:37 This is wrong, the string can be translated while
juliandoucette 2017/05/02 10:22:12 I agree. But I don't know how to do this without c
juliandoucette 2017/05/02 10:22:12 Acknowledged.
juliandoucette 2017/05/02 10:32:01 Done.
juliandoucette 2017/05/02 10:32:01 Detail: I think that we have to check if the messa
+ <p class="terms-message">
+ {{ "By clicking the Agree and Install button below, you agree to our <a href='terms'>Terms of Use</a>." | translate("terms-message", "Terms of use message") }}
+ </p>
+ {% endif %}
+
<h3 class="edge-message">
{{"Adblock Plus for Microsoft Edge requires Windows 10 Anniversary Update"|translate("edge-message")}}
</h3>
<div id="install">
- <a class="install-button" href="https://update.adblockplus.org/latest/adblockplusfirefox.xpi" id="install-firefox">{{"Install for Firefox"|translate("s13")}}</a>
- <a class="install-button" href="https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb" id="install-chrome" onclick="chrome.webstore.install(); return false;">{{"Install for Chrome"|translate("s14")}}</a>
- <a class="install-button" href="https://addons.opera.com/extensions/details/opera-adblock/?display=en-US" id="install-opera">{{"Install for Opera"|translate("s15")}}</a>
- <a class="install-button" href="android-install" id="install-android">{{"Install for Android"|translate("s16")}}</a>
- <a class="install-button" href="https://update.adblockplus.org/latest/adblockplusie.exe" id="install-internet-explorer">{{"Install for Internet Explorer"|translate("s17")}}</a>
- <a class="install-button" href="https://update.adblockplus.org/latest/adblockplussafari.safariextz" id="install-safari">{{"Install for Safari"|translate("s18")}}</a>
- <a class="install-button" href="https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb" id="install-yandex-browser" onclick="chrome.webstore.install(); return false;">{{"Install for Yandex Browser"|translate("s19")}}</a>
- <a class="install-button" href="ms-windows-store://pdp/?ProductId=9nblggh4r9nz" id="install-edge">{{"Install for Microsoft Edge"|translate("install-edge")}}</a>
+ {% for platform_id in platforms %}
+ {% set platform = platforms[platform_id] %}
+ <a
+ id="install-{{ platform_id }}"
+ class="install-button"
+ {% if platform_id in ('chrome', 'yandex-browser') %}
+ onclick="chrome.webstore.install(); return false;"
+ {% endif %}
+ href="{{ platform.href }}">
+ {% if locale == "en" or has_string(("agree-install-%s" % platform_id), "index") %}
+ {{ ("Agree and Install for <fix>%s</fix>" % platform.label) | translate(("agree-install-%s" % platform_id), "button label") }}
+ {% else %}
+ {{ ("Install for <fix>%s</fix>" % platform.label) | translate(("install-%s" % platform_id), "button label") }}
+ {% endif %}
+ </a>
+ {% endfor %}
</div>
<div id="other-platform">
<div>{{"Download Adblock Plus for another platform"|translate("other-platform")}}</div>
<ul>
<li>
<a class="sprite" href="firefox" id="platform-firefox" title="{{"Adblock Plus for Firefox"|translate("s20")}}"></a>
</li>
« no previous file with comments | « globals/platforms.py ('k') | locales/fr/index.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld