Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use firstname lastname for last edited by #375

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ If you want to do that manually, run `pre-commit run --all-files`. Next to that,

## Tips

- To create translations, run `django-admin makemessages -l de` in the myhpi directory.

### Reset database

1. Delete `db.sqlite3`
Expand Down
3 changes: 2 additions & 1 deletion myhpi/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class InformationPage(BasePage):
@property
def last_edited_by(self):
if self.get_latest_revision():
return self.get_latest_revision().user
user = self.get_latest_revision().user
return f"{user.first_name} {user.last_name}"


class MinutesList(BasePage):
Expand Down
2 changes: 1 addition & 1 deletion myhpi/core/templates/core/information_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1 class="page-title">
<h1 class="toc-title">{% translate "Last edited" %}</h1>
{{ page.last_published_at|date:"d.m.Y, H:i" }}
{% if page.author_visible %}
<i>von</i>
<i>{% translate "by" %}</i>
{{ page.last_edited_by }}
{% endif %}
</aside>
Expand Down
43 changes: 27 additions & 16 deletions myhpi/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-14 12:42+0000\n"
"POT-Creation-Date: 2023-08-09 16:50+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -70,6 +70,10 @@ msgstr "[link fehlt]"
msgid "Last edited"
msgstr "Zuletzt bearbeitet"

#: core/templates/core/information_page.html:22
msgid "by"
msgstr "von"

#: core/templates/core/information_page.html:27
#: core/templates/core/minutes.html:47 polls/templates/polls/poll.html:29
msgid "Table of contents"
Expand Down Expand Up @@ -178,38 +182,46 @@ msgstr " Ergebnisse gefunden."
msgid "No results found."
msgstr "Keine Ergebnisse gefunden."

#: search/templates/search/search_field.html:6 templates/base.html:150
#: search/templates/search/search_field.html:6 templates/base.html:157
msgid "Search..."
msgstr "Suchen..."

#: templates/403.html:5 myhpi/templates/403.html:11
#: templates/403.html:5 templates/403.html:11
msgid "Access denied"
msgstr "Zugang verweigert"

#: templates/403.html:13
msgid ""
"Unfortunately you are not allowed to view this page. This might have one of "
"the following reasons:"
msgstr "Du bist nicht berechtigt, diese Seite zu sehen. Das kann einen der folgenden Gründe haben:"
msgstr ""
"Du bist nicht berechtigt, diese Seite zu sehen. Das kann einen der folgenden "
"Gründe haben:"

#: templates/403.html:16
msgid ""
"You are not logged in and are not accessing the page from the university "
"network."
msgstr "Du bist nicht eingeloggt oder rufst die Seite nicht aus dem Universitätsnetzwerk auf."
msgstr ""
"Du bist nicht eingeloggt oder rufst die Seite nicht aus dem "
"Universitätsnetzwerk auf."

#: templates/403.html:17
msgid ""
"You are not logged in and the page is only available for logged in users."
msgstr "Du bist nicht eingeloggt und die Seite ist nur für eingeloggte Nutzer sichtbar."
msgstr ""
"Du bist nicht eingeloggt und die Seite ist nur für eingeloggte Nutzer "
"sichtbar."

#: templates/403.html:18
msgid ""
"You are logged in but don't have the required permissions to access this "
"page."
msgstr "Du bist eingeloggt, aber hast keine ausreichenden Berechtigungen, um diese Seite zu sehen."
msgstr ""
"Du bist eingeloggt, aber hast keine ausreichenden Berechtigungen, um diese "
"Seite zu sehen."

#: myhpi/templates/404.html:7
#: templates/404.html:7
msgid "Page not found"
msgstr "Seite nicht gefunden."

Expand All @@ -229,19 +241,19 @@ msgstr "Zur Startseite"
msgid "Ctrl+K"
msgstr "Strg+K"

#: templates/base.html:73
#: templates/base.html:74
msgid "Sign in"
msgstr "Anmelden"

#: templates/base.html:93
#: templates/base.html:99
msgid "Your groups:"
msgstr "Deine Gruppen"

#: templates/base.html:100
#: templates/base.html:106
msgid "Sign out"
msgstr "Abmelden"

#: templates/base.html:152
#: templates/base.html:159
msgid "Start search"
msgstr "Suche starten"

Expand Down Expand Up @@ -330,8 +342,10 @@ msgstr ""
"\t"

#: tenca_django/templates/tenca_django/delete_list.html:20
#, fuzzy
#| msgid "Delete list"
msgid "Delete"
msgstr "Löschen"
msgstr "Liste Löschen"

#: tenca_django/templates/tenca_django/delete_list.html:21
msgid "Cancel"
Expand Down Expand Up @@ -484,6 +498,3 @@ msgstr "Die Anmeldung von {email} auf {list} wurde rückgänig gemacht."
#~ msgstr ""
#~ " Die angeforderte Seite existiert nicht. Bitte überprüfe die URL oder "
#~ "nutze das Menü oben, um die gewünschte Seite zu finden. "

#~ msgid "Previous"
#~ msgstr "Vorherige "
Loading