[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Update all HTML templates to use bridgedb.strings.
commit 8278255f458ff6a7241e52072cb47e15ab086087
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Mon May 5 19:05:26 2014 +0000
Update all HTML templates to use bridgedb.strings.
---
lib/bridgedb/templates/base.html | 43 ++++++++++---------
lib/bridgedb/templates/bridges.html | 31 ++++++--------
lib/bridgedb/templates/captcha.html | 78 +++++++++++++++++------------------
lib/bridgedb/templates/howto.html | 25 ++++-------
lib/bridgedb/templates/index.html | 7 ++--
lib/bridgedb/templates/options.html | 50 ++++++++++------------
6 files changed, 106 insertions(+), 128 deletions(-)
diff --git a/lib/bridgedb/templates/base.html b/lib/bridgedb/templates/base.html
index 1ec49a3..1673c3a 100644
--- a/lib/bridgedb/templates/base.html
+++ b/lib/bridgedb/templates/base.html
@@ -60,28 +60,27 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
<div class="faq">
<div class="row-fluid marketing">
- <h4>${_("What are bridges?")}</h4>
- <p>${_("%s Bridge relays %s are Tor relays that help you circumvent "
- "censorship.") % \
- ("""<a href="https://www.torproject.org/docs/bridges">""", "</a>")}
+ <h4>${_(strings.FAQ[0])}</h4>
+ <p>
+ ${_(strings.FAQ[1]) % \
+ ("""<a href="https://www.torproject.org/docs/bridges">""", "</a>")}
</p>
- <h4>${_("I need an alternative way of getting bridges!")}</h4>
- <p>${_("Another way to find public bridge addresses is to send an email "
- "(from a %s or a %s address) to %s with the line 'get bridges' by "
- "itself in the body of the mail.""") % \
- ("""<a href="https://mail.google.com/">gmail</a>""",
- """<a href="https://mail.yahoo.com/">yahoo</a>""",
- """<a href="mailto:bridges@xxxxxxxxxxxxxxxxxxxxxx">
- bridges@xxxxxxxxxxxxxxxxxxxxxx</a>""")}</p>
+ <h4>${_(strings.OTHER_DISTRIBUTORS[0])}</h4>
+ <p>
+ ${_(strings.OTHER_DISTRIBUTORS[1]) % \
+ ("""<a href="mailto:bridges@xxxxxxxxxxxxxx">bridges@xxxxxxxxxxxxxx</a>""",
+ """<a href="https://mail.google.com/">Gmail</a>""",
+ """<a href="https://mail.yahoo.com/">Yahoo</a>""")}
+ </p>
+
+ <h4>${_(strings.HELP[0])}</h4>
+ <p>
+ ${_(strings.HELP[1]) % \
+ ("""<a href="mailto:help@xxxxxxxxxxxxxxxxx">help@xxxxxxxxxxxxxxxxx</a>""")}
+ ${_(strings.HELP[2])}
+ </p>
- <h4>${_("My bridges don't work! I need help!")}</h4>
- <p>${_("If your Tor doesn't work, you should email %s. Try including as "
- "much info about your case as you can, including the list of "
- "bridges you used, the bundle filename/version you used, the "
- "messages that Tor gave out, etc.") \
- % ("""<a href="mailto:help@xxxxxxxxxxxxxxxxx">
- help@xxxxxxxxxxxxxxxxx</a>""")}</p>
</div>
</div>
<hr>
@@ -91,11 +90,11 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
<p>
<a href="https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywords=bridgedb-reportbug&cc=isis&owner=isis">${_("Report a Bug")}</a>
·
- <a href="https://gitweb.torproject.org/bridgedb.git/blob_plain/HEAD:/CHANGELOG">
- ${_("Change Log")}</a>
- ·
<a href="https://gitweb.torproject.org/bridgedb.git">${_("Source Code")}</a>
·
+ <a href="https://gitweb.torproject.org/bridgedb.git/blob/HEAD:/CHANGELOG">
+ ${_("Changelog")}</a>
+ ·
<a href="mailto:help@xxxxxxxxxxxxxxxxx">${_("Contact")}</a>
·
<a href="../keys">${_("Public Keys")}</a>
diff --git a/lib/bridgedb/templates/bridges.html b/lib/bridgedb/templates/bridges.html
index 4058d54..1dcb474 100644
--- a/lib/bridgedb/templates/bridges.html
+++ b/lib/bridgedb/templates/bridges.html
@@ -7,7 +7,7 @@
style="width: 98%; align: center; margin: auto;">
<div class="container-fluid"
style="padding: 2%">
- <h2>${_("Bridges")}</h2>
+ <h2>${_(strings.BRIDGES[0])}</h2>
</div>
</div>
@@ -25,37 +25,28 @@ ${answer}
style="width: 100%; align: center; margin: auto;">
<div class="panel panel-primary">
<div class="panel-heading">
- <h3 class="panel-title">${_("""How to start using your bridges""")}</h3>
+ <h3 class="panel-title">${_(strings.HOWTO_TBB[0])}</h3>
</div>
<br />
<div class="container-fluid" id="howto" style="align-content: left;">
<p>
-${_("""To enter bridges into %s, follow the instructions on the""" \
- """ %s %s download page %s to start %s.""") % \
- ("""Tor Browser""",
- """<a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-beta" target="_blank">""",
- """Tor Browser""", """</a>""", """Tor Browser""")}
-${_("""When the "Tor Network Settings" dialogue pops up,""" \
- """ click "Configure" and follow the wizard until it asks:""")}
+ ${_(strings.HOWTO_TBB[1]) % \
+ ("""<a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-beta"
+ target="_blank">""",
+ """</a>""")}
+ ${_(strings.HOWTO_TBB[2])}
</p>
<br />
<div class="bs-component">
<blockquote>
<p>
-${_(""" Does your Internet Service Provider (ISP) block or""" \
- """ otherwise censor connections to the Tor Network?""")}
+ ${_(strings.HOWTO_TBB[3])}
</p>
</blockquote>
</div>
<p>
-${_(""" Select "Yes" and click "Next" in order to configure your""" \
- """ new bridges. Select "Enter custom bridges", and copy and""" \
- """ paste the bridges lines shown above into the text input""" \
- """ box. Finally, click "Connect", and you should be good""" \
- """ to go! If you experience trouble, try clicking""" \
- """ the "Help" button in the "Tor Network Settings" wizard for""" \
- """ further assistance.""")}
+ ${_(strings.HOWTO_TBB[4])}
</p>
</div>
</div>
@@ -67,6 +58,10 @@ ${_(""" Select "Yes" and click "Next" in order to configure your""" \
<p style="text-align: center; font-size: 115%;">
<br />
<strong>
+## TRANSLATORS: Please translate this into some silly way to say
+## "There was a problem!" in your language. For example,
+## for Italian, you might translate this into "Mama mia!",
+## or for French: "Sacrebleu!". :)
<em class="primary">${_("""Uh oh, spaghettios!""")}</em>
</strong>
<br />
diff --git a/lib/bridgedb/templates/captcha.html b/lib/bridgedb/templates/captcha.html
index 9f62258..ab605e9 100644
--- a/lib/bridgedb/templates/captcha.html
+++ b/lib/bridgedb/templates/captcha.html
@@ -11,51 +11,51 @@
<div class="box" style="padding: 5% 15% 5% 15%;">
<p style="align: center;">
<img width="400" height="125"
- alt="${_('Your browser is not displaying images properly.')}"
+ alt="${_(strings.CAPTCHA[0])}"
src="${imgstr}" />
</p>
<div class="box"
style="align: center; width: 50% margin: auto;">
- <form class="bs-component"
- id="captchaSubmission"
- action=""
- method="POST">
- <fieldset>
- <div class="form-group">
- <!--style="width: 100%; align: center;">-->
- <div class="input-group" style="height: 60%;">
- <input type="hidden"
- form="captchaSubmission"
- name="captcha_challenge_field"
- id="captcha_challenge_field"
- value="${challenge_field}"></input>
- <input class="form-control"
- form="captchaSubmission"
- name="captcha_response_field"
- id="captcha_response_field"
- value=""
- autocomplete="off"
- type="text"
- placeholder="${_('Enter the characters from the image above...')}"
- accesskey="t" autofocus ></input>
- <span class="input-group-btn">
- <button class="btn btn-primary"
- form="captchaSubmission"
- type="submit"
- name="submit"
- value="submit"
- accesskey="s">
- <i class="icon-level-down icon-rotate-90"></i>
- </button></span>
- <!--formaction=""
- formmethod="post"
- formenctype="text/plain"-->
- <!--${_("%sS%submit") % ("""<u>""", """</u>""")}-->
+ <div class="container-fluid"
+ style="width: 98%; align: center; padding: 1%;">
+ <form class="bs-component"
+ id="captchaSubmission"
+ action=""
+ method="POST">
+ <fieldset>
+ <div class="form-group">
+ <!--style="width: 100%; align: center;">-->
+ <div class="input-group" style="height: 60%;">
+ <input type="hidden"
+ form="captchaSubmission"
+ name="captcha_challenge_field"
+ id="captcha_challenge_field"
+ value="${challenge_field}"></input>
+ <input class="form-control"
+ form="captchaSubmission"
+ name="captcha_response_field"
+ id="captcha_response_field"
+ value=""
+ autocomplete="off"
+ type="text"
+ placeholder="${_(strings.CAPTCHA[1])}"
+ accesskey="t" autofocus ></input>
+ <span class="input-group-btn">
+ <button class="btn btn-primary"
+ form="captchaSubmission"
+ type="submit"
+ name="submit"
+ value="submit"
+ accesskey="s">
+ <i class="icon-level-down icon-rotate-90"></i>
+ </button>
+ </span>
+ </div>
</div>
- </div>
- </fieldset>
- </form>
+ </fieldset>
+ </form>
+ </div>
</div>
</div>
</div>
diff --git a/lib/bridgedb/templates/howto.html b/lib/bridgedb/templates/howto.html
index b143741..705d774 100644
--- a/lib/bridgedb/templates/howto.html
+++ b/lib/bridgedb/templates/howto.html
@@ -10,37 +10,28 @@
padding-top: 10%; padding-left: 5%; padding-right: 5%;">
<div class="panel panel-primary">
<div class="panel-heading">
- <h3 class="panel-title">${_("""How to start using your bridges""")}</h3>
+ <h3 class="panel-title">${_(strings.HOWTO_TBB[0])}</h3>
</div>
<br />
<div class="container-fluid" id="howto" style="align-content: left;">
<p>
-${_("""To enter bridges into %s, follow the instructions on the""" \
- """ %s %s download page %s to start %s.""") % \
- ("""Tor Browser""",
- """<a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-beta" target="_blank">""",
- """Tor Browser""", """</a>""", """Tor Browser""")}
-${_("""When the "Tor Network Settings" dialogue pops up,""" \
- """ click "Configure" and follow the wizard until it asks:""")}
+ ${_(strings.HOWTO_TBB[1]) % \
+ ("""<a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-beta"
+ target="_blank">""",
+ """</a>""")}
+ ${_(strings.HOWTO_TBB[2])}
</p>
<br />
<div class="bs-component">
<blockquote>
<p>
-${_(""" Does your Internet Service Provider (ISP) block or""" \
- """ otherwise censor connections to the Tor Network?""")}
+ ${_(strings.HOWTO_TBB[3])}
</p>
</blockquote>
</div>
<p>
-${_(""" Select "Yes" and click "Next" in order to configure your""" \
- """ new bridges. Select "Enter custom bridges", and copy and""" \
- """ paste the bridges lines shown above into the text input""" \
- """ box. Finally, click "Connect", and you should be good""" \
- """ to go! If you experience trouble, try clicking""" \
- """ the "Help" button in the "Tor Network Settings" wizard for""" \
- """ further assistance.""")}
+ ${_(strings.HOWTO_TBB[4])}
</p>
</div>
</div>
diff --git a/lib/bridgedb/templates/index.html b/lib/bridgedb/templates/index.html
index 21a5281..09ef237 100644
--- a/lib/bridgedb/templates/index.html
+++ b/lib/bridgedb/templates/index.html
@@ -10,7 +10,7 @@
<span class="step-title">
${_("Step %s1%s") % ("""<u>""", """</u>""")}</span>
<span style="margin-left: 20px; margin-right: 20px;">
- ${_("Download the %s Tor Browser Bundle %s") % \
+ ${_("Download %s Tor Browser %s") % \
("""<a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-beta"
target="_blank" accesskey="1">""",
"""</a>""")}</span>
@@ -35,9 +35,8 @@
<span class="step-title">
${_("Step %s3%s") % ("""<u>""", """</u>""")}</span>
<span style="margin-left: 20px; margin-right: 20px;">
- ${_("""Now %s add the bridges to Tor %s""") % \
- ("""<a href="/howto"
- target="_blank" accesskey="3">""",
+ ${_("""Now %s add the bridges to Tor Browser %s""") % \
+ ("""<a href="/howto" accesskey="3">""",
"""</a>""")}</span>
</span>
</div>
diff --git a/lib/bridgedb/templates/options.html b/lib/bridgedb/templates/options.html
index c25e418..368077e 100644
--- a/lib/bridgedb/templates/options.html
+++ b/lib/bridgedb/templates/options.html
@@ -7,30 +7,22 @@
style="width: 96%; align: center; margin: 2%">
<div class="container-fluid" style="padding: 2%">
<p>
- <h2>${_("""Get Bridges!""")}</h2>
+ <h2>${_(strings.BRIDGES[1])}</h2>
</p>
</div>
<div class="container-fluid"
style="width: 100%; align: center; padding: 2%;">
<p>
- ${_(" BridgeDB can provide bridges with several %s types of %s, which can"
- " help obfuscate your connections to the Tor Network, making it more"
- " difficult for anyone watching your internet traffic to determine"
- " that you are using Tor.") % \
+ ${_(strings.WELCOME[0]) % \
("""<a href="https://www.torproject.org/docs/pluggable-transports.html">""",
- """Pluggable Transports</a>""")}
+ """</a>""")}
</p>
<p>
- ${_("Some bridges with IPv6 addresses are also available, though some"
- " %s aren't IPv6 compatible.") % \
- ("""Pluggable Transports""")}
+ ${_(strings.WELCOME[1])}
</p>
+## The '—' char is a literal emdash ('â??'), but it's also XML parseable.
<p>
- ${_(" Additionally, BridgeDB has plenty of plain-ol'-vanilla bridges %s"
- " without any %s %s which maybe doesn't sound as cool, but they can"
- " still help to circumvent internet censorship in many cases.") % \
- ("""—""", """Pluggable Transports""", """—""")}
-<!-- The '—' char is a literal emdash ('â??'), but it's also XML parseable. -->
+ ${_(strings.WELCOME[2]) % ("—", "—")}
</p>
<div class="container-fluid" style="align: center: margin: 2%;">
<div style="align: center; padding: 5%;">
@@ -39,10 +31,11 @@
<button class="btn btn-success btn-lg btn-block"
type="button"
accesskey="j">
- <!-- TRANSLATORS: Please ignore the '%s' surrounding single
- letters at the beginning of words. These are used for
- underlining HTML5 accesskeys, for assisting users in
- selecting elements. -->
+## TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+## beginning of words are present in your final translation. Thanks!
+## (These are used to insert HTML5 underlining tags, to mark accesskeys
+## for disabled users.)
+## TRANSLATORS: Please do NOT translate the word "bridges"!
${_("""%sJ%sust give me bridges!""") % ("""<u>""", """</u>""")}
</button>
</a>
@@ -66,7 +59,7 @@
<div class="container-fluid" id="instructions" style="align-content: left;">
<legend style="font-size: 112%">
<br />
- <p>${_("""Please select options for bridge type:""")}</p>
+ <p>${_(strings.OPTIONS[0])}</p>
</legend>
</div>
@@ -82,7 +75,7 @@
<label class="control-label"
for="transport"
style="text-align: inherit;">
- ${_("""Do you need a %s?""") % ("""Pluggable <u>T</u>ransport""")}
+ ${_(strings.OPTIONS[2]) % ("Pluggable <u>T</u>ransport")}
</label>
<div class="container-fluid col-lg-4">
<div class="btn-group" style="float: left; padding: 2%;">
@@ -95,8 +88,6 @@
accesskey="t">
${_("""No""")}
<option label="none" value="0" >${_("none")}</option>
-<!-- TRANSLATORS: Please do not translate the pluggable transport names --
- -- (obfs2, obfs3, etc) -->
<option label="obfs2" value="obfs2" >obfs2</option>
<option label="obfs3" value="obfs3" selected >obfs3</option>
<option label="scramblesuit" value="scramblesuit">scramblesuit</option>
@@ -105,7 +96,6 @@
-- "fteproxy" likely has more "brandname recognition" due to --
-- https://fteproxy.org/ -->
<option label="fte" value="fte" disabled >fteproxy</option>
-<option label="meek" value="meek" disabled >meek</option>
</select>
</div>
</div>
@@ -122,7 +112,7 @@
<label class="control-label"
for="ipv6"
style="text-align: inherit;">
- ${_("""Do you need IPv6 addresses?""")}
+ ${_(strings.OPTIONS[1])}
</label>
<div class="container-fluid col-lg-4">
<div class="checkbox"
@@ -135,9 +125,10 @@
type="checkbox"
value="yes"
accesskey="y" />
- <!-- TRANSLATORS: Translate "Yes!" as in "Yes! I do
- need IPv6 addresses". -->
- ${_("""%sY%ses!""") % ("""<u>""", """</u>""")}
+## TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+## beginning of words are present in your final translation. Thanks!
+## TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
+ ${_("""%sY%ses!""") % ("<u>", "</u>")}
</div>
</div>
</div>
@@ -158,7 +149,10 @@
<p>
<button class="btn btn-primary btn-lg btn-block"
accesskey="g">
- ${_("""%sG%set Bridges""") % ("""<u>""", """</u>""")}
+## TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+## beginning of words are present in your final translation. Thanks!
+## TRANSLATORS: Please do NOT translate the word "bridge"!
+ ${_("""%sG%set Bridges""") % ("<u>", "</u>")}
</button>
</p>
</div>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits