From af3168e44945f253001f9eed7525d8cfd9bd532b Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 24 Nov 2015 19:26:29 +0900 Subject: [PATCH] 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 --- lodgeit/__init__.py | 7 +++ lodgeit/controllers/static.py | 4 +- lodgeit/i18n/de/LC_MESSAGES/messages.mo | Bin 22474 -> 22524 bytes lodgeit/i18n/de/LC_MESSAGES/messages.po | 61 +++++++++++----------- lodgeit/i18n/messages.pot | 64 +++++++++++++----------- lodgeit/views/about.html | 5 ++ 6 files changed, 81 insertions(+), 60 deletions(-) diff --git a/lodgeit/__init__.py b/lodgeit/__init__.py index edcd1eb..ed4ff83 100644 --- a/lodgeit/__init__.py +++ b/lodgeit/__init__.py @@ -8,3 +8,10 @@ :copyright: 2007 by Armin Ronacher. :license: BSD """ + +import subprocess + +try: + lodgeit_version = subprocess.check_output(['git', 'rev-parse', 'HEAD'])[:7] +except: + lodgeit_version = "" diff --git a/lodgeit/controllers/static.py b/lodgeit/controllers/static.py index e059ad5..08d6d4e 100644 --- a/lodgeit/controllers/static.py +++ b/lodgeit/controllers/static.py @@ -9,7 +9,7 @@ :license: BSD """ from werkzeug.exceptions import NotFound -from lodgeit import local +from lodgeit import local, lodgeit_version from lodgeit.i18n import lazy_gettext from lodgeit.utils import render_to_response from lodgeit.lib.webapi import get_public_methods @@ -32,7 +32,7 @@ class StaticController(object): return render_to_response('not_found.html') def about(self): - return render_to_response('about.html') + return render_to_response('about.html', lodgeit_version=lodgeit_version) def help(self, topic=None): if topic is None: diff --git a/lodgeit/i18n/de/LC_MESSAGES/messages.mo b/lodgeit/i18n/de/LC_MESSAGES/messages.mo index 0234cb5903b7692f39775b0c6bbd883822b6ce91..483ed243b3d4b58a5c911039615f43b6b996dc29 100644 GIT binary patch delta 2680 zcmZYBeN2{B7{~Do1A5b} z#n90RGg~90#?}_g=8BOcX^Cb||DdL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7S29kieWx`KZ1PxNsdyfBziIc89=3vEPa@Chuz7_P(p=s@xp1rw^o9Iw%0 z3cc_Vbc)uZkKy*_fhnVgG}n#T*CR5vsN~+FlJU7E<0h1rHfP=wAKLuQoT8rp0qHtA A1^@s6 diff --git a/lodgeit/i18n/de/LC_MESSAGES/messages.po b/lodgeit/i18n/de/LC_MESSAGES/messages.po index a04d6cf..8314965 100644 --- a/lodgeit/i18n/de/LC_MESSAGES/messages.po +++ b/lodgeit/i18n/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\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" "Last-Translator: Christopher Grebs \n" "Language-Team: de \n" @@ -86,11 +86,15 @@ msgstr "Mehrere-Dateien" msgid "About 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?" msgstr "Warum zum Teufel ein weiterer Pastebin?" -#: lodgeit/views/about.html:7 +#: lodgeit/views/about.html:12 msgid "" "\n" " Good question. Basically the world doesn't need another pastebin.\n" @@ -110,32 +114,32 @@ msgstr "" " ein intuitives Interface haben.\n" " Dennoch gibt es einige Funktionen die LodgeIt einzigartig machen." -#: lodgeit/views/about.html:15 +#: lodgeit/views/about.html:20 msgid "Features" msgstr "Funktionen" -#: lodgeit/views/about.html:17 +#: lodgeit/views/about.html:22 msgid "clean user interface" msgstr "sauberes Benutzer-Interface" -#: lodgeit/views/about.html:18 +#: lodgeit/views/about.html:23 msgid "different color schemes for the sourcecode" msgstr "verschiedene Farb-Schemata für den Quellcode" -#: lodgeit/views/about.html:19 +#: lodgeit/views/about.html:24 msgid "reply to pastes" msgstr "Man kann auf einen Paste antworten" -#: lodgeit/views/about.html:20 +#: lodgeit/views/about.html:25 #, fuzzy msgid "diffs of two pastes" msgstr "Man kann Pastes vergleichen" -#: lodgeit/views/about.html:21 +#: lodgeit/views/about.html:26 msgid "support for many python template languages" msgstr "Unterstützung für viele Python-Template-Engines" -#: lodgeit/views/about.html:22 +#: lodgeit/views/about.html:27 msgid "" "support for many scripting languages like Python and Ruby, even with\n" " weird syntax (ruby *cough*)" @@ -143,32 +147,32 @@ msgstr "" "Unterstützung für viele Scriptsprachen wie Python oder Ruby, auch mit\n" " schräger Syntax (ruby *würg*)" -#: lodgeit/views/about.html:24 +#: lodgeit/views/about.html:29 msgid "XMLRPC support" msgstr "XMLRPC Support" -#: lodgeit/views/about.html:25 +#: lodgeit/views/about.html:30 #, fuzzy msgid "command-line and editor integration" msgstr "Scripte und Editor-Integration" -#: lodgeit/views/about.html:26 +#: lodgeit/views/about.html:31 msgid "persistent pastes" msgstr "dauerhaft gespeicherte Pastes" -#: lodgeit/views/about.html:27 +#: lodgeit/views/about.html:32 msgid "reply notification" msgstr "Antwort-Benachrichtigungen" -#: lodgeit/views/about.html:28 +#: lodgeit/views/about.html:33 msgid "valid HTML 4.0" msgstr "Valides HTML 4.0" -#: lodgeit/views/about.html:30 +#: lodgeit/views/about.html:35 msgid "Request More Languages" msgstr "Mehr Sprachen" -#: lodgeit/views/about.html:31 +#: lodgeit/views/about.html:36 msgid "" "\n" " A language is missing in the list? File a ticket in the\n" @@ -182,11 +186,11 @@ msgstr "" " Pygments " "Trac 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" msgstr "Benutzte Software" -#: lodgeit/views/about.html:38 +#: lodgeit/views/about.html:43 msgid "" "Pygments for syntax " "highlighting" @@ -194,15 +198,15 @@ msgstr "" "Pygments für das Syntax " "Highlighting" -#: lodgeit/views/about.html:39 +#: lodgeit/views/about.html:44 msgid "Python as scripting language" msgstr "Python als Programmiersprache" -#: lodgeit/views/about.html:40 +#: lodgeit/views/about.html:45 msgid "Jinja 2 for templating" msgstr "Jinja 2 als Template-Engine" -#: lodgeit/views/about.html:41 +#: lodgeit/views/about.html:46 msgid "" "Werkzeug for the WSGI " "implementation" @@ -210,21 +214,21 @@ msgstr "" "Werkzeug für die WSGI-" "Implementation" -#: lodgeit/views/about.html:42 +#: lodgeit/views/about.html:47 msgid "SQLAlchemy as database layer" msgstr "" "SQLAlchemy als Datenbank-" "Schnittstelle" -#: lodgeit/views/about.html:43 +#: lodgeit/views/about.html:48 msgid "jQuery for scripting" msgstr "jQuery fürs Scripting" -#: lodgeit/views/about.html:45 +#: lodgeit/views/about.html:50 msgid "Who?" msgstr "Autoren" -#: lodgeit/views/about.html:46 +#: lodgeit/views/about.html:51 msgid "" "\n" " This paste was founded by Christopher Grebs verwaltet.\n" " Pygments ist ein Pocoo Projekt geleitet von Georg Brandl." -#: lodgeit/views/about.html:52 +#: lodgeit/views/about.html:57 msgid "Privacy" msgstr "Datenschutz" -#: lodgeit/views/about.html:53 +#: lodgeit/views/about.html:58 #, fuzzy msgid "" "\n" @@ -1014,3 +1018,4 @@ msgstr "" #: lodgeit/views/utils/macros.html:58 msgid "update" msgstr "" + diff --git a/lodgeit/i18n/messages.pot b/lodgeit/i18n/messages.pot index e53ae65..25f6802 100644 --- a/lodgeit/i18n/messages.pot +++ b/lodgeit/i18n/messages.pot @@ -1,14 +1,14 @@ # Translations template for PROJECT. -# Copyright (C) 2015 ORGANIZATION +# Copyright (C) 2016 ORGANIZATION # This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2015. +# FIRST AUTHOR , 2016. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -86,11 +86,15 @@ msgstr "" msgid "About LodgeIt" 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?" msgstr "" -#: lodgeit/views/about.html:7 +#: lodgeit/views/about.html:12 msgid "" "\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." msgstr "" -#: lodgeit/views/about.html:15 +#: lodgeit/views/about.html:20 msgid "Features" msgstr "" -#: lodgeit/views/about.html:17 +#: lodgeit/views/about.html:22 msgid "clean user interface" msgstr "" -#: lodgeit/views/about.html:18 +#: lodgeit/views/about.html:23 msgid "different color schemes for the sourcecode" msgstr "" -#: lodgeit/views/about.html:19 +#: lodgeit/views/about.html:24 msgid "reply to pastes" msgstr "" -#: lodgeit/views/about.html:20 +#: lodgeit/views/about.html:25 msgid "diffs of two pastes" msgstr "" -#: lodgeit/views/about.html:21 +#: lodgeit/views/about.html:26 msgid "support for many python template languages" msgstr "" -#: lodgeit/views/about.html:22 +#: lodgeit/views/about.html:27 msgid "" "support for many scripting languages like Python and Ruby, even with\n" " weird syntax (ruby *cough*)" msgstr "" -#: lodgeit/views/about.html:24 +#: lodgeit/views/about.html:29 msgid "XMLRPC support" msgstr "" -#: lodgeit/views/about.html:25 +#: lodgeit/views/about.html:30 msgid "command-line and editor integration" msgstr "" -#: lodgeit/views/about.html:26 +#: lodgeit/views/about.html:31 msgid "persistent pastes" msgstr "" -#: lodgeit/views/about.html:27 +#: lodgeit/views/about.html:32 msgid "reply notification" msgstr "" -#: lodgeit/views/about.html:28 +#: lodgeit/views/about.html:33 msgid "valid HTML 4.0" msgstr "" -#: lodgeit/views/about.html:30 +#: lodgeit/views/about.html:35 msgid "Request More Languages" msgstr "" -#: lodgeit/views/about.html:31 +#: lodgeit/views/about.html:36 msgid "" "\n" " A language is missing in the list? File a ticket in the\n" @@ -165,43 +169,43 @@ msgid "" " as possible." msgstr "" -#: lodgeit/views/about.html:36 +#: lodgeit/views/about.html:41 msgid "Software Used" msgstr "" -#: lodgeit/views/about.html:38 +#: lodgeit/views/about.html:43 msgid "" "Pygments for syntax " "highlighting" msgstr "" -#: lodgeit/views/about.html:39 +#: lodgeit/views/about.html:44 msgid "Python as scripting language" msgstr "" -#: lodgeit/views/about.html:40 +#: lodgeit/views/about.html:45 msgid "Jinja 2 for templating" msgstr "" -#: lodgeit/views/about.html:41 +#: lodgeit/views/about.html:46 msgid "" "Werkzeug for the WSGI " "implementation" msgstr "" -#: lodgeit/views/about.html:42 +#: lodgeit/views/about.html:47 msgid "SQLAlchemy as database layer" msgstr "" -#: lodgeit/views/about.html:43 +#: lodgeit/views/about.html:48 msgid "jQuery for scripting" msgstr "" -#: lodgeit/views/about.html:45 +#: lodgeit/views/about.html:50 msgid "Who?" msgstr "" -#: lodgeit/views/about.html:46 +#: lodgeit/views/about.html:51 msgid "" "\n" " This paste was founded by + {% trans %}LodgeIt version:{% endtrans %} {{ lodgeit_version }} + + {% endif %}

{% trans %} Why the hell another pastebin?{% endtrans %}

{% trans %}