[damned-lies] Add an about page linked from the footer
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add an about page linked from the footer
- Date: Thu, 5 Jan 2012 19:51:49 +0000 (UTC)
commit 36dd111aa4358d5b4846792138bb9056cba42338
Author: Claude Paroz <claude 2xlibre net>
Date: Thu Jan 5 20:50:29 2012 +0100
Add an about page linked from the footer
common/views.py | 17 +++++++++++------
templates/about.html | 38 ++++++++++++++++++++++++++++++++++++++
templates/base.html | 4 +---
templates/index.html | 11 +++--------
urls.py | 4 ++++
5 files changed, 57 insertions(+), 17 deletions(-)
---
diff --git a/common/views.py b/common/views.py
index cc863dd..618ea16 100644
--- a/common/views.py
+++ b/common/views.py
@@ -34,20 +34,25 @@ from common.utils import get_user_locale
def index(request):
""" Homepage view """
+ curlang = get_user_locale(request)
+
+ context = {
+ 'pageSection': 'home',
+ 'user_language': curlang,
+ }
+ return render(request, 'index.html', context)
+
+def about(request):
translator_credits = _("translator-credits")
if translator_credits == "translator-credits":
translator_credits = ''
else:
translator_credits = translator_credits.split('\n')
-
- curlang = get_user_locale(request)
-
context = {
'pageSection': 'home',
- 'user_language': curlang,
- 'translator_credits': translator_credits
+ 'translator_credits': translator_credits,
}
- return render(request, 'index.html', context)
+ return render(request, 'about.html', context)
def site_login(request):
""" Site-specific login page. Not named 'login' to not confuse with auth.login """
diff --git a/templates/about.html b/templates/about.html
new file mode 100644
index 0000000..9659e87
--- /dev/null
+++ b/templates/about.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %} {% trans "About" %} {% endblock %}
+
+{% block content %}
+<div class="mainpage">
+
+<h1>{% trans "About Damned Lies" %}</h1>
+
+<p>{% trans "Damned Lies is the Web application used to manage the localisation (l10n) of the GNOME project." %}
+{% blocktrans with link='http://l10n.gnome.org/help/vertimus_workflow/' %}It allows you to browse live statistics. Damned Lies also manages the translation <a href="{{ link }}">workflow</a>.{% endblocktrans %}</p>
+
+<p>{% blocktrans with gpl='http://www.gnu.org/licenses/gpl-2.0.html' bug='https://bugzilla.gnome.org/enter_bug.cgi?product=damned-lies' %}Damned Lies is Free Software, its source code is available under the <a href="{{ gpl }}">GNU GPL license</a>. You are welcome to participate to its improvement, especially by <a href="{{ bug }}">reporting bugs and enhancement proposals</a>.{% endblocktrans %}</p>
+
+<p>{% blocktrans with link='http://en.wikipedia.org/wiki/Lies,_damned_lies,_and_statistics' %}If you wonder about the name of this application, see <a href="{{ link }}">this article on Wikipedia</a>.{% endblocktrans %}</p>
+
+{% if translator_credits %}
+ <p>
+ {% trans "This Web site has been translated in your language by:" %}
+ <blockquote>{{ translator_credits|join:", " }}</blockquote>
+ </p>
+{% endif %}
+
+<h2>{% trans "Quick links" %}</h2>
+<table>
+ <tr><th>{% trans "Project wiki" %}</th>
+ <td><a href="https://live.gnome.org/DamnedLies">https://live.gnome.org/DamnedLies</a></td></tr>
+ <tr><th>{% trans "Bug tracking page" %}</th>
+ <td><a href="https://bugzilla.gnome.org/browse.cgi?product=damned-lies">https://bugzilla.gnome.org/browse.cgi?product=damned-lies</td></tr>
+ <tr><th>{% trans "Source code" %}</th>
+ <td><a href="http://git.gnome.org/browse/damned-lies/">http://git.gnome.org/browse/damned-lies</td></tr>
+ <tr><th>{% trans "Workflow" %}</th>
+ <td><a href="http://l10n.gnome.org/help/vertimus_workflow/">http://l10n.gnome.org/help/vertimus_workflow</td></tr>
+</table>
+
+</div>
+{% endblock %}
diff --git a/templates/base.html b/templates/base.html
index ded822c..d2ef0f7 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -91,9 +91,7 @@
<div id="footer">
{% trans "Copyright © 2006-2012" %} <a href="http://www.gnome.org/">{% trans "The GNOME Project" %}</a>.
<br>
- {% trans "Maintained in the <a href='http://git.gnome.org/browse/damned-lies/'>damned-lies</a> module on <a href='http://git.gnome.org/'>git.gnome.org</a>" %}
- <br>
- {% blocktrans with "<a href='http://www.canonical.com/'>Canonical</a>" as link %}Hosted by {{ link }}.{% endblocktrans %}
+ {% blocktrans with "<a href='http://www.canonical.com/'>Canonical</a>" as link %}Hosted by {{ link }}.{% endblocktrans %} | <a href="{% url about %}">{% trans "About Damned Liesâ" %}
</div>
</div> <!-- end of div.body -->
diff --git a/templates/index.html b/templates/index.html
index a91eff6..d70508e 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -8,6 +8,9 @@
<h1>{% trans "Damned Lies about GNOME" %}</h1>
+<p>{% trans "Damned Lies is the Web application used to manage the localisation (l10n) of the GNOME project." %}
+<em><a href="{% url about %}">{% trans "Moreâ" %}</a></em></p>
+
<div class="bloc50">
<h2><a href="{% url teams %}">{% trans "Teams" %}</a></h2>
<p>{% trans "List of all GNOME Translation Teams, with full information such as primary contact (coordinator), web pages and mailing list information." %}
@@ -47,13 +50,5 @@
{% trans "They are usually taken from the Git repository, and we keep all relevant information on them (Bugzilla details, web page, maintainer information,...)." %}</p>
</div>
-<div class="reset">
-{% if translator_credits %}
- <p class="footnote">
- {% trans "Translated by:" %} {{ translator_credits|join:", " }}
- </p>
-{% endif %}
-</div>
-
</div>
{% endblock %}
diff --git a/urls.py b/urls.py
index f0e56d4..039dd36 100644
--- a/urls.py
+++ b/urls.py
@@ -11,6 +11,10 @@ urlpatterns = patterns('',
view = 'common.views.index',
name = 'home'),
url(
+ regex = r'^about/$',
+ view = 'common.views.about',
+ name = 'about'),
+ url(
regex = r'^login/$',
view = 'common.views.site_login',
name = 'login'),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]