Show the currently running version on the about page

The version is derived from the abbreviated sha1 of the current
head of the git repository.

Change-Id: Icc886596e500080cb014f9a17c3585a945516a98
This commit is contained in:
David Pursehouse 2015-11-24 19:26:29 +09:00 committed by David Pursehouse
parent b19a482d47
commit af3168e449
6 changed files with 81 additions and 60 deletions

View File

@ -8,3 +8,10 @@
:copyright: 2007 by Armin Ronacher. :copyright: 2007 by Armin Ronacher.
:license: BSD :license: BSD
""" """
import subprocess
try:
lodgeit_version = subprocess.check_output(['git', 'rev-parse', 'HEAD'])[:7]
except:
lodgeit_version = ""

View File

@ -9,7 +9,7 @@
:license: BSD :license: BSD
""" """
from werkzeug.exceptions import NotFound from werkzeug.exceptions import NotFound
from lodgeit import local from lodgeit import local, lodgeit_version
from lodgeit.i18n import lazy_gettext from lodgeit.i18n import lazy_gettext
from lodgeit.utils import render_to_response from lodgeit.utils import render_to_response
from lodgeit.lib.webapi import get_public_methods from lodgeit.lib.webapi import get_public_methods
@ -32,7 +32,7 @@ class StaticController(object):
return render_to_response('not_found.html') return render_to_response('not_found.html')
def about(self): def about(self):
return render_to_response('about.html') return render_to_response('about.html', lodgeit_version=lodgeit_version)
def help(self, topic=None): def help(self, topic=None):
if topic is None: if topic is None:

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-12-17 16:33+0900\n" "POT-Creation-Date: 2016-04-19 17:01+0900\n"
"PO-Revision-Date: 2015-10-09 19:00+0200\n" "PO-Revision-Date: 2015-10-09 19:00+0200\n"
"Last-Translator: Christopher Grebs <cg@webshox.org>\n" "Last-Translator: Christopher Grebs <cg@webshox.org>\n"
"Language-Team: de <LL@li.org>\n" "Language-Team: de <LL@li.org>\n"
@ -86,11 +86,15 @@ msgstr "Mehrere-Dateien"
msgid "About LodgeIt" msgid "About LodgeIt"
msgstr "Über Lodgeit" msgstr "Über Lodgeit"
#: lodgeit/views/about.html:6 #: lodgeit/views/about.html:7
msgid "LodgeIt version:"
msgstr ""
#: lodgeit/views/about.html:11
msgid " Why the hell another pastebin?" msgid " Why the hell another pastebin?"
msgstr "Warum zum Teufel ein weiterer Pastebin?" msgstr "Warum zum Teufel ein weiterer Pastebin?"
#: lodgeit/views/about.html:7 #: lodgeit/views/about.html:12
msgid "" msgid ""
"\n" "\n"
" Good question. Basically the world doesn't need another pastebin.\n" " Good question. Basically the world doesn't need another pastebin.\n"
@ -110,32 +114,32 @@ msgstr ""
" ein intuitives Interface haben.\n" " ein intuitives Interface haben.\n"
" Dennoch gibt es einige Funktionen die LodgeIt einzigartig machen." " Dennoch gibt es einige Funktionen die LodgeIt einzigartig machen."
#: lodgeit/views/about.html:15 #: lodgeit/views/about.html:20
msgid "Features" msgid "Features"
msgstr "Funktionen" msgstr "Funktionen"
#: lodgeit/views/about.html:17 #: lodgeit/views/about.html:22
msgid "clean user interface" msgid "clean user interface"
msgstr "sauberes Benutzer-Interface" msgstr "sauberes Benutzer-Interface"
#: lodgeit/views/about.html:18 #: lodgeit/views/about.html:23
msgid "different color schemes for the sourcecode" msgid "different color schemes for the sourcecode"
msgstr "verschiedene Farb-Schemata für den Quellcode" msgstr "verschiedene Farb-Schemata für den Quellcode"
#: lodgeit/views/about.html:19 #: lodgeit/views/about.html:24
msgid "reply to pastes" msgid "reply to pastes"
msgstr "Man kann auf einen Paste antworten" msgstr "Man kann auf einen Paste antworten"
#: lodgeit/views/about.html:20 #: lodgeit/views/about.html:25
#, fuzzy #, fuzzy
msgid "diffs of two pastes" msgid "diffs of two pastes"
msgstr "Man kann Pastes vergleichen" msgstr "Man kann Pastes vergleichen"
#: lodgeit/views/about.html:21 #: lodgeit/views/about.html:26
msgid "support for many python template languages" msgid "support for many python template languages"
msgstr "Unterstützung für viele Python-Template-Engines" msgstr "Unterstützung für viele Python-Template-Engines"
#: lodgeit/views/about.html:22 #: lodgeit/views/about.html:27
msgid "" msgid ""
"support for many scripting languages like Python and Ruby, even with\n" "support for many scripting languages like Python and Ruby, even with\n"
" weird syntax (ruby *cough*)" " weird syntax (ruby *cough*)"
@ -143,32 +147,32 @@ msgstr ""
"Unterstützung für viele Scriptsprachen wie Python oder Ruby, auch mit\n" "Unterstützung für viele Scriptsprachen wie Python oder Ruby, auch mit\n"
" schräger Syntax (ruby *würg*)" " schräger Syntax (ruby *würg*)"
#: lodgeit/views/about.html:24 #: lodgeit/views/about.html:29
msgid "XMLRPC support" msgid "XMLRPC support"
msgstr "XMLRPC Support" msgstr "XMLRPC Support"
#: lodgeit/views/about.html:25 #: lodgeit/views/about.html:30
#, fuzzy #, fuzzy
msgid "command-line and editor integration" msgid "command-line and editor integration"
msgstr "Scripte und Editor-Integration" msgstr "Scripte und Editor-Integration"
#: lodgeit/views/about.html:26 #: lodgeit/views/about.html:31
msgid "persistent pastes" msgid "persistent pastes"
msgstr "dauerhaft gespeicherte Pastes" msgstr "dauerhaft gespeicherte Pastes"
#: lodgeit/views/about.html:27 #: lodgeit/views/about.html:32
msgid "reply notification" msgid "reply notification"
msgstr "Antwort-Benachrichtigungen" msgstr "Antwort-Benachrichtigungen"
#: lodgeit/views/about.html:28 #: lodgeit/views/about.html:33
msgid "valid HTML 4.0" msgid "valid HTML 4.0"
msgstr "Valides HTML 4.0" msgstr "Valides HTML 4.0"
#: lodgeit/views/about.html:30 #: lodgeit/views/about.html:35
msgid "Request More Languages" msgid "Request More Languages"
msgstr "Mehr Sprachen" msgstr "Mehr Sprachen"
#: lodgeit/views/about.html:31 #: lodgeit/views/about.html:36
msgid "" msgid ""
"\n" "\n"
" A language is missing in the list? File a ticket in the\n" " A language is missing in the list? File a ticket in the\n"
@ -182,11 +186,11 @@ msgstr ""
" <a href=\"http://dev.pocoo.org/projects/pygments\">Pygments " " <a href=\"http://dev.pocoo.org/projects/pygments\">Pygments "
"Trac</a> und wir fügen sie so schnell wie möglich hinzu.\n" "Trac</a> und wir fügen sie so schnell wie möglich hinzu.\n"
#: lodgeit/views/about.html:36 #: lodgeit/views/about.html:41
msgid "Software Used" msgid "Software Used"
msgstr "Benutzte Software" msgstr "Benutzte Software"
#: lodgeit/views/about.html:38 #: lodgeit/views/about.html:43
msgid "" msgid ""
"<a href=\"http://pygments.pocoo.org/\">Pygments</a> for syntax " "<a href=\"http://pygments.pocoo.org/\">Pygments</a> for syntax "
"highlighting" "highlighting"
@ -194,15 +198,15 @@ msgstr ""
"<a href=\"http://pygments.pocoo.org/\">Pygments</a> für das Syntax " "<a href=\"http://pygments.pocoo.org/\">Pygments</a> für das Syntax "
"Highlighting" "Highlighting"
#: lodgeit/views/about.html:39 #: lodgeit/views/about.html:44
msgid "<a href=\"http://www.python.org/\">Python</a> as scripting language" msgid "<a href=\"http://www.python.org/\">Python</a> as scripting language"
msgstr "<a href=\"http://www.python.org/\">Python</a> als Programmiersprache" msgstr "<a href=\"http://www.python.org/\">Python</a> als Programmiersprache"
#: lodgeit/views/about.html:40 #: lodgeit/views/about.html:45
msgid "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> for templating" msgid "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> for templating"
msgstr "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> als Template-Engine" msgstr "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> als Template-Engine"
#: lodgeit/views/about.html:41 #: lodgeit/views/about.html:46
msgid "" msgid ""
"<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> for the WSGI " "<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> for the WSGI "
"implementation" "implementation"
@ -210,21 +214,21 @@ msgstr ""
"<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> für die WSGI-" "<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> für die WSGI-"
"Implementation" "Implementation"
#: lodgeit/views/about.html:42 #: lodgeit/views/about.html:47
msgid "<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> as database layer" msgid "<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> as database layer"
msgstr "" msgstr ""
"<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> als Datenbank-" "<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> als Datenbank-"
"Schnittstelle" "Schnittstelle"
#: lodgeit/views/about.html:43 #: lodgeit/views/about.html:48
msgid "<a href=\"http://www.jquery.com/\">jQuery</a> for scripting" msgid "<a href=\"http://www.jquery.com/\">jQuery</a> for scripting"
msgstr "<a href=\"http://www.jquery.com/\">jQuery</a> fürs Scripting" msgstr "<a href=\"http://www.jquery.com/\">jQuery</a> fürs Scripting"
#: lodgeit/views/about.html:45 #: lodgeit/views/about.html:50
msgid "Who?" msgid "Who?"
msgstr "Autoren" msgstr "Autoren"
#: lodgeit/views/about.html:46 #: lodgeit/views/about.html:51
msgid "" msgid ""
"\n" "\n"
" This paste was founded by <a " " This paste was founded by <a "
@ -241,11 +245,11 @@ msgstr ""
" <a href=\"http://webshox.org\">Christopher Grebs</a> verwaltet.\n" " <a href=\"http://webshox.org\">Christopher Grebs</a> verwaltet.\n"
" Pygments ist ein Pocoo Projekt geleitet von Georg Brandl." " Pygments ist ein Pocoo Projekt geleitet von Georg Brandl."
#: lodgeit/views/about.html:52 #: lodgeit/views/about.html:57
msgid "Privacy" msgid "Privacy"
msgstr "Datenschutz" msgstr "Datenschutz"
#: lodgeit/views/about.html:53 #: lodgeit/views/about.html:58
#, fuzzy #, fuzzy
msgid "" msgid ""
"\n" "\n"
@ -1014,3 +1018,4 @@ msgstr ""
#: lodgeit/views/utils/macros.html:58 #: lodgeit/views/utils/macros.html:58
msgid "update" msgid "update"
msgstr "" msgstr ""

View File

@ -1,14 +1,14 @@
# Translations template for PROJECT. # Translations template for PROJECT.
# Copyright (C) 2015 ORGANIZATION # Copyright (C) 2016 ORGANIZATION
# This file is distributed under the same license as the PROJECT project. # This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015. # FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-12-17 16:33+0900\n" "POT-Creation-Date: 2016-04-19 17:01+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -86,11 +86,15 @@ msgstr ""
msgid "About LodgeIt" msgid "About LodgeIt"
msgstr "" msgstr ""
#: lodgeit/views/about.html:6 #: lodgeit/views/about.html:7
msgid "LodgeIt version:"
msgstr ""
#: lodgeit/views/about.html:11
msgid " Why the hell another pastebin?" msgid " Why the hell another pastebin?"
msgstr "" msgstr ""
#: lodgeit/views/about.html:7 #: lodgeit/views/about.html:12
msgid "" msgid ""
"\n" "\n"
" Good question. Basically the world doesn't need another pastebin.\n" " Good question. Basically the world doesn't need another pastebin.\n"
@ -102,61 +106,61 @@ msgid ""
" are some features which are unique to LodgeIt." " are some features which are unique to LodgeIt."
msgstr "" msgstr ""
#: lodgeit/views/about.html:15 #: lodgeit/views/about.html:20
msgid "Features" msgid "Features"
msgstr "" msgstr ""
#: lodgeit/views/about.html:17 #: lodgeit/views/about.html:22
msgid "clean user interface" msgid "clean user interface"
msgstr "" msgstr ""
#: lodgeit/views/about.html:18 #: lodgeit/views/about.html:23
msgid "different color schemes for the sourcecode" msgid "different color schemes for the sourcecode"
msgstr "" msgstr ""
#: lodgeit/views/about.html:19 #: lodgeit/views/about.html:24
msgid "reply to pastes" msgid "reply to pastes"
msgstr "" msgstr ""
#: lodgeit/views/about.html:20 #: lodgeit/views/about.html:25
msgid "diffs of two pastes" msgid "diffs of two pastes"
msgstr "" msgstr ""
#: lodgeit/views/about.html:21 #: lodgeit/views/about.html:26
msgid "support for many python template languages" msgid "support for many python template languages"
msgstr "" msgstr ""
#: lodgeit/views/about.html:22 #: lodgeit/views/about.html:27
msgid "" msgid ""
"support for many scripting languages like Python and Ruby, even with\n" "support for many scripting languages like Python and Ruby, even with\n"
" weird syntax (ruby *cough*)" " weird syntax (ruby *cough*)"
msgstr "" msgstr ""
#: lodgeit/views/about.html:24 #: lodgeit/views/about.html:29
msgid "XMLRPC support" msgid "XMLRPC support"
msgstr "" msgstr ""
#: lodgeit/views/about.html:25 #: lodgeit/views/about.html:30
msgid "command-line and editor integration" msgid "command-line and editor integration"
msgstr "" msgstr ""
#: lodgeit/views/about.html:26 #: lodgeit/views/about.html:31
msgid "persistent pastes" msgid "persistent pastes"
msgstr "" msgstr ""
#: lodgeit/views/about.html:27 #: lodgeit/views/about.html:32
msgid "reply notification" msgid "reply notification"
msgstr "" msgstr ""
#: lodgeit/views/about.html:28 #: lodgeit/views/about.html:33
msgid "valid HTML 4.0" msgid "valid HTML 4.0"
msgstr "" msgstr ""
#: lodgeit/views/about.html:30 #: lodgeit/views/about.html:35
msgid "Request More Languages" msgid "Request More Languages"
msgstr "" msgstr ""
#: lodgeit/views/about.html:31 #: lodgeit/views/about.html:36
msgid "" msgid ""
"\n" "\n"
" A language is missing in the list? File a ticket in the\n" " A language is missing in the list? File a ticket in the\n"
@ -165,43 +169,43 @@ msgid ""
" as possible." " as possible."
msgstr "" msgstr ""
#: lodgeit/views/about.html:36 #: lodgeit/views/about.html:41
msgid "Software Used" msgid "Software Used"
msgstr "" msgstr ""
#: lodgeit/views/about.html:38 #: lodgeit/views/about.html:43
msgid "" msgid ""
"<a href=\"http://pygments.pocoo.org/\">Pygments</a> for syntax " "<a href=\"http://pygments.pocoo.org/\">Pygments</a> for syntax "
"highlighting" "highlighting"
msgstr "" msgstr ""
#: lodgeit/views/about.html:39 #: lodgeit/views/about.html:44
msgid "<a href=\"http://www.python.org/\">Python</a> as scripting language" msgid "<a href=\"http://www.python.org/\">Python</a> as scripting language"
msgstr "" msgstr ""
#: lodgeit/views/about.html:40 #: lodgeit/views/about.html:45
msgid "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> for templating" msgid "<a href=\"http://jinja.pocoo.org/2\">Jinja 2</a> for templating"
msgstr "" msgstr ""
#: lodgeit/views/about.html:41 #: lodgeit/views/about.html:46
msgid "" msgid ""
"<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> for the WSGI " "<a href=\"http://werkzeug.pocoo.org/\">Werkzeug</a> for the WSGI "
"implementation" "implementation"
msgstr "" msgstr ""
#: lodgeit/views/about.html:42 #: lodgeit/views/about.html:47
msgid "<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> as database layer" msgid "<a href=\"http://www.sqlalchemy.org\">SQLAlchemy</a> as database layer"
msgstr "" msgstr ""
#: lodgeit/views/about.html:43 #: lodgeit/views/about.html:48
msgid "<a href=\"http://www.jquery.com/\">jQuery</a> for scripting" msgid "<a href=\"http://www.jquery.com/\">jQuery</a> for scripting"
msgstr "" msgstr ""
#: lodgeit/views/about.html:45 #: lodgeit/views/about.html:50
msgid "Who?" msgid "Who?"
msgstr "" msgstr ""
#: lodgeit/views/about.html:46 #: lodgeit/views/about.html:51
msgid "" msgid ""
"\n" "\n"
" This paste was founded by <a " " This paste was founded by <a "
@ -212,11 +216,11 @@ msgid ""
" led by Georg Brandl." " led by Georg Brandl."
msgstr "" msgstr ""
#: lodgeit/views/about.html:52 #: lodgeit/views/about.html:57
msgid "Privacy" msgid "Privacy"
msgstr "" msgstr ""
#: lodgeit/views/about.html:53 #: lodgeit/views/about.html:58
msgid "" msgid ""
"\n" "\n"
" LodgeIt does not use user accounts because it's logging in for " " LodgeIt does not use user accounts because it's logging in for "

View File

@ -2,6 +2,11 @@
{% set page_title = _('About LodgeIt') %} {% set page_title = _('About LodgeIt') %}
{% set active_page = 'about' %} {% set active_page = 'about' %}
{% block body %} {% block body %}
{% if lodgeit_version %}
<div class="text">
{% trans %}LodgeIt version:{% endtrans %} {{ lodgeit_version }}
</div>
{% endif %}
<div class="text"> <div class="text">
<h3 id="why-the-hell-another-pastebin">{% trans %} Why the hell another pastebin?{% endtrans %}</h3> <h3 id="why-the-hell-another-pastebin">{% trans %} Why the hell another pastebin?{% endtrans %}</h3>
<p>{% trans %} <p>{% trans %}