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

5
pyi2phosts/templates/browse.html

@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
{% extends "base.html" %}
{% load i18n %}
{% 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>
{% endblock %}
{% block content %}
<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 %}
<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>

17
pyi2phosts/templates/faq.html

@ -1,19 +1,21 @@ @@ -1,19 +1,21 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h3>How we are learning about new hosts</h3>
<h3>{% trans "How we are learning about new hosts" %}</h3>
<ol>
<li>Pulling from external sources:
<li>{% trans "Pulling from external sources:" %}
<ul>
{% for source in sources_list %}
<li>{{ source.url }}</li>
{% endfor %}
</ul>
</li>
<li>Adding through our service.
<li>{% trans "Adding through our service." %}
</li>
</ol>
{% blocktrans %}
<h3>Publishing requirements</h3>
To get published a host must meet the following criteria:
<ul>
@ -24,7 +26,9 @@ To get published a host must meet the following criteria: @@ -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
order to eliminate possible hijacking and mass registration attempts.
</p>
{% endblocktrans %}
{% blocktrans %}
<h3>Expiration</h3>
<p>
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 @@ -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
again.
</p>
{% endblocktrans %}
{% blocktrans %}
<h3>Deletion of expired hosts</h3>
<p>
Hosts expired 2 years ago get completely deleted from our database and become
available for a new registration.
</p>
{% endblocktrans %}
{% blocktrans %}
<h3>Deletion of dead hosts</h3>
<p>
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 @@ -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
through our service, we only grant them such a short grace period.
</p>
{% endblocktrans %}
{% endblock %}

28
pyi2phosts/templates/index.html

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% url faq as faq_url %}
{% blocktrans %}
<h2>About</h2>
<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
@ -8,8 +11,9 @@ @@ -8,8 +11,9 @@
I2P naming works in the <a href=http://www.i2p2.i2p/naming.html>official
docs</a>.
</p>
<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>
If you have any questions, feel free to ask <a href="http://forum.i2p/viewtopic.php?t=5083">here</a>
@ -17,7 +21,9 @@ @@ -17,7 +21,9 @@
using <em>uxGqmWz4HxLqjPVm7eSGGRqaGInm5hh8lZYubYdUX4Cih4Qhna2tSSMrupbWdDj80zDNoXvBc-le0GsywgVulw</em>
identity.
</p>
{% endblocktrans %}
{% blocktrans %}
<h2>Addressbook service</h2>
<p>
To start getting new hostnames from {{ title }}, add this
@ -26,25 +32,31 @@ @@ -26,25 +32,31 @@
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.
</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>
{{ title }} also provides a jump service. For accessing hosts through it,
use urls like
<a href="{% url pyi2phosts.jump.views.jumper 'example.i2p' %}">
http://{{ domain }}{% url pyi2phosts.jump.views.jumper "example.i2p" %}</a>.
<a href="{{ jump_url }}">
http://{{ domain }}{{ jump_url }}</a>.
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> 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>
{% endblocktrans %}
{% url pyi2phosts.postkey.views.addkey as addkey_url %}
{% blocktrans %}
<h2>Registration service</h2>
<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>
{% endblocktrans %}
{% endblock %}
{% block footer-addon %}
<a href=http://{{ b32 }}>b32</a> |
<a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>
add</a> |
<a href=http://{{ b32 }}>b32</a> | <a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>{% trans "add" %}</a> |
{% endblock %}

5
pyi2phosts/templates/jump-error.html

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

3
pyi2phosts/templates/jump-unknown.html

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

3
pyi2phosts/templates/jump.html

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

5
pyi2phosts/templates/latest.html

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
{% extends "browse.html" %}
{% load i18n %}
{% 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>
{% endblock %}

24
pyi2phosts/templates/policy.html

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

5
pyi2phosts/templates/postkey.html

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

3
pyi2phosts/templates/search_results.html

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

4
pyi2phosts/templates/subdomain_http_verify.html

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% blocktrans %}
<p>
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
@ -11,6 +13,8 @@ Unfortunately, we can verify a 2nd-level domain ownage only via http, so if you' @@ -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.
This file should be accessible via http://{{ topdomain }}/&laquo;filename&raquo; (without quotes).
</p>
{% endblocktrans %}
<form action="/postkey/subdomain/" method="post">
{% csrf_token %}
{{ form.as_p }}

3
pyi2phosts/templates/subdomain_http_verify_failure.html

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

6
pyi2phosts/templates/success_submission.html

@ -1,5 +1,9 @@ @@ -1,5 +1,9 @@
{% extends "base.html" %}
{% load i18n %}
{% 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 %}

Loading…
Cancel
Save