diff --git a/README.md b/README.md index 4e1cec7e04c28c65867d55a217797feb516056fc..a4ded7a174b281ddf4c57da2fcb8c8262458e80f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Development chat: [#uffd-development](https://rocket.events.ccc.de/channel/uffd- - python3-fido2 (version 0.5.0, optional) - python3-flask-oauthlib - python3-flask-babel -- git (cli utility, musst be in path) Some of the dependencies (especially fido2 and flask-oauthlib) changed their API in recent versions, so make sure to install the versions from Debian Buster. You can also use virtualenv with the supplied `requirements.txt`. diff --git a/uffd/template_helper.py b/uffd/template_helper.py index cc02d55621fb506141e3ef5fbd9ba01149af018c..ba973fb7a565e6718f4256369f8ebb02965adcd0 100644 --- a/uffd/template_helper.py +++ b/uffd/template_helper.py @@ -1,5 +1,4 @@ import random -import subprocess import base64 from datetime import timedelta, datetime import io @@ -28,11 +27,6 @@ def register_template_helper(app): def datauri(data, mimetype='text/plain'): #pylint: disable=unused-variable return Markup('data:%s;base64,%s'%(mimetype, base64.b64encode(data.encode()).decode())) - @app.url_defaults - def static_version_inject(endpoint, values): #pylint: disable=unused-variable - if endpoint == 'static': - values['v'] = app.jinja_env.globals['gitversion']['longhash'] #pylint: disable=no-member - app.jinja_env.trim_blocks = True app.jinja_env.lstrip_blocks = True @@ -42,7 +36,3 @@ def register_template_helper(app): app.add_template_global(min, name='min') app.add_template_global(max, name='max') app.add_template_global(equalto, name='equalto') - - # get git commit - git_output = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%H#%h#%d#%s"]).decode('UTF-8').split('#', 3) - app.jinja_env.globals['gitversion'] = {'hash': git_output[1], 'longhash': git_output[0], 'branch': git_output[2], 'msg': git_output[3]} #pylint: disable=no-member diff --git a/uffd/templates/base.html b/uffd/templates/base.html index 63406e58c513eb4f9959fd446d7ff72bcde1e114..699a905d3dad2fd619f9fda0dfc28d590ef771b6 100644 --- a/uffd/templates/base.html +++ b/uffd/templates/base.html @@ -130,8 +130,7 @@ <li class="list-inline-item"><a href="{{ link.url }}">{{ link.title }}</a></li> {% endfor %} <li class="list-inline-item float-right"> - <a href="https://git.cccv.de/uffd/uffd/">{{_("Sourcecode")}}</a> - <a target="_blank" href="https://git.cccv.de/uffd/uffd/-/commit/{{ gitversion.longhash }}"><span title="{{ gitversion.branch }} {{ gitversion.hash }}: {{ gitversion.msg }}" data-toggle="tooltip">Version: {{ gitversion.hash }}</span></a> + <a href="https://git.cccv.de/uffd/uffd/">{{_("About uffd")}}</a> </li> </ul> </div> diff --git a/uffd/translations/de/LC_MESSAGES/messages.mo b/uffd/translations/de/LC_MESSAGES/messages.mo index e275eb91a683da1156ad7f935e44542a327d4a36..3fb2252ba8b5eba1f3c47aa9ec52c6b5eef02364 100644 Binary files a/uffd/translations/de/LC_MESSAGES/messages.mo and b/uffd/translations/de/LC_MESSAGES/messages.mo differ diff --git a/uffd/translations/de/LC_MESSAGES/messages.po b/uffd/translations/de/LC_MESSAGES/messages.po index 6fb606da2667c272dcf78413937851e5e9b8f942..8860b6b4cdcbacd96dc03b60a612dbb3d38cce56 100644 --- a/uffd/translations/de/LC_MESSAGES/messages.po +++ b/uffd/translations/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: 2021-07-30 19:49+0200\n" +"POT-Creation-Date: 2021-07-30 21:03+0200\n" "PO-Revision-Date: 2021-05-25 21:18+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -962,8 +962,8 @@ msgstr "Verlassen von Rollen ist deaktiviert" #: uffd/selfservice/views.py:147 #, python-format -msgid "You left role \"%(role_name)s\"" -msgstr "Rolle \"%(role_name)s\" verlassen" +msgid "You left role %(role_name)s" +msgstr "Rolle %(role_name)s verlassen" #: uffd/selfservice/views.py:211 #, python-format @@ -1408,8 +1408,8 @@ msgid "Change" msgstr "Ändern" #: uffd/templates/base.html:133 -msgid "Sourcecode" -msgstr "Quellcode" +msgid "About uffd" +msgstr "Über uffd" #: uffd/user/views_group.py:21 msgid "Groups"