Browse Source

Add translation tags into all templates

Also update success_submission.html a little.
pull/1/head
Hidden Z 14 years ago
parent
commit
e3416c090e
  1. 18
      pyi2phosts/templates/base.html
  2. 5
      pyi2phosts/templates/browse.html
  3. 17
      pyi2phosts/templates/faq.html
  4. 30
      pyi2phosts/templates/index.html
  5. 5
      pyi2phosts/templates/jump-error.html
  6. 3
      pyi2phosts/templates/jump-unknown.html
  7. 3
      pyi2phosts/templates/jump.html
  8. 5
      pyi2phosts/templates/latest.html
  9. 24
      pyi2phosts/templates/policy.html
  10. 5
      pyi2phosts/templates/postkey.html
  11. 3
      pyi2phosts/templates/search_results.html
  12. 4
      pyi2phosts/templates/subdomain_http_verify.html
  13. 3
      pyi2phosts/templates/subdomain_http_verify_failure.html
  14. 6
      pyi2phosts/templates/success_submission.html

18
pyi2phosts/templates/base.html

@ -1,3 +1,5 @@
{% load i18n %}
<html> <html>
<title> <title>
{% block title %} {% block title %}
@ -12,21 +14,21 @@
<body> <body>
<div class="search_host"> <div class="search_host">
<form action="/search/"> <form action="/search/">
<input class="input" name="q" maxlength="67" type="text" value="Search host" <input class="input" name="q" maxlength="67" type="text" value="{% trans "Search host" %}"
onblur="if (value == '') {value = 'Search host'}" onfocus="if (value == 'Search host') onblur="if (value == '') {value = '{% trans "Search host" %}'}" onfocus="if (value == '{% trans "Search host" %}')
{value =''}" /> {value =''}" />
<input type="submit" value="Search" /> <input type="submit" value="{% trans "Search" %}" />
</form> </form>
</div> </div>
{% block navigation %} {% block navigation %}
<div class="menu"> <div class="menu">
<ul> <ul>
<li><a href=/>Home</a></li> <li><a href=/>{% trans "Home" %}</a></li>
<li><a href={% url faq %}>FAQ</a></li> <li><a href={% url faq %}>FAQ</a></li>
<li><a href={% url browse %}>Browse alive hosts</a></li> <li><a href={% url browse %}>{% trans "Browse alive hosts" %}</a></li>
<li><a href={% url latest %}>Browse latest hosts</a></li> <li><a href={% url latest %}>{% trans "Browse latest hosts" %}</a></li>
<li><a href={% url pyi2phosts.postkey.views.addkey %}>Register a domain</a></li> <li><a href={% url pyi2phosts.postkey.views.addkey %}>{% trans "Register a domain" %}</a></li>
</ul> </ul>
</div> </div>
@ -54,7 +56,7 @@
<div class="footer"> <div class="footer">
{% block footer-addon %} {% block footer-addon %}
{% endblock %} {% endblock %}
powered-by: <a href=http://py-i2phosts.i2p/>py-i2phosts</a> {% trans "powered-by" %}: <a href=http://py-i2phosts.i2p/>py-i2phosts</a>
</div> </div>
{% endblock %} {% endblock %}
</body> </body>

5
pyi2phosts/templates/browse.html

@ -1,13 +1,14 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block header %} {% block header %}
<h3>All active hosts in I2P <h3>{% trans "All active hosts in I2P" %}
<a href={% url browse-rss %}><img src="/static/rss-grey-18.png" border="0" width="18" height="18" alt="rss"></a></h3> <a href={% url browse-rss %}><img src="/static/rss-grey-18.png" border="0" width="18" height="18" alt="rss"></a></h3>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<table> <table>
<tr><td>Host</td><td>Last seen</td><td>Date added</td><td>Description</td></tr> <tr><td>{% trans "Host" %}</td><td>{% trans "Last seen" %}</td><td>{% trans "Date added" %}</td><td>{% trans "Description" %}</td></tr>
{% for host in host_list %} {% for host in host_list %}
<tr><td><a href="http://{{ host.name }}/?i2paddresshelper={{host.b64hash}}">{{ host.name }}</a></td><td>{{ host.last_seen }}</td> <tr><td><a href="http://{{ host.name }}/?i2paddresshelper={{host.b64hash}}">{{ host.name }}</a></td><td>{{ host.last_seen }}</td>
<td>{{ host.date_added }}</td><td>{{ host.description }}</td></tr> <td>{{ host.date_added }}</td><td>{{ host.description }}</td></tr>

17
pyi2phosts/templates/faq.html

@ -1,19 +1,21 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
<h3>How we are learning about new hosts</h3> <h3>{% trans "How we are learning about new hosts" %}</h3>
<ol> <ol>
<li>Pulling from external sources: <li>{% trans "Pulling from external sources:" %}
<ul> <ul>
{% for source in sources_list %} {% for source in sources_list %}
<li>{{ source.url }}</li> <li>{{ source.url }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>
<li>Adding through our service. <li>{% trans "Adding through our service." %}
</li> </li>
</ol> </ol>
{% blocktrans %}
<h3>Publishing requirements</h3> <h3>Publishing requirements</h3>
To get published a host must meet the following criteria: To get published a host must meet the following criteria:
<ul> <ul>
@ -24,7 +26,9 @@ To get published a host must meet the following criteria:
<p style="notice">Admin's approval isn't really necessary, it is only needed in <p style="notice">Admin's approval isn't really necessary, it is only needed in
order to eliminate possible hijacking and mass registration attempts. order to eliminate possible hijacking and mass registration attempts.
</p> </p>
{% endblocktrans %}
{% blocktrans %}
<h3>Expiration</h3> <h3>Expiration</h3>
<p> <p>
Hosts gets checked for availability every 12 hours. If the host is alive, registration period Hosts gets checked for availability every 12 hours. If the host is alive, registration period
@ -35,13 +39,17 @@ When a host has expired, its name/key pair will be keept for 2 years but will no
published any longer. Until this period ends, it's impossible to register this hostname published any longer. Until this period ends, it's impossible to register this hostname
again. again.
</p> </p>
{% endblocktrans %}
{% blocktrans %}
<h3>Deletion of expired hosts</h3> <h3>Deletion of expired hosts</h3>
<p> <p>
Hosts expired 2 years ago get completely deleted from our database and become Hosts expired 2 years ago get completely deleted from our database and become
available for a new registration. available for a new registration.
</p> </p>
{% endblocktrans %}
{% blocktrans %}
<h3>Deletion of dead hosts</h3> <h3>Deletion of dead hosts</h3>
<p> <p>
If a host was added from an external source and we've never seen it alive, it If a host was added from an external source and we've never seen it alive, it
@ -49,4 +57,7 @@ will be deleted after 1 year since its adding date, and after 14 days if it is
was added through our registration service. Since these hosts were not published was added through our registration service. Since these hosts were not published
through our service, we only grant them such a short grace period. through our service, we only grant them such a short grace period.
</p> </p>
{% endblocktrans %}
{% endblock %} {% endblock %}

30
pyi2phosts/templates/index.html

@ -1,6 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
{% url faq as faq_url %}
{% blocktrans %}
<h2>About</h2> <h2>About</h2>
<p>{{ title }} is a domain name registration service for I2P. Hostnames in I2P aren't <p>{{ title }} is a domain name registration service for I2P. Hostnames in I2P aren't
globally unique. {{ title }} doesn't act as "central authority", it only provides a globally unique. {{ title }} doesn't act as "central authority", it only provides a
@ -8,8 +11,9 @@
I2P naming works in the <a href=http://www.i2p2.i2p/naming.html>official I2P naming works in the <a href=http://www.i2p2.i2p/naming.html>official
docs</a>. docs</a>.
</p> </p>
<p>To find out how we're registering and publishing hosts, look at <p>To find out how we're registering and publishing hosts, look at
<a href={% url faq %}>FAQ</a> page. <a href={{ faq_url }}>FAQ</a> page.
</p> </p>
<p> <p>
If you have any questions, feel free to ask <a href="http://forum.i2p/viewtopic.php?t=5083">here</a> If you have any questions, feel free to ask <a href="http://forum.i2p/viewtopic.php?t=5083">here</a>
@ -17,7 +21,9 @@
using <em>uxGqmWz4HxLqjPVm7eSGGRqaGInm5hh8lZYubYdUX4Cih4Qhna2tSSMrupbWdDj80zDNoXvBc-le0GsywgVulw</em> using <em>uxGqmWz4HxLqjPVm7eSGGRqaGInm5hh8lZYubYdUX4Cih4Qhna2tSSMrupbWdDj80zDNoXvBc-le0GsywgVulw</em>
identity. identity.
</p> </p>
{% endblocktrans %}
{% blocktrans %}
<h2>Addressbook service</h2> <h2>Addressbook service</h2>
<p> <p>
To start getting new hostnames from {{ title }}, add this To start getting new hostnames from {{ title }}, add this
@ -26,25 +32,31 @@
addressbook</a>. Of course, you should <a addressbook</a>. Of course, you should <a
href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>add INR</a>'s destination before. href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>add INR</a>'s destination before.
</p> </p>
{% endblocktrans %}
{% url pyi2phosts.jump.views.jumper 'example.i2p' as jump_url %}
{% url pyi2phosts.jump.views.index as jump_index %}
{% blocktrans %}
<h2>Jump service</h2><p> <h2>Jump service</h2><p>
{{ title }} also provides a jump service. For accessing hosts through it, {{ title }} also provides a jump service. For accessing hosts through it,
use urls like use urls like
<a href="{% url pyi2phosts.jump.views.jumper 'example.i2p' %}"> <a href="{{ jump_url }}">
http://{{ domain }}{% url pyi2phosts.jump.views.jumper "example.i2p" %}</a>. http://{{ domain }}{{ jump_url }}</a>.
I2P since 0.8.3 gives possibility to add a custom jump-servers. Go to the i2ptunnel I2P since 0.8.3 gives possibility to add a custom jump-servers. Go to the i2ptunnel
<a href="http://localhost:7657/i2ptunnel/edit?tunnel=0">eeproxy configuration page <a href="http://localhost:7657/i2ptunnel/edit?tunnel=0">eeproxy configuration page
</a> and add <em>http://{{ domain }}{% url pyi2phosts.jump.views.index %}</em> to "Jump URL List" section. </a> and add <em>http://{{ domain }}{{ jump_index }}</em> to "Jump URL List" section.
</p> </p>
{% endblocktrans %}
{% url pyi2phosts.postkey.views.addkey as addkey_url %}
{% blocktrans %}
<h2>Registration service</h2> <h2>Registration service</h2>
<p>If you are running an eepsite or another service and want a human-readable domain name <p>If you are running an eepsite or another service and want a human-readable domain name
for them, consider <a href={% url pyi2phosts.postkey.views.addkey %}>registering it</a>. for them, consider <a href={{ addkey_url }}>registering it</a>.
</p> </p>
{% endblocktrans %}
{% endblock %} {% endblock %}
{%block footer-addon %} {% block footer-addon %}
<a href=http://{{ b32 }}>b32</a> | <a href=http://{{ b32 }}>b32</a> | <a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>{% trans "add" %}</a> |
<a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>
add</a> |
{% endblock %} {% endblock %}

5
pyi2phosts/templates/jump-error.html

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
You are trying to access an invalid hostname. Maybe you're just mistyped it.<br> {% trans "You are trying to access an invalid hostname. Maybe you're just mistyped it." %}<br>
Error: {{ error }} {% trans "Error:" %} {{ error }}
{% endblock %} {% endblock %}

3
pyi2phosts/templates/jump-unknown.html

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
You are trying to access an unknown hostname. {% trans "You are trying to access an unknown hostname." %}
{% endblock %} {% endblock %}

3
pyi2phosts/templates/jump.html

@ -1,12 +1,15 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block head %} {% block head %}
<meta http-equiv="refresh" content="5;URL={{ url }}" /> <meta http-equiv="refresh" content="5;URL={{ url }}" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% blocktrans %}
<h3>Congratulations! We're found that host you're requesting. Redirecting in 5 secs...</h3> <h3>Congratulations! We're found that host you're requesting. Redirecting in 5 secs...</h3>
<p> <p>
We're suggesting to start use our subscription service. <a href=/>Find more...</a> We're suggesting to start use our subscription service. <a href=/>Find more...</a>
</p> </p>
{% endblocktrans %}
{% endblock %} {% endblock %}

5
pyi2phosts/templates/latest.html

@ -1,6 +1,9 @@
{% extends "browse.html" %} {% extends "browse.html" %}
{% load i18n %}
{% block header %} {% block header %}
<h3>Latest {{ hosts_count }} hosts added in {{ day_count }} days {% blocktrans %}
<h3>Latest {{ hosts_count }} hosts added in {{ day_count }} days</h3>
{% endblocktrans %}
<a href={% url latest-rss %}><img src="/static/rss-grey-18.png" border="0" width="18" height="18" alt="rss"></a></h3> <a href={% url latest-rss %}><img src="/static/rss-grey-18.png" border="0" width="18" height="18" alt="rss"></a></h3>
{% endblock %} {% endblock %}

24
pyi2phosts/templates/policy.html

@ -1,13 +1,15 @@
<h2>Domain name registration policy</h2> {% load i18n %}
<h2>{% trans "Domain name registration policy" %}</h2>
<ul> <ul>
<li>Domain name registration is free.</li> <li>{% trans "Domain name registration is free." %}</li>
<li>Anyone can register a domain name.</li> <li>{% trans "Anyone can register a domain name." %}</li>
<li>Domain names are available on a "first come, first serve" basis.</li> <li>{% trans "Domain names are available on a 'first come, first serve' basis." %}</li>
<li>A domain name's destination must be active. <li>{% trans "A domain name's destination must be active." %}
Inactive destinations cannot be published.</lI> {% trans "Inactive destinations cannot be published." %}</lI>
<li>Domain name hoarding through mass registration (cybersquatting) is not allowed.</li> <li>{% trans "Domain name hoarding through mass registration (cybersquatting) is not allowed." %}</li>
<li>Domain name registrations will not be rejected based on content.</li> <li>{% trans "Domain name registrations will not be rejected based on content." %}</li>
<li>Domain name registrations will stop propagating after some period of inactivity.</li> <li>{% trans "Domain name registrations will stop propagating after some period of inactivity." %}</li>
<li>Temporary or test sites should not be registered. Use b32 address instead.</li> <li>{% trans "Temporary or test sites should not be registered. Use b32 address instead." %}</li>
<li>Changing key for existing domains is prohibited.</li> <li>{% trans "Changing key for existing domains is prohibited." %}</li>
</ul> </ul>

5
pyi2phosts/templates/postkey.html

@ -1,11 +1,12 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
{% include "policy.html" %} {% include "policy.html" %}
<form action="/postkey/" method="post"> <form action="/postkey/" method="post">
{% csrf_token %} {% csrf_token %}
<h3>Enter your domain details</h3> <h3>{% trans "Enter your domain details" %}</h3>
{{ form.as_p }} {{ form.as_p }}
<input type="submit" value="Submit" /> <input type="submit" value="{% trans "Submit" %}" />
</form> </form>
{% endblock %} {% endblock %}

3
pyi2phosts/templates/search_results.html

@ -1,5 +1,6 @@
{% extends "browse.html" %} {% extends "browse.html" %}
{% load i18n %}
{% block header %} {% block header %}
<h3>Search results</h3> <h3>{% trans "Search results" %}</h3>
{% endblock %} {% endblock %}

4
pyi2phosts/templates/subdomain_http_verify.html

@ -1,6 +1,8 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
{% blocktrans %}
<p> <p>
You are trying to add a subdomain. Our policy permits subdomains registration only if you're own an You are trying to add a subdomain. Our policy permits subdomains registration only if you're own an
upper domain (2nd-level domain). Before subdomain will be added, we must ensure that you're own an upper-level upper domain (2nd-level domain). Before subdomain will be added, we must ensure that you're own an upper-level
@ -11,6 +13,8 @@ Unfortunately, we can verify a 2nd-level domain ownage only via http, so if you'
please run a webserver temporary. Create the following file in the webserver's document root and press "OK" button. please run a webserver temporary. Create the following file in the webserver's document root and press "OK" button.
This file should be accessible via http://{{ topdomain }}/&laquo;filename&raquo; (without quotes). This file should be accessible via http://{{ topdomain }}/&laquo;filename&raquo; (without quotes).
</p> </p>
{% endblocktrans %}
<form action="/postkey/subdomain/" method="post"> <form action="/postkey/subdomain/" method="post">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}

3
pyi2phosts/templates/subdomain_http_verify_failure.html

@ -1,8 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
<p> <p>
Verification failed. Webserver returned http code: {{ code }} {% trans "Verification failed. Webserver returned http code:" %} {{ code }}
</p> </p>
{% endblock %} {% endblock %}

6
pyi2phosts/templates/success_submission.html

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block content %} {% block content %}
Successfully added {{ hostname }}. It will be activated after admin's approval. {% blocktrans %}
Successfully added {{ hostname }}. It will be activated after admin's approval and
automatic availability test.
{% endblocktrans %}
{% endblock %} {% endblock %}

Loading…
Cancel
Save