Merge branch 'mandrag0ra-pu_translations'

This commit is contained in:
Thomas Waldmann 2014-06-07 00:45:27 +02:00
commit 55c06cb2ea
34 changed files with 3244 additions and 285 deletions

View File

@ -4,3 +4,7 @@ The nsupdate.info software is written and maintained by:
- Fabian Faessler <fabi@fabif.de> - Fabian Faessler <fabi@fabif.de>
- Thomas Waldmann <tw@waldmann-edv.de> - Thomas Waldmann <tw@waldmann-edv.de>
Contributions:
- mandrag0ra <mandrag0ra@icloud.com> (i18n code, french translation)

View File

@ -1,11 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<h2>User Profile of {{ request.user.username }}</h2> <h2>{% trans "User Profile of" %} {{ request.user.username }}</h2>
<hr /> <hr />
<form class="form-horizontal" role="form" method="post"> <form class="form-horizontal" role="form" method="post">
{% csrf_token %} {% csrf_token %}
@ -18,14 +17,14 @@
</form> </form>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<h3>Associate with remote Account</h3> <h3>{% trans "Associate with remote Account" %}</h3>
{% for backend in backends.not_associated %} {% for backend in backends.not_associated %}
<form method="get" action="{% url 'social:begin' backend %}" <form method="get" action="{% url 'social:begin' backend %}"
style="display: inline-block;"> style="display: inline-block;">
<button type="submit" class="btn btn-xs btn-success">{{ backend }}</button> <button type="submit" class="btn btn-xs btn-success">{{ backend }}</button>
</form> </form>
{% endfor %} {% endfor %}
<h3>Deassociate from remote Account</h3> <h3>{% trans "Deassociate from remote Account" %}</h3>
{% for socauth in backends.associated %} {% for socauth in backends.associated %}
<form method="post" action="{% url 'social:disconnect_individual' socauth.provider socauth.pk %}" <form method="post" action="{% url 'social:disconnect_individual' socauth.provider socauth.pk %}"
style="display: inline-block;"> style="display: inline-block;">

View File

@ -1,5 +1,5 @@
{% extends "registration/registration_base.html" %} {% extends "registration/registration_base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% url 'auth_login' as auth_login_url %} {% url 'auth_login' as auth_login_url %}
{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %} {% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,5 +1,5 @@
{% extends "registration/registration_base.html" %} {% extends "registration/registration_base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% block title %}Activation complete{% endblock %} {% block title %}Activation complete{% endblock %}
{% block content %} {% block content %}
<h1>Thanks, activation complete!</h1> <h1>Thanks, activation complete!</h1>

View File

@ -1,4 +1,4 @@
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% comment %} {% comment %}
This template is used for the html alternative of the activation email This template is used for the html alternative of the activation email
if you use a django-registration backend that looks for it. e.g. if you use a django-registration backend that looks for it. e.g.

View File

@ -1,2 +1,2 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}

View File

@ -1,5 +1,5 @@
{% extends "registration/registration_base.html" %} {% extends "registration/registration_base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% block title %}{% trans "Activation email sent" %}{% endblock %} {% block title %}{% trans "Activation email sent" %}{% endblock %}
{% block content %} {% block content %}
{% blocktrans %}An activation email has been sent. {% blocktrans %}An activation email has been sent.

View File

@ -1,43 +1,47 @@
{% extends "registration/registration_base.html" %} {% extends "registration/registration_base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% load bootstrap %} {% load bootstrap %}
{% block title %}{% trans "Register for an account" %}{% endblock %} {% block title %}{% trans "Register for an account" %}{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<h2>No registration required for testing</h2> <h2>{% trans "No registration required for testing" %}</h2>
<p> <p>
You can easily test the service and see what you get. {% trans "You can easily test the service and see what you get." %}
</p> </p>
<p> <p>
Just directly log in as: {% trans "Just directly log in as:" %}
</p> </p>
<ul> <ul>
<li>username: test</li> <li>{% trans "username: test" %}</li>
<li>password: test</li> <li>{% trans "password: test" %}</li>
</ul> </ul>
<p> <p>
{% blocktrans %}
<b>Note:</b> if that doesn't work, the service administrator did not set up <b>Note:</b> if that doesn't work, the service administrator did not set up
the test account yet or discontinued offering it. In that case, you can the test account yet or discontinued offering it. In that case, you can
still just register a new account. still just register a new account.{% endblocktrans %}
</p> </p>
<h2>test account is <b>only</b> for testing</h2> <h2>{% blocktrans %}test account is <b>only</b> for testing{% endblocktrans %}</h2>
<p> <p>
{% blocktrans %}
Any data (hosts, domains, ...) entered using the test account might be removed Any data (hosts, domains, ...) entered using the test account might be removed
at any time and without prior notice. at any time and without prior notice.{% endblocktrans %}
</p> </p>
<p> <p>
{% blocktrans %}
So if you'ld like your stuff to stay, please register for a regular account after So if you'ld like your stuff to stay, please register for a regular account after
finishing your initial evaluation. finishing your initial evaluation.{% endblocktrans %}
</p> </p>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h2>Register new account</h2> <h2>{% trans "Register new account" %}</h2>
<p> <p>
{% blocktrans %}
Username: should be related to your <em>person or organisation</em> Username: should be related to your <em>person or organisation</em>
(not: to the host(s) you want to register).<br> (not: to the host(s) you want to register).<br>
E-Mail address: must be a <em>working</em> one, we'll send you an activation E-Mail there.<br> E-Mail address: must be a <em>working</em> one, we'll send you an activation E-Mail there.<br>
Password: please use a sane one, we trust you. Password: please use a sane one, we trust you.{% endblocktrans %}
</p> </p>
<form class="form-horizontal" role="form" method="post" action=""> <form class="form-horizontal" role="form" method="post" action="">
{% csrf_token %} {% csrf_token %}

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
{% block title %}{% trans 'Password change successful' %}{% endblock %} {% block title %}{% trans 'Password change successful' %}{% endblock %}
{% block content %} {% block content %}
<div class="alert alert-success"> <div class="alert alert-success">

View File

@ -1,97 +1,97 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<h1>About the {{ WWW_HOST }} service</h1> <h1>{% blocktrans %}About the {{ WWW_HOST }} service{% endblocktrans %}</h1>
<div class="col-lg-4"> <div class="col-lg-4">
<h2>What's this?</h2> <h2>{% trans "What's this?" %}</h2>
<p> <p>
{{ WWW_HOST }} is a <b>dynamic dns service</b>. {% blocktrans %}{{ WWW_HOST }} is a <b>dynamic dns service</b>.{% endblocktrans %}
</p> </p>
<p> <p>
You usually need it so your router (or other dyndns2-compatible {% blocktrans %}You usually need it so your router (or other dyndns2-compatible
client) can update a hostname, so you don't need to know or find client) can update a hostname, so you don't need to know or find
out your current IP address. out your current IP address.{% endblocktrans %}
</p> </p>
<p> <p>
{{ WWW_HOST }} is <b>simple, usable, free, friendly, secure and respects your privacy</b>. {% blocktrans %}{{ WWW_HOST }} is <b>simple, usable, free, friendly, secure and respects your privacy</b>.{% endblocktrans %}
</p> </p>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h2>Why another one?</h2> <h2>{% trans "Why another one?" %}</h2>
<p> <p>
As far as we know, there was no service yet that is <em>not</em>: {% blocktrans %}As far as we know, there was no service yet that is <em>not</em>:{% endblocktrans %}
</p> </p>
<ul> <ul>
<li>nagging its users to make a paid subscription</li> <li>{% trans "nagging its users to make a paid subscription" %}</li>
<li>annoying its users with advertisements or spam</li> <li>{% trans "annoying its users with advertisements or spam" %}</li>
<li>cancelling hosts or accounts after a short period of non-usage</li> <li>{% trans "cancelling hosts or accounts after a short period of non-usage" %}</li>
<li>hiding the few free features almost undiscoverably <li>{% blocktrans %}hiding the few free features almost undiscoverably
between a ton of commercial-only features</li> between a ton of commercial-only features{% endblocktrans %}</li>
</ul> </ul>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h2>How is it?</h2> <h2>{% trans "How is it?" %}</h2>
<p> <p>
You can just try it using the test account (see Register page). {% trans "You can just try it using the test account (see Register page)." %}
</p> </p>
<p> <p>
Also, we have {% blocktrans %}Also, we have
<a href="http://nsupdateinfo.readthedocs.org/" <a href="http://nsupdateinfo.readthedocs.org/"
title="Open docs in new window" target="_blank">documentation</a> &mdash; title="Open docs in new window" target="_blank">documentation</a> &mdash;
there might be some interesting stuff for you in it that is there might be some interesting stuff for you in it that is
not visible or obvious on the user interface. not visible or obvious on the user interface.{% endblocktrans %}
</p> </p>
<p>If you are interested in the software project, have a look at the <p>{% blocktrans %}If you are interested in the software project, have a look at the
<a href="https://github.com/nsupdate-info/nsupdate.info">nsupdate.info project on GitHub</a>. <a href="https://github.com/nsupdate-info/nsupdate.info">nsupdate.info project on GitHub</a>.{% endblocktrans %}
</p> </p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-4"> <div class="col-lg-4">
<h2>Fair use of the service</h2> <h2>{% trans "Fair use of the service" %}</h2>
<p> <p>
The only thing we expect from you is fair use of this service: {% trans "The only thing we expect from you is fair use of this service:" %}
</p> </p>
<ul> <ul>
<li>Don't abuse the service in any way.</li> <li>{% trans "Don't abuse the service in any way." %}</li>
<li>Don't update your hosts too often.</li> <li>{% trans "Don't update your hosts too often." %}</li>
<li>Don't do updates if your IP did not change.</li> <li>{% trans "Don't do updates if your IP did not change." %}</li>
<li>Don't create lots of users or lots of hosts.</li> <li>{% trans "Don't create lots of users or lots of hosts." %}</li>
<li>Don't use the service for any illegal or otherwise questionable purpose.</li> <li>{% trans "Don't use the service for any illegal or otherwise questionable purpose." %}</li>
<li>Don't spam us via e-mail.</li> <li>{% trans "Don't spam us via e-mail." %}</li>
</ul> </ul>
<p> <p>
We reserve the right to remove any account or hostname(s) that are {% blocktrans %}We reserve the right to remove any account or hostname(s) that are
related to unfair use of the service - at any time and without prior notice. related to unfair use of the service - at any time and without prior notice.{% endblocktrans %}
</p> </p>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h2>No warranties</h2> <h2>{% trans "No warranties" %}</h2>
<p> <p>
This is free software and a free service, there are no warranties. {% trans "This is free software and a free service, there are no warranties." %}
</p> </p>
<p> <p>
If it breaks, it breaks. {% trans "If it breaks, it breaks." %}
</p> </p>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h2>Service Contact</h2> <h2>{% trans "Service Contact" %}</h2>
<p> <p>
{{ SERVICE_CONTACT }} {{ SERVICE_CONTACT }}
</p> </p>
<p> <p>
Before contacting us via E-Mail, please read the docs, they exist for a reason. {% trans "Before contacting us via E-Mail, please read the docs, they exist for a reason." %}
</p> </p>
<h2>Software Project Contact</h2> <h2>{% trans "Software Project Contact" %}</h2>
<p> <p>
Visit the {% blocktrans %}Visit the
<a href="https://github.com/nsupdate-info/nsupdate.info">nsupdate.info project on GitHub</a> to: <a href="https://github.com/nsupdate-info/nsupdate.info">nsupdate.info project on GitHub</a> to:{% endblocktrans %}
</p> </p>
<ul> <ul>
<li>file issues on the issue tracker for bugs, ideas, patches.</li> <li>{% trans "file issues on the issue tracker for bugs, ideas, patches." %}</li>
<li>create pull requests for your contributions.</li> <li>{% trans "create pull requests for your contributions." %}</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -1,14 +1,14 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-lg-8"> <div class="col-lg-8">
<h3>Delete {{ object }}</h3> <h3>{% blocktrans %}Delete {{ object }}{% endblocktrans %}</h3>
<form action="" method="post"> <form action="" method="post">
{% csrf_token %} {% csrf_token %}
<p>Are you sure you want to delete "{{ object }}"?</p> <p>{% blocktrans %}Are you sure you want to delete "{{ object }}"?{% endblocktrans %}</p>
<button type="submit" class="btn btn-primary">Confirm</button> <button type="submit" class="btn btn-primary">{% trans "Confirm" %}</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,41 +1,41 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<h3>{{ domain.domain }} <br><small><a href="{% url 'domain_overview' %}"><i class="fa fa-angle-double-left"></i> back to overview</a></small></h3> <h3>{{ domain.domain }} <br><small><a href="{% url 'domain_overview' %}"><i class="fa fa-angle-double-left"></i> {% trans "back to overview" %}</a></small></h3>
<div class="col-md-8"> <div class="col-md-8">
<h3>Edit Domain</h3> <h3>{% trans "Edit Domain" %}</h3>
<p>You can't change the domain name. If you want to have another domain name, you have to delete this domain and create a new one.</p> <p>{% trans "You can't change the domain name. If you want to have another domain name, you have to delete this domain and create a new one." %}</p>
<p> <p>
Please note that update algorithm and update secret need to match. {% blocktrans %}Please note that update algorithm and update secret need to match.
Just create a new secret after submitting this form with a changed update algorithm. Just create a new secret after submitting this form with a changed update algorithm.{% endblocktrans %}
</p> </p>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Update</button> <button type="submit" class="btn btn-primary">{% trans "Update" %}</button>
</form> </form>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h3>Show Configuration</h3> <h3>{% trans "Show Configuration" %}</h3>
<p> <p>
We'll generate a ready-to-use configuration for your name server, {% blocktrans %}We'll generate a ready-to-use configuration for your name server,
filled out with all values (including a new secret). filled out with all values (including a new secret).{% endblocktrans %}
</p> </p>
<p class="text-warning"> <p class="text-warning">
We'll create a new shared secret - if you had one before, it will become invalid. {% blocktrans %}We'll create a new shared secret - if you had one before, it will become invalid.
You have to use the new secret in your name server configuration. You have to use the new secret in your name server configuration.{% endblocktrans %}
</p> </p>
<form action="{% url 'generate_ns_secret_view' domain.pk %}" method="get"> <form action="{% url 'generate_ns_secret_view' domain.pk %}" method="get">
<button type="submit" class="btn btn-primary btn-warning">Show Configuration</button> <button type="submit" class="btn btn-primary btn-warning">{% trans "Show Configuration" %}</button>
</form> </form>
<h3>Delete Domain</h3> <h3>{% trans "Delete Domain" %}</h3>
<p class="text-danger"> <p class="text-danger">
Deleting a domain is not undoable. If you need it back, you'll have to add it again and configure a new shared secret. {% trans "Deleting a domain is not undoable. If you need it back, you'll have to add it again and configure a new shared secret." %}
</p> </p>
<form method="get" action="{% url 'delete_domain' domain.pk %}"> <form method="get" action="{% url 'delete_domain' domain.pk %}">
<button type="submit" class="btn btn-primary btn-danger">Delete domain</button> <button type="submit" class="btn btn-primary btn-danger">{% trans "Delete domain" %}</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,18 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h3>Domains (yours first, then public)</h3> <h3>{% trans "Domains (yours first, then public)" %}</h3>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Domain</th> <th>{% trans "Domain" %}</th>
<th>Public?</th> <th>{% trans "Public?" %}</th>
<th>Available?</th> <th>{% trans "Available?" %}</th>
<th>Owner</th> <th>{% trans "Owner" %}</th>
<th>Comment</th> <th>{% trans "Comment" %}</th>
</tr> </tr>
</thead> </thead>
{% for domain in your_domains %} {% for domain in your_domains %}
@ -24,7 +24,7 @@
<td>{{ domain.comment }}</td> <td>{{ domain.comment }}</td>
</tr> </tr>
{% empty %} {% empty %}
<tr><td colspan="5">No domains from you yet.</td></tr> <tr><td colspan="5">{% trans "No domains from you yet." %}</td></tr>
{% endfor %} {% endfor %}
{% for domain in public_domains %} {% for domain in public_domains %}
<tr> <tr>
@ -35,7 +35,7 @@
<td>{{ domain.comment }}</td> <td>{{ domain.comment }}</td>
</tr> </tr>
{% empty %} {% empty %}
<tr><td colspan="5">No public domains from other users yet.</td></tr> <tr><td colspan="5">{% trans "No public domains from other users yet." %}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
@ -45,27 +45,27 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Add a new Domain</h3> <h3>{% trans "Add a new Domain" %}</h3>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Add</button> <button type="submit" class="btn btn-primary">{% trans "Add" %}</button>
</form> </form>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Help</h3> <h3>{% trans "Help" %}</h3>
<p> <p>
Here you can add new domains (zones) which you control (and this is only useful if you {% blocktrans %}Here you can add new domains (zones) which you control (and this is only useful if you
have some own zone which you can update automatically). have some own zone which you can update automatically).{% endblocktrans %}
</p> </p>
<p> <p>
You need to be able to configure the primary master nameserver of the zone so it accepts {% blocktrans %}You need to be able to configure the primary master nameserver of the zone so it accepts
dynamic updates (via RFC 2136 "dynamic update" protocol) if the correct update secret is presented. dynamic updates (via RFC 2136 "dynamic update" protocol) if the correct update secret is presented.{% endblocktrans %}
</p> </p>
<p> <p>
We'll show you configuration examples after you add a domain. {% trans "We'll show you configuration examples after you add a domain." %}
</p> </p>
</div> </div>
</div> </div>

View File

@ -1,22 +1,22 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="well"> <div class="well">
<h3>Nameserver Shared Secret Generated <small><br> <h3>{% trans "Nameserver Shared Secret Generated" %} <small><br>
<a href="{% url 'domain_overview' %}"><i class="fa fa-angle-double-left"></i> back to overview</a></small></h3> <a href="{% url 'domain_overview' %}"><i class="fa fa-angle-double-left"></i> {% trans "back to overview" %}</a></small></h3>
<p>New nameserver shared secret generated for you. Everytime you visit this page a new secret will be generated and the old one becomes invalid.</p> <p>{% trans "New nameserver shared secret generated for you. Everytime you visit this page a new secret will be generated and the old one becomes invalid." %}</p>
<p>Algorithm: <b>{{ object.get_bind9_algorithm }}</b></p> <p>{% trans "Algorithm:" %} <b>{{ object.get_bind9_algorithm }}</b></p>
<p>Secret: <b>{{ shared_secret }}</b></p> <p>{% trans "Secret:" %} <b>{{ shared_secret }}</b></p>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="well"> <div class="well">
<h3>How to configure your bind9 nameserver to accept dynamic DNS updates?</h3> <h3>{% trans "How to configure your bind9 nameserver to accept dynamic DNS updates?" %}</h3>
<pre> <pre>
// configuration snippet for bind 9 nameserver (put it into /etc/bind9/named.conf ) // configuration snippet for bind 9 nameserver (put it into /etc/bind9/named.conf )

View File

@ -1,19 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-lg-4"> <div class="col-lg-4">
<div class="well"> <div class="well">
<h3>Host Secret Generated <small><br> <h3>{% trans "Host Secret Generated" %} <small><br>
<a href="{% url 'overview' %}"><i class="fa fa-angle-double-left"></i> back to overview</a></small></h3> <a href="{% url 'overview' %}"><i class="fa fa-angle-double-left"></i> {% trans "back to overview" %}</a></small></h3>
<p>New secret generated for you. We store it hashed, so save it now, or you have to generate a new one again. Everytime you visit this page a new secret will be generated and the old one becomes invalid.</p> <p>{% blocktrans %}New secret generated for you. We store it hashed, so save it now, or you have to generate a new one again. Everytime you visit this page a new secret will be generated and the old one becomes invalid.{% endblocktrans %}</p>
<p>Secret: <b>{{ update_secret }}</b></p> <p>{% trans "Secret:" %} <b>{{ update_secret }}</b></p>
</div> </div>
</div> </div>
<div class="col-lg-8"> <div class="col-lg-8">
<div class="well"> <div class="well">
<h3>How to configure automated dynamic DNS updates?</h3> <h3>{% trans "How to configure automated dynamic DNS updates?" %}</h3>
{% include "main/includes/tabbed_router_configuration.html" with host=object %} {% include "main/includes/tabbed_router_configuration.html" with host=object %}
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% load static %} {% load static %}
{% block html_head %} {% block html_head %}
@ -9,39 +9,39 @@
{% block content %} {% block content %}
{% include "main/includes/home_top.html" %} {% include "main/includes/home_top.html" %}
<div class="jumbotron"> <div class="jumbotron">
<h4>Your current IP(s):</h4> <h4>{% trans "Your current IP(s):" %}</h4>
<h1>IPv4: <span id="ipv4">{{ request.session.ipv4 }}</span></h1> <h1>IPv4: <span id="ipv4">{{ request.session.ipv4 }}</span></h1>
<h3>IPv6: <span id="ipv6">{{ request.session.ipv6 }}</span></h3> <h3>IPv6: <span id="ipv6">{{ request.session.ipv6 }}</span></h3>
</div> </div>
{% include "main/includes/home_middle.html" %} {% include "main/includes/home_middle.html" %}
<div class="row"> <div class="row">
<div class="col-sm-12" style="text-align: center"> <div class="col-sm-12" style="text-align: center">
<h1>{{ WWW_HOST }} &mdash; the Dynamic DNS service you waited for.</h1> <h1>{{ WWW_HOST }} &mdash; {% trans "the Dynamic DNS service you waited for." %}</h1>
</div> </div>
<div class="col-sm-4" style="text-align: center"> <div class="col-sm-4" style="text-align: center">
<h1><i class="fa fa-thumbs-o-up fa-3x"></i></h1> <h1><i class="fa fa-thumbs-o-up fa-3x"></i></h1>
<h3>Free and Nice</h3> <h3>{% trans "Free and Nice" %}</h3>
<p> <p>
{{ WWW_HOST }} is a free service.<br> {{ WWW_HOST }} {% trans "is a free service." %}<br>
Also, we won't annoy you with ads or spam. {% trans "Also, we won't annoy you with ads or spam." %}
</p> </p>
</div> </div>
<div class="col-sm-4" style="text-align: center"> <div class="col-sm-4" style="text-align: center">
<h1><i class="fa fa-code fa-3x"></i></h1> <h1><i class="fa fa-code fa-3x"></i></h1>
<h3>Free and Open Source</h3> <h3>{% trans "Free and Open Source" %}</h3>
<p> <p>
nsupdate.info is free and open-source software. {% trans "nsupdate.info is free and open-source software." %}
</p> </p>
<p> <p>
<a href="https://github.com/nsupdate-info/nsupdate.info">nsupdate.info project on GitHub</a> <a href="https://github.com/nsupdate-info/nsupdate.info">{% trans "nsupdate.info project on GitHub" %}</a>
</p> </p>
</div> </div>
<div class="col-sm-4" style="text-align: center"> <div class="col-sm-4" style="text-align: center">
<h1><i class="fa fa-heart-o fa-3x"></i></h1> <h1><i class="fa fa-heart-o fa-3x"></i></h1>
<h3>Awesome Code</h3> <h3>{% trans "Awesome Code" %}</h3>
<p> <p>
Empowered by Python and Django,<br> {% blocktrans %}Empowered by Python and Django,<br>
we love to write clean and secure code. we love to write clean and secure code.{% endblocktrans %}
</p> </p>
</div> </div>
</div> </div>

View File

@ -1,67 +1,67 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<h3>{{ host.get_fqdn }} <br><small><a href="{% url 'overview' %}"><i class="fa fa-angle-double-left"></i> back to overview</a></small></h3> <h3>{{ host.get_fqdn }} <br><small><a href="{% url 'overview' %}"><i class="fa fa-angle-double-left"></i> {% trans "back to overview" %}</a></small></h3>
<div class="col-md-4"> <div class="col-md-4">
<h3>Edit Host</h3> <h3>{% trans "Edit Host" %}</h3>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Update</button> <button type="submit" class="btn btn-primary">{% trans "Update" %}</button>
</form> </form>
<h3>Delete Host</h3> <h3>{% trans "Delete Host" %}</h3>
<p class="text-danger"> <p class="text-danger">
Deleting a host is not undoable. If you need it back, you'll have to add it again and configure a new update secret. {% trans "Deleting a host is not undoable. If you need it back, you'll have to add it again and configure a new update secret." %}
</p> </p>
<form method="get" action="{% url 'delete_host' host.pk %}"> <form method="get" action="{% url 'delete_host' host.pk %}">
<button type="submit" class="btn btn-primary btn-danger">Delete host</button> <button type="submit" class="btn btn-primary btn-danger">{% trans "Delete host" %}</button>
</form> </form>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h3>Show Configuration</h3> <h3>{% trans "Show Configuration" %}</h3>
<p> <p>
We'll generate a ready-to-use configuration for your router / update {% blocktrans %}We'll generate a ready-to-use configuration for your router / update
client, filled out with all values (including a new secret). client, filled out with all values (including a new secret).{% endblocktrans %}
</p> </p>
<p class="text-warning"> <p class="text-warning">
We'll create a new secret - if you had one before, it will become invalid. {% blocktrans %}We'll create a new secret - if you had one before, it will become invalid.
You have to use the new secret in your router / update client configuration. You have to use the new secret in your router / update client configuration.{% endblocktrans %}
</p> </p>
<form action="{% url 'generate_secret_view' host.pk %}" method="get"> <form action="{% url 'generate_secret_view' host.pk %}" method="get">
<button type="submit" class="btn btn-primary btn-warning">Show Configuration</button> <button type="submit" class="btn btn-primary btn-warning">{% trans "Show Configuration" %}</button>
</form> </form>
<h3>Update other Services</h3> <h3>{% trans "Update other Services" %}</h3>
<p>We can send updates to other services when we receive an update from you.</p> <p>{% trans "We can send updates to other services when we receive an update from you." %}</p>
<form action="{% url 'updater_hostconfig_overview' host.pk %}" method="get"> <form action="{% url 'updater_hostconfig_overview' host.pk %}" method="get">
<button type="submit" class="btn btn-primary">Configure Updaters</button> <button type="submit" class="btn btn-primary">{% trans "Configure Updaters" %}</button>
</form> </form>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h3>Update Nameserver Records</h3> <h3>{% trans "Update Nameserver Records" %}</h3>
<p>Usually you configure your router to follow the dyndns2 protocol. <p>{% blocktrans %}Usually you configure your router to follow the dyndns2 protocol.
But if you know what you are doing, and you want to update manually, you can do it here. But if you know what you are doing, and you want to update manually, you can do it here.{% endblocktrans %}
<br> <br>
We populated the input fields for the new addresses with your currently detected remote addresses. {% trans "We populated the input fields for the new addresses with your currently detected remote addresses." %}
</p> </p>
<div class="form-group"> <div class="form-group">
<label for="current_ipv4">Current IPv4 address from master nameserver</label> <label for="current_ipv4">{% trans "Current IPv4 address from master nameserver" %}</label>
<input class="form-control" type="text" id="current_ipv4" name="current_ipv4" value="{{ host.get_ipv4 }}" disabled> <input class="form-control" type="text" id="current_ipv4" name="current_ipv4" value="{{ host.get_ipv4 }}" disabled>
<label for="myipv4">Set new IPv4 address</label> <label for="myipv4">{% trans "Set new IPv4 address" %}</label>
<input class="form-control" type="text" id="myipv4" name="myipv4" placeholder="give new ipv4 address" value="{{ request.session.ipv4 }}" required autofocus> <input class="form-control" type="text" id="myipv4" name="myipv4" placeholder="give new ipv4 address" value="{{ request.session.ipv4 }}" required autofocus>
</div> </div>
<button type="button" class="btn btn-primary" onclick="update_host_v4('{{ host.get_fqdn }}')">Update</button> <span id="update_result_v4"></span> <button type="button" class="btn btn-primary" onclick="update_host_v4('{{ host.get_fqdn }}')">{% trans "Update" %}</button> <span id="update_result_v4"></span>
<button type="button" class="btn" onclick="delete_host_v4('{{ host.get_fqdn }}')">Delete</button> <span id="delete_result_v4"></span> <button type="button" class="btn" onclick="delete_host_v4('{{ host.get_fqdn }}')">{% trans "Delete" %}</button> <span id="delete_result_v4"></span>
<p></p> <p></p>
<div class="form-group"> <div class="form-group">
<label for="current_ipv6">Current IPv6 address from master nameserver</label> <label for="current_ipv6">{% trans "Current IPv6 address from master nameserver" %}</label>
<input class="form-control" type="text" id="current_ipv6" name="current_ipv6" value="{{ host.get_ipv6 }}" disabled> <input class="form-control" type="text" id="current_ipv6" name="current_ipv6" value="{{ host.get_ipv6 }}" disabled>
<label for="myipv6">Set new IPv6 address</label> <label for="myipv6">{% trans "Set new IPv6 address" %}</label>
<input class="form-control" type="text" id="myipv6" name="myipv6" placeholder="give new ipv6 address" value="{{ request.session.ipv6 }}" required> <input class="form-control" type="text" id="myipv6" name="myipv6" placeholder="give new ipv6 address" value="{{ request.session.ipv6 }}" required>
</div> </div>
<button type="button" class="btn btn-primary" onclick="update_host_v6('{{ host.get_fqdn }}')">Update</button> <span id="update_result_v6"></span> <button type="button" class="btn btn-primary" onclick="update_host_v6('{{ host.get_fqdn }}')">{% trans "Update" %}</button> <span id="update_result_v6"></span>
<button type="button" class="btn" onclick="delete_host_v6('{{ host.get_fqdn }}')">Delete</button> <span id="delete_result_v6"></span> <button type="button" class="btn" onclick="delete_host_v6('{{ host.get_fqdn }}')">{% trans "Delete" %}</button> <span id="delete_result_v6"></span>
<script> <script>
update_host_v4 = function(host) { update_host_v4 = function(host) {
$('#update_result_v4').text('updating...'); $('#update_result_v4').text('updating...');

View File

@ -1,3 +1,4 @@
{% load i18n %}{% load bootstrap %}
<ul class="nav nav-tabs" id="myTab"> <ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#generic" data-toggle="tab">General</a></li> <li class="active"><a href="#generic" data-toggle="tab">General</a></li>
<li><a href="#avm" data-toggle="tab">AVM Fritz!Box</a></li> <li><a href="#avm" data-toggle="tab">AVM Fritz!Box</a></li>
@ -9,83 +10,87 @@
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="generic"> <div class="tab-pane active" id="generic">
<h4>General configuration hints</h4> <h4>{% trans "General configuration hints" %}</h4>
<p> <p>
{% blocktrans %}
Usually, you should configure one system on your network to update the DNS. Usually, you should configure one system on your network to update the DNS.
This can be either your router or a host on your network and it will run some software This can be either your router or a host on your network and it will run some software
called the update client. called the update client.{% endblocktrans %}
</p> </p>
<p> <p>
{% blocktrans %}
We have some specific configuration hints for some devices and update clients, We have some specific configuration hints for some devices and update clients,
please see the tabs above. If you don't find yours there, use the generic hints below. please see the tabs above. If you don't find yours there, use the generic hints below.{% endblocktrans %}
</p> </p>
<p> <p>
{% blocktrans %}
<b>Important note about security and compatibility</b>: <b>Important note about security and compatibility</b>:
For update URLs, we always give the https (not: http) URL as that will use an encrypted connection For update URLs, we always give the https (not: http) URL as that will use an encrypted connection
to transfer your data (including your update secret). Depending on your update client (router firmware or to transfer your data (including your update secret). Depending on your update client (router firmware or
PC software) <em>and</em> the specific nsupdate.info-based service, https might be not supported. PC software) <em>and</em> the specific nsupdate.info-based service, https might be not supported.
So, if it does not work, you have the choice of using a different update client and/or a different service, So, if it does not work, you have the choice of using a different update client and/or a different service,
or transmitting your data using an unencrypted connection (using http: instead of https:).<br> or transmitting your data using an unencrypted connection (using http: instead of https:).<br>{% endblocktrans %}
<b>On {{ WWW_HOST }} https is {% if not WE_HAVE_TLS %}not {% endif %}supported.</b> <b>On {{ WWW_HOST }} https is {% if not WE_HAVE_TLS %}not {% endif %}supported.</b>
</p> </p>
<hr> <hr>
<p> <p>
Your update client needs to access the following URLs to update the DNS: {% trans "Your update client needs to access the following URLs to update the DNS:" %}
</p> </p>
For IPv4 updates: {% trans "For IPv4 updates:" %}
<div class="well well-sm"> <div class="well well-sm">
<a href="https://{{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update">https://{{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update</a> <a href="https://{{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update">https://{{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update</a>
</div> </div>
For IPv6 updates: {% trans "For IPv6 updates:" %}
<div class="well well-sm"> <div class="well well-sm">
<a href="https://{{ host.get_fqdn|default:'&lt;your fqdn&gt;' }}:{{ update_secret|default:'&lt;your secret&gt;' }}@{{ WWW_IPV6_HOST }}/nic/update">https://{{ host.get_fqdn|default:'&lt;your fqdn&gt;' }}:{{ update_secret|default:'&lt;your secret&gt;' }}@{{ WWW_IPV6_HOST }}/nic/update</a> <a href="https://{{ host.get_fqdn|default:'&lt;your fqdn&gt;' }}:{{ update_secret|default:'&lt;your secret&gt;' }}@{{ WWW_IPV6_HOST }}/nic/update">https://{{ host.get_fqdn|default:'&lt;your fqdn&gt;' }}:{{ update_secret|default:'&lt;your secret&gt;' }}@{{ WWW_IPV6_HOST }}/nic/update</a>
</div> </div>
{% blocktrans %}
The IPs will be determined automatically using the remote address our service is seeing The IPs will be determined automatically using the remote address our service is seeing
(see below for more details). (see below for more details).{% endblocktrans %}
<hr> <hr>
<p> <p>
Your update client has to do the following steps: {% trans "Your update client has to do the following steps:" %}
</p> </p>
<ul> <ul>
<li>Do HTTP Basic Auth with: <li>{% trans "Do HTTP Basic Auth with:" %}
<ul> <ul>
<li>Username: {{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}</li> <li>{% trans "Username:" %} {{ host.get_fqdn|default:"&lt;your fqdn&gt;" }}</li>
<li>Password: {{ update_secret|default:"&lt;your secret&gt;" }}</li> <li>{% trans "Password:" %} {{ update_secret|default:"&lt;your secret&gt;" }}</li>
</ul> </ul>
</li> </li>
<li>Send a http GET request to: <li>{% trans "Send a http GET request to:" %}
<ul> <ul>
<li>https://{{ WWW_IPV4_HOST }}/nic/update (to update IPv4 A record in DNS)</li> <li>https://{{ WWW_IPV4_HOST }}/nic/update {% trans "(to update IPv4 A record in DNS)" %}</li>
<li>https://{{ WWW_IPV6_HOST }}/nic/update (to update IPv6 AAAA record in DNS)</li> <li>https://{{ WWW_IPV6_HOST }}/nic/update {% trans "(to update IPv6 AAAA record in DNS)" %}</li>
</ul> </ul>
</li> </li>
<li>Optionally, we support some URL arguments: <li>{% trans "Optionally, we support some URL arguments:" %}
<ul> <ul>
<li>myip=127.0.0.1 or myip=::1 (by default, we autodetect the IP. If the autodetected IP is not <li>{% blocktrans %}myip=127.0.0.1 or myip=::1 (by default, we autodetect the IP. If the autodetected IP is not
the one you want to put into DNS, you need to give the wanted one explicitly using myip=...) the one you want to put into DNS, you need to give the wanted one explicitly using myip=...){% endblocktrans %}
</li> </li>
<li>hostname={{ host.get_fqdn|default:"&lt;your fqdn&gt;" }} (if not given: autodetect from http basic auth)</li> <li>hostname={{ host.get_fqdn|default:"&lt;your fqdn&gt;" }} {% blocktrans %}(if not given: autodetect from http basic auth){% endblocktrans %}</li>
</ul> </ul>
</li> </li>
<li>The response status and content will be: <li>{% trans "The response status and content will be:" %}
<ul> <ul>
<li>Status 200 and "good &lt;your ip&gt;" <i class="fa fa-long-arrow-right"></i> new IP accepted</li> <li>Status 200 and "good &lt;your ip&gt;" <i class="fa fa-long-arrow-right"></i> {% trans "new IP accepted" %}</li>
<li>Status 200 and "nochg &lt;your ip&gt;" <i class="fa fa-long-arrow-right"></i> IP accepted, but did not change since last update</li> <li>Status 200 and "nochg &lt;your ip&gt;" <i class="fa fa-long-arrow-right"></i> {% trans "IP accepted, but did not change since last update" %}</li>
<li>Status 401: Authorization Required <i class="fa fa-long-arrow-right"></i> Incorrect authentication or no http basic auth header received</li> <li>Status 401: Authorization Required <i class="fa fa-long-arrow-right"></i> {% trans "Incorrect authentication or no http basic auth header received" %}</li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="tab-pane" id="avm"> <div class="tab-pane" id="avm">
<h4>Fritz!Box 6360, 7390 and maybe others:</h4> <h4>Fritz!Box 6360, 7390 {% trans "and maybe others:" %}</h4>
<hr> <hr>
<h5>Go to:</h5> <h5>{% trans "Go to:" %}</h5>
<div class="well well-sm"> <div class="well well-sm">
Internet <i class="fa fa-long-arrow-right"></i> Internet <i class="fa fa-long-arrow-right"></i>
Permit Access <i class="fa fa-long-arrow-right"></i> Permit Access <i class="fa fa-long-arrow-right"></i>
Dynamic DNS Dynamic DNS
</div> </div>
<h5>Enter the following data:</h5> <h5>{% trans "Enter the following data:" %}</h5>
<table class="table"> <table class="table">
<thead><tr><th>Setting</th><th>Value</th></tr></thead> <thead><tr><th>Setting</th><th>Value</th></tr></thead>
<tr><td>Dynamic DNS provider</td><td>Custom</td></tr> <tr><td>Dynamic DNS provider</td><td>Custom</td></tr>
@ -94,25 +99,25 @@
<tr><td>User name</td><td>{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}</td></tr> <tr><td>User name</td><td>{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}</td></tr>
<tr><td>Password</td><td>{{ update_secret|default:"&lt;your secret&gt;" }}</td></tr> <tr><td>Password</td><td>{{ update_secret|default:"&lt;your secret&gt;" }}</td></tr>
</table> </table>
<h5>If you have IPv4 and IPv6</h5> <h5>{% trans "If you have IPv4 and IPv6" %}</h5>
Set Update-URL to the following (two URLs, separated by one space) {% trans "Set Update-URL to the following (two URLs, separated by one space)" %}
<div class="well well-sm">https://{{ WWW_IPV4_HOST }}/nic/update https://{{ WWW_IPV6_HOST }}/nic/update</div> <div class="well well-sm">https://{{ WWW_IPV4_HOST }}/nic/update https://{{ WWW_IPV6_HOST }}/nic/update</div>
<h5>Forcing a dynamic DNS update</h5> <h5>{% trans "Forcing a dynamic DNS update" %}</h5>
If you want to force a dynamic update for testing purposes, you can do it like this: {% trans "If you want to force a dynamic update for testing purposes, you can do it like this:" %}
<ul> <ul>
<li>disable dynamic DNS, apply</li> <li>{% trans "disable dynamic DNS, apply" %}</li>
<li>enable dynamic DNS, apply</li> <li>{% trans "enable dynamic DNS, apply" %}</li>
<li>(now the Fritz!Box sends an update, it might be "good" or "nochg" depending on whether we already have that IP in DNS)</li> <li>{% trans '(now the Fritz!Box sends an update, it might be "good" or "nochg" depending on whether we already have that IP in DNS)' %}</li>
</ul> </ul>
</div> </div>
<div class="tab-pane" id="ddwrt"> <div class="tab-pane" id="ddwrt">
<h4>DD-WRT (verified with v24-sp2)</h4> <h4>DD-WRT ({% trans "verified with" %} v24-sp2)</h4>
<h5>Go to:</h5> <h5>{% trans "Go to:" %}</h5>
<div class="well well-sm"> <div class="well well-sm">
Setup <i class="fa fa-long-arrow-right"></i> Setup <i class="fa fa-long-arrow-right"></i>
DDNS DDNS
</div> </div>
<h5>Enter the following data:</h5> <h5>{% trans "Enter the following data:" %}</h5>
<table class="table"> <table class="table">
<thead><tr><th>Setting</th><th>Value</th></tr></thead> <thead><tr><th>Setting</th><th>Value</th></tr></thead>
<tr><td>DDNS Service</td><td>Custom</td></tr> <tr><td>DDNS Service</td><td>Custom</td></tr>
@ -121,7 +126,7 @@
<tr><td>Password</td><td>{{ update_secret|default:"&lt;your secret&gt;" }}</td></tr> <tr><td>Password</td><td>{{ update_secret|default:"&lt;your secret&gt;" }}</td></tr>
<tr><td>Hostname</td><td>{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}</td></tr> <tr><td>Hostname</td><td>{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}</td></tr>
<tr><td>URL</td><td>/nic/update?</td></tr> <tr><td>URL</td><td>/nic/update?</td></tr>
<tr><td>Additional DDNS Options</td><td>(leave this field empty)</td></tr> <tr><td>Additional DDNS Options</td><td>{% trans "(leave this field empty)" %}</td></tr>
<tr><td>Do not use external ip check</td><td>Yes</td></tr> <tr><td>Do not use external ip check</td><td>Yes</td></tr>
<tr><td>Force Update Interval</td><td>7</td></tr> <tr><td>Force Update Interval</td><td>7</td></tr>
</table> </table>
@ -129,7 +134,7 @@
<div class="tab-pane" id="ddclient"> <div class="tab-pane" id="ddclient">
<h4>ddclient</h4> <h4>ddclient</h4>
<p> <p>
ddclient is a popular dyndns update daemon on Linux. {% trans "ddclient is a popular dyndns update daemon on Linux." %}
</p> </p>
<pre># /etc/ddclient.conf <pre># /etc/ddclient.conf
@ -160,11 +165,11 @@ password='{{ update_secret|default:"&lt;your secret&gt;" }}'
<div class="tab-pane" id="m0n0wall"> <div class="tab-pane" id="m0n0wall">
<h4>m0n0wall</h4> <h4>m0n0wall</h4>
<p>Homepage: <a href="http://m0n0.ch/wall/">http://m0n0.ch/wall</a></p> <p>Homepage: <a href="http://m0n0.ch/wall/">http://m0n0.ch/wall</a></p>
<h5>Go to:</h5> <h5>{% trans "Go to:" %}</h5>
<div class="well well-sm"> <div class="well well-sm">
Services <i class="fa fa-long-arrow-right"></i>Dynamic DNS Services <i class="fa fa-long-arrow-right"></i>Dynamic DNS
</div> </div>
<h5>Enter the following data:</h5> <h5>{% trans "Enter the following data:" %}</h5>
<table class="table"> <table class="table">
<thead><tr><th>Setting</th><th>Value</th></tr></thead> <thead><tr><th>Setting</th><th>Value</th></tr></thead>
<tr><td>Service Type</td><td>DynDNS</td></tr> <tr><td>Service Type</td><td>DynDNS</td></tr>
@ -176,16 +181,24 @@ password='{{ update_secret|default:"&lt;your secret&gt;" }}'
</div> </div>
<div class="tab-pane" id="browser"> <div class="tab-pane" id="browser">
<h4>Browser-based update client</h4> <h4>Browser-based update client</h4>
{% blocktrans %}
These URLs invoke the built-in update client, which is intended for temporary and adhoc scenarios only. These URLs invoke the built-in update client, which is intended for temporary and adhoc scenarios only.
It periodically checks your IP and updates DNS if it changes. It periodically checks your IP and updates DNS if it changes.{% endblocktrans %}
<ul> <ul>
<<<<<<< HEAD
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/update">update DNS to point to remote ipv4 or ipv6 address</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/update">update DNS to point to remote ipv4 or ipv6 address</a></li>
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/update">similar, ipv4 only</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/update">similar, ipv4 only</a></li>
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/update">similar, ipv6 only</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/update">similar, ipv6 only</a></li>
=======
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/update {% blocktrans %}(updates hostname to point to remote ipv4 or ipv6 address){% endblocktrans %}</li>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/update {% blocktrans %}(similar, but ipv4 only){% endblocktrans %}</li>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/update {% blocktrans %}(similar, but ipv6 only){% endblocktrans %}</li>
>>>>>>> 25449d447b239ccc0599131435c178e831e247d5
</ul> </ul>
<h4>Update URLs for browser / http user agent use</h4> <h4>{% trans "Update URLs for browser / http user agent use" %}</h4>
Interactive - will ask for username (give your hostname) and password (give your secret): {% blocktrans %}Interactive - will ask for username (give your hostname) and password (give your secret):{% endblocktrans %}
<ul> <ul>
<<<<<<< HEAD
<li><a href="https://{{ WWW_HOST }}/nic/update">update DNS to point to remote ipv4 or ipv6 address</a></li> <li><a href="https://{{ WWW_HOST }}/nic/update">update DNS to point to remote ipv4 or ipv6 address</a></li>
<li><a href="https://{{ WWW_IPV4_HOST }}/nic/update">similar, ipv4 only</a></li> <li><a href="https://{{ WWW_IPV4_HOST }}/nic/update">similar, ipv4 only</a></li>
<li><a href="https://{{ WWW_IPV6_HOST }}/nic/update">similar, ipv6 only</a></li> <li><a href="https://{{ WWW_IPV6_HOST }}/nic/update">similar, ipv6 only</a></li>
@ -195,22 +208,38 @@ password='{{ update_secret|default:"&lt;your secret&gt;" }}'
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update">update DNS to point to remote ipv4 or ipv6 address</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update">update DNS to point to remote ipv4 or ipv6 address</a></li>
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update">similar, ipv4 only</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update">similar, ipv4 only</a></li>
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/nic/update">similar, ipv6 only</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/nic/update">similar, ipv6 only</a></li>
=======
<li>https://{{ WWW_HOST }}/nic/update {% blocktrans %}(updates hostname to point to remote ipv4 or ipv6 address){% endblocktrans %}</li>
<li>https://{{ WWW_IPV4_HOST }}/nic/update {% blocktrans %}(similar, but ipv4 only){% endblocktrans %}</li>
<li>https://{{ WWW_IPV6_HOST }}/nic/update {% blocktrans %}(similar, but ipv6 only){% endblocktrans %}</li>
</ul> </ul>
As above, but manually specifying the IP address: Giving the http basic auth username and password in the URL:
<ul> <ul>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update {% blocktrans %}(updates hostname to point to remote ipv4 or ipv6 address){% endblocktrans %}</li>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV4_HOST }}/nic/update {% blocktrans %}(similar, but ipv4 only){% endblocktrans %}</li>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_IPV6_HOST }}/nic/update {% blocktrans %}(similar, but ipv6 only){% endblocktrans %}</li>
>>>>>>> 25449d447b239ccc0599131435c178e831e247d5
</ul>
{% trans "As above, but manually specifying the IP address:" %}
<ul>
<<<<<<< HEAD
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=127.0.0.1">update DNS to point to ipv4 127.0.0.1</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=127.0.0.1">update DNS to point to ipv4 127.0.0.1</a></li>
<li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=::1">update DNS to point to ipv6 ::1</a></li> <li><a href="https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=::1">update DNS to point to ipv6 ::1</a></li>
=======
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=127.0.0.1 {% blocktrans %}(updates hostname to point to ipv4 127.0.0.1){% endblocktrans %}</li>
<li>https://{{ host.get_fqdn|default:"&lt;your hostname&gt;" }}:{{ update_secret|default:"&lt;your secret&gt;" }}@{{ WWW_HOST }}/nic/update?myip=::1 {% blocktrans %}(updates hostname to point to ipv6 ::1){% endblocktrans %}</li>
>>>>>>> 25449d447b239ccc0599131435c178e831e247d5
</ul> </ul>
Explanation of parameters: {% trans "Explanation of parameters:" %}
<ul> <ul>
{% if not host %} {% if not host %}
<li>&lt;your hostname&gt;: your fully qualified hostname, something like example.{{ WWW_HOST }}</li> <li>&lt;your hostname&gt;: {% blocktrans %}your fully qualified hostname, something like example.{{ WWW_HOST }}{% endblocktrans %}</li>
{% endif %} {% endif %}
{% if not update_secret %} {% if not update_secret %}
<li>&lt;your secret&gt;: the secret you have configured for this hostname</li> <li>&lt;your secret&gt;: {% blocktrans %}the secret you have configured for this hostname{% endblocktrans %}</li>
{% endif %} {% endif %}
<li>IP addresses: we use the v4 and v6 localhost addresses in the examples, but <li>{% blocktrans %}IP addresses: we use the v4 and v6 localhost addresses in the examples, but
of course you need to use your real public IP instead of that. of course you need to use your real public IP instead of that.{% endblocktrans %}
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -1,18 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h3>Your Hosts</h3> <h3>{% trans "Your Hosts" %}</h3>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Host<br>Comment</th> <th>{% trans "Host<br>Comment" %}</th>
<th>Available</th> <th>{% trans "Available" %}</th>
<th>Faults<br>C / S</th> <th>{% blocktrans %}Faults<br>C / S{% endblocktrans %}</th>
<th>IPv4 Address<br>(last update)</th> <th>{% blocktrans %}IPv4 Address<br>(last update){% endblocktrans %}</th>
<th>IPv6 Address<br>(last update)</th> <th>{% blocktrans %}IPv6 Address<br>(last update){% endblocktrans %}</th>
</tr> </tr>
</thead> </thead>
{% for host in hosts %} {% for host in hosts %}
@ -53,7 +53,7 @@
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr><td colspan="5">No hosts yet.</td></tr> <tr><td colspan="5">{% trans "No hosts yet." %}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
@ -63,33 +63,33 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="well well-sm"> <div class="well well-sm">
<h3>Create a new Host</h3> <h3>{% trans "Create a new Host" %}</h3>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Create</button> <button type="submit" class="btn btn-primary">{% trans "Create" %}</button>
</form> </form>
</div> </div>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<div class="well well-sm"> <div class="well well-sm">
<h3>Help</h3> <h3>{% trans "Help" %}</h3>
<p>Here you can add new hosts (like routers, PCs, servers, ...). <p>{% trans "Here you can add new hosts (like routers, PCs, servers, ...)." %}
</p> </p>
<p>You need to be able to configure one of your machines so it sends dyndns2 compatible <p>{% blocktrans %}You need to be able to configure one of your machines so it sends dyndns2 compatible
updates to us when your IP changes. Routers usually have some builtin software that does updates to us when your IP changes. Routers usually have some builtin software that does
this, but you can also use some software on another system (like a PC or server). this, but you can also use some software on another system (like a PC or server).{% endblocktrans %}
</p> </p>
<p> <p>
Just make sure your update client either is customizable well enough or has specific {% blocktrans %}Just make sure your update client either is customizable well enough or has specific
support for our service. support for our service.{% endblocktrans %}
</p> </p>
<p> <p>
We'll show you configuration examples after you add a host. {% trans "We'll show you configuration examples after you add a host." %}
</p> </p>
</div> </div>
<div class="well well-sm"> <div class="well well-sm">
<h3>Your current IP(s) + reverse DNS:</h3> <h3>{% trans "Your current IP(s) + reverse DNS:" %}</h3>
<p> <p>
<b>IPv4:</b> <span id="ipv4" class="ipv4addr">{{ request.session.ipv4 }}</span> <b>IPv4:</b> <span id="ipv4" class="ipv4addr">{{ request.session.ipv4 }}</span>
<br> <br>

View File

@ -1,50 +1,50 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<h3>Domains</h3> <h3>{% trans "Domains" %}</h3>
<dl> <dl>
<dt>Total:</dt> <dt>{% trans "Total:" %}</dt>
<dd>{{ domains_total }}</dd> <dd>{{ domains_total }}</dd>
<dt>Public:</dt> <dt>{% trans "Public:" %}</dt>
<dd>{{ domains_public }}</dd> <dd>{{ domains_public }}</dd>
<dt>Unavailable / Down:</dt> <dt>{% trans "Unavailable / Down:" %}</dt>
<dd>{{ domains_unavailable }}</dd> <dd>{{ domains_unavailable }}</dd>
</dl> </dl>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h3>Hosts</h3> <h3>{% trans "Hosts" %}</h3>
<dl> <dl>
<dt>Total:</dt> <dt>{% trans "Total:" %}</dt>
<dd>{{ hosts_total }}</dd> <dd>{{ hosts_total }}</dd>
<dt>Unavailable / Abuse / Abuse-Blocked:</dt> <dt>{% trans "Unavailable / Abuse / Abuse-Blocked:" %}</dt>
<dd>{{ hosts_unavailable }} / {{ hosts_abuse }} / {{ hosts_abuse_blocked }}</dd> <dd>{{ hosts_unavailable }} / {{ hosts_abuse }} / {{ hosts_abuse_blocked }}</dd>
<dt>ip v4 (tls) / v6 (tls) updated last 2d:</dt> <dt>{% trans "ip v4 (tls) / v6 (tls) updated last 2d:" %}</dt>
<dd>{{ hosts_ipv4_2d }} ({{ hosts_ipv4_tls_2d }}) / {{ hosts_ipv6_2d }} ({{ hosts_ipv6_tls_2d }})</dd> <dd>{{ hosts_ipv4_2d }} ({{ hosts_ipv4_tls_2d }}) / {{ hosts_ipv6_2d }} ({{ hosts_ipv6_tls_2d }})</dd>
<dt>ip v4 (tls) / v6 (tls) updated last 2w:</dt> <dt>{% trans "ip v4 (tls) / v6 (tls) updated last 2w:" %}</dt>
<dd>{{ hosts_ipv4_2w }} ({{ hosts_ipv4_tls_2w }}) / {{ hosts_ipv6_2w }} ({{ hosts_ipv6_tls_2w }})</dd> <dd>{{ hosts_ipv4_2w }} ({{ hosts_ipv4_tls_2w }}) / {{ hosts_ipv6_2w }} ({{ hosts_ipv6_tls_2w }})</dd>
<dt>ip v4 (tls) / v6 (tls) updated last 2m:</dt> <dt>{% trans "ip v4 (tls) / v6 (tls) updated last 2m:" %}</dt>
<dd>{{ hosts_ipv4_2m }} ({{ hosts_ipv4_tls_2m }}) / {{ hosts_ipv6_2m }} ({{ hosts_ipv6_tls_2m }})</dd> <dd>{{ hosts_ipv4_2m }} ({{ hosts_ipv4_tls_2m }}) / {{ hosts_ipv6_2m }} ({{ hosts_ipv6_tls_2m }})</dd>
<dt>ip v4 (tls) / v6 (tls) updated last 2y:</dt> <dt>{% trans "ip v4 (tls) / v6 (tls) updated last 2y:" %}</dt>
<dd>{{ hosts_ipv4_2y }} ({{ hosts_ipv4_tls_2y }}) / {{ hosts_ipv6_2y }} ({{ hosts_ipv6_tls_2y }})</dd> <dd>{{ hosts_ipv4_2y }} ({{ hosts_ipv4_tls_2y }}) / {{ hosts_ipv6_2y }} ({{ hosts_ipv6_tls_2y }})</dd>
</dl> </dl>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h3>Users</h3> <h3>{% trans "Users" %}</h3>
<dl> <dl>
<dt>Total:</dt> <dt>{% trans "Total:" %}</dt>
<dd>{{ users_total }}</dd> <dd>{{ users_total }}</dd>
<dt>Active:</dt> <dt>{% trans "Active:" %}</dt>
<dd>{{ users_active }}</dd> <dd>{{ users_active }}</dd>
<dt>logged / created in last 2d:</dt> <dt>{% trans "logged / created in last 2d:" %}</dt>
<dd>{{ users_loggedin_2d }} / {{ users_created_2d }}</dd> <dd>{{ users_loggedin_2d }} / {{ users_created_2d }}</dd>
<dt>logged / created in last 2w:</dt> <dt>{% trans "logged / created in last 2w:" %}</dt>
<dd>{{ users_loggedin_2w }} / {{ users_created_2w }}</dd> <dd>{{ users_loggedin_2w }} / {{ users_created_2w }}</dd>
<dt>logged / created in last 2m:</dt> <dt>{% trans "logged / created in last 2m:" %}</dt>
<dd>{{ users_loggedin_2m }} / {{ users_created_2m }}</dd> <dd>{{ users_loggedin_2m }} / {{ users_created_2m }}</dd>
<dt>logged / created in last 2y:</dt> <dt>{% trans "logged / created in last 2y:" %}</dt>
<dd>{{ users_loggedin_2y }} / {{ users_created_2y }}</dd> <dd>{{ users_loggedin_2y }} / {{ users_created_2y }}</dd>
</dl> </dl>
</div> </div>

View File

@ -1,22 +1,22 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="jumbotron"> <div class="jumbotron">
<h2>Browser-based Updater</h2> <h2>{% trans "Browser-based Updater" %}</h2>
<p> <p>
Host {{ hostname }} will get automatically updated as long as you keep this window open. {% blocktrans %}Host {{ hostname }} will get automatically updated as long as you keep this window open.{% endblocktrans %}
</p> </p>
<noscript> <noscript>
<p class="text-danger"> <p class="text-danger">
The browser based updater only works if javascript is enabled. {% trans "The browser based updater only works if javascript is enabled." %}
</p> </p>
</noscript> </noscript>
<h2>Updater Status</h2> <h2>{% trans "Updater Status" %}</h2>
<dl> <dl>
<dt>My IP:</dt> <dt>{% trans "My IP:" %}</dt>
<dd><span id="myip"></span> (<span id="myip_timestamp"></span>)</dd> <dd><span id="myip"></span> (<span id="myip_timestamp"></span>)</dd>
<dt>Last update response:</dt> <dt>{% trans "Last update response:" %}</dt>
<dd><span id="response"></span> (<span id="response_timestamp"></span>)</dd> <dd><span id="response"></span> (<span id="response_timestamp"></span>)</dd>
</dl> </dl>
</div> </div>
@ -61,7 +61,7 @@
switch(response[0]) switch(response[0])
{ {
case "good": msg = "Success: IP address was updated"; break; case "good": msg = "Success: IP address was updated"; break;
case "nochg": msg = "Warning: IP address didn't change"; break; case "nochg": msg = "Warning: IP address did not change"; break;
case "dnserr": msg = "Error: The update request resulted in a DNS error"; break; case "dnserr": msg = "Error: The update request resulted in a DNS error"; break;
case "nohost": msg = "Error: The host you specified does not exist"; break; case "nohost": msg = "Error: The host you specified does not exist"; break;
case "abuse": msg = "Error: Update rejected as your host is flagged for abuse"; break; case "abuse": msg = "Error: Update rejected as your host is flagged for abuse"; break;

View File

@ -1,36 +1,36 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<h3>{{ object.hostname }} ({{ object.service.name }}) <br><small><a href="{% url 'updater_hostconfig_overview' object.host.pk %}"><i class="fa fa-angle-double-left"></i> back to overview</a></small></h3> <h3>{{ object.hostname }} ({{ object.service.name }}) <br><small><a href="{% url 'updater_hostconfig_overview' object.host.pk %}"><i class="fa fa-angle-double-left"></i> {% trans "back to overview" %}</a></small></h3>
<div class="col-lg-6"> <div class="col-lg-6">
<h3>Edit Updater Configuration</h3> <h3>{% trans "Edit Updater Configuration" %}</h3>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Update</button> <button type="submit" class="btn btn-primary">{% trans "Update" %}</button>
</form> </form>
<h3>Delete Updater Configuration</h3> <h3>{% trans "Delete Updater Configuration" %}</h3>
<p> <p>
Deleting a updater configuration is not undoable. If you need it back, you'll have to add it again. {% trans "Deleting a updater configuration is not undoable. If you need it back, you'll have to add it again." %}
</p> </p>
<form method="get" action="{% url 'delete_updater_hostconfig' object.pk %}"> <form method="get" action="{% url 'delete_updater_hostconfig' object.pk %}">
<button type="submit" class="btn btn-primary">Delete</button> <button type="submit" class="btn btn-primary">{% trans "Delete" %}</button>
</form> </form>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Help</h3> <h3>{% trans "Help" %}</h3>
<p>Here you can edit the configuration of the "{{ object.service.name }}" updater. <p>{% trans "Here you can edit the configuration of the" %} "{{ object.service.name }}" {% trans "updater." %}
</p> </p>
<p> <p>
The values you need here are the same ones as you would usually enter in your router {% blocktrans %}The values you need here are the same ones as you would usually enter in your router
or update client. or update client.{% endblocktrans %}
</p> </p>
<p> <p>
You get these values after registering with the "{{ object.service.name }}" service {% blocktrans %}You get these values after registering with the "{{ object.service.name }}" service
and (likely) configuring that service to accept updates. and (likely) configuring that service to accept updates.{% endblocktrans %}
</p> </p>
</div> </div>
</div> </div>

View File

@ -1,18 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load bootstrap %} {% load i18n %}{% load bootstrap %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h3>Your updater configurations for other services</h3> <h3>{% trans "Your updater configurations for other services" %}</h3>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Service</th> <th>{% trans "Service" %}</th>
<th>Host</th> <th>{% trans "Host" %}</th>
<th>give IPv4</th> <th>{% trans "give IPv4" %}</th>
<th>give IPv6</th> <th>{% trans "give IPv6" %}</th>
<th>Comment</th> <th>{% trans "Comment" %}</th>
</tr> </tr>
</thead> </thead>
{% for uc in updater_configs %} {% for uc in updater_configs %}
@ -24,7 +24,7 @@
<td>{{ uc.comment }}</td> <td>{{ uc.comment }}</td>
</tr> </tr>
{% empty %} {% empty %}
<tr><td colspan="5">No other services to update yet.</td></tr> <tr><td colspan="5">{% trans "No other services to update yet." %}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
@ -34,20 +34,20 @@
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Create a new updater configuration</h3> <h3>{% trans "Create a new updater configuration" %}</h3>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<button type="submit" class="btn btn-primary">Create</button> <button type="submit" class="btn btn-primary">{% trans "Create" %}</button>
</form> </form>
</div> </div>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Help</h3> <h3>{% trans "Help" %}</h3>
<p>Here you can add new configurations for 3rd party services you like to get updated. <p>{% trans "Here you can add new configurations for 3rd party services you like to get updated." %}
</p> </p>
<p>We will send an update to them each time you update your host with us. <p>{% trans "We will send an update to them each time you update your host with us." %}
</p> </p>
</div> </div>
</div> </div>

View File

@ -110,6 +110,7 @@ TEMPLATE_LOADERS = (
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
@ -373,3 +374,9 @@ MESSAGE_TAGS = {
constants.WARNING: 'alert-warning', constants.WARNING: 'alert-warning',
constants.ERROR: 'alert-danger', constants.ERROR: 'alert-danger',
} }
# By default language is set to english - modify settings.py to set list of languages
gettext_noop = lambda s: s
LANGUAGES = (
('en', gettext_noop('English')),
)

View File

@ -28,3 +28,11 @@ DEBUG_TOOLBAR_PATCH_SETTINGS = False
INSTALLED_APPS += ( INSTALLED_APPS += (
'debug_toolbar', 'debug_toolbar',
) )
# translations - for details, see:
# https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files and
# https://docs.djangoproject.com/en/dev/topics/i18n/translation/#how-django-discovers-language-preference
LANGUAGES += (
('fr', gettext_noop('French')),
('de', gettext_noop('German')),
)

View File

@ -1,3 +1,3 @@
<h1>400</h1> <h1>400</h1>
Sorry :( we screwed up Sorry :( we screwed up.

View File

@ -1,3 +1,3 @@
<h1>404</h1> <h1>404</h1>
Sorry :( we screwed up Sorry :( we screwed up.

View File

@ -1,3 +1,3 @@
<h1>500</h1> <h1>500</h1>
Sorry :( we screwed up Sorry :( we screwed up.

View File

@ -1,5 +1,5 @@
{% load static from staticfiles %} {% load static from staticfiles %}
{% load i18n %} {% load i18n %}{% load bootstrap %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -87,20 +87,20 @@
{% if not request.is_secure %} {% if not request.is_secure %}
<div class="alert alert-danger"> <div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
Your (http) connection is unencrypted and thus insecure. {% trans "Your (http) connection is unencrypted and thus insecure." %}
{% if WE_HAVE_TLS %} {% if WE_HAVE_TLS %}
Please use our <a href="https://{{ WWW_HOST }}/">secure https site</a>. {% blocktrans %}Please use our <a href="https://{{ WWW_HOST }}/">secure https site</a>.{% endblocktrans %}
{% endif %} {% endif %}
{% if COOKIE_SECURE %} {% if COOKIE_SECURE %}
At least some of the required cookies will only work on the secure https site, {% blocktrans %}At least some of the required cookies will only work on the secure https site,
expect malfunctioning on the http site. expect malfunctioning on the http site.{% endblocktrans %}
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
<noscript> <noscript>
<div class="alert alert-warning"> <div class="alert alert-warning">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
Some functionality on this site requires that you have JavaScript enabled in your browser. {% trans "Some functionality on this site requires that you have JavaScript enabled in your browser." %}
</div> </div>
</noscript> </noscript>
{% if messages %} {% if messages %}

View File

@ -1,8 +1,9 @@
{% load i18n %}{% load bootstrap %}
<p class="text-muted credit"> <p class="text-muted credit">
<a href="http://github.com/nsupdate-info/nsupdate.info">Powered by nsupdate.info</a> <a href="http://github.com/nsupdate-info/nsupdate.info">{% trans "Powered by nsupdate.info" %}</a>
&nbsp;|&nbsp; &nbsp;|&nbsp;
<a href="http://validator.w3.org/check/referer">Valid HTML</a> <a href="http://validator.w3.org/check/referer">{% trans "Valid HTML" %}</a>
&nbsp;|&nbsp; &nbsp;|&nbsp;
<a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a> <a href="http://jigsaw.w3.org/css-validator/check/referer">{% trans "Valid CSS" %}</a>
</p> </p>