diff options
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.mo | bin | 9769 -> 9866 bytes | |||
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.po | 32 | ||||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.mo | bin | 9197 -> 9289 bytes | |||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.po | 32 | ||||
-rw-r--r-- | fietsboek/locale/fietslog.pot | 26 | ||||
-rw-r--r-- | fietsboek/templates/layout.jinja2 | 56 |
6 files changed, 91 insertions, 55 deletions
diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.mo b/fietsboek/locale/de/LC_MESSAGES/messages.mo Binary files differindex b0d23d3..34bd05a 100644 --- a/fietsboek/locale/de/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/de/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.po b/fietsboek/locale/de/LC_MESSAGES/messages.po index 47bcabb..0912079 100644 --- a/fietsboek/locale/de/LC_MESSAGES/messages.po +++ b/fietsboek/locale/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: 2022-07-09 15:04+0200\n" +"POT-Creation-Date: 2022-07-11 14:34+0200\n" "PO-Revision-Date: 2022-07-02 17:35+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -368,29 +368,37 @@ msgid "page.navbar.browse" msgstr "Stöbern" #: fietsboek/templates/layout.jinja2:44 -msgid "page.navbar.login" -msgstr "Anmelden" +msgid "page.navbar.upload" +msgstr "Hochladen" #: fietsboek/templates/layout.jinja2:48 -msgid "page.navbar.create_account" -msgstr "Konto Erstellen" +msgid "page.navbar.user" +msgstr "Nutzer" -#: fietsboek/templates/layout.jinja2:53 +#: fietsboek/templates/layout.jinja2:52 +msgid "page.navbar.welcome_user" +msgstr "Willkommen, {}!" + +#: fietsboek/templates/layout.jinja2:55 msgid "page.navbar.logout" msgstr "Abmelden" -#: fietsboek/templates/layout.jinja2:56 -msgid "page.navbar.upload" -msgstr "Hochladen" - -#: fietsboek/templates/layout.jinja2:59 +#: fietsboek/templates/layout.jinja2:58 msgid "page.navbar.profile" msgstr "Profil" -#: fietsboek/templates/layout.jinja2:63 +#: fietsboek/templates/layout.jinja2:62 msgid "page.navbar.admin" msgstr "Admin" +#: fietsboek/templates/layout.jinja2:68 +msgid "page.navbar.login" +msgstr "Anmelden" + +#: fietsboek/templates/layout.jinja2:72 +msgid "page.navbar.create_account" +msgstr "Konto Erstellen" + #: fietsboek/templates/login.jinja2:7 msgid "page.login.title" msgstr "Anmelden" diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.mo b/fietsboek/locale/en/LC_MESSAGES/messages.mo Binary files differindex 493c094..127794c 100644 --- a/fietsboek/locale/en/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/en/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.po b/fietsboek/locale/en/LC_MESSAGES/messages.po index acc5a7e..723c12c 100644 --- a/fietsboek/locale/en/LC_MESSAGES/messages.po +++ b/fietsboek/locale/en/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: 2022-07-09 15:04+0200\n" +"POT-Creation-Date: 2022-07-11 14:34+0200\n" "PO-Revision-Date: 2022-06-28 13:11+0200\n" "Last-Translator: \n" "Language: en\n" @@ -364,29 +364,37 @@ msgid "page.navbar.browse" msgstr "Browse" #: fietsboek/templates/layout.jinja2:44 -msgid "page.navbar.login" -msgstr "Login" +msgid "page.navbar.upload" +msgstr "Upload" #: fietsboek/templates/layout.jinja2:48 -msgid "page.navbar.create_account" -msgstr "Create Account" +msgid "page.navbar.user" +msgstr "User" -#: fietsboek/templates/layout.jinja2:53 +#: fietsboek/templates/layout.jinja2:52 +msgid "page.navbar.welcome_user" +msgstr "Welcome, {}!" + +#: fietsboek/templates/layout.jinja2:55 msgid "page.navbar.logout" msgstr "Logout" -#: fietsboek/templates/layout.jinja2:56 -msgid "page.navbar.upload" -msgstr "Upload" - -#: fietsboek/templates/layout.jinja2:59 +#: fietsboek/templates/layout.jinja2:58 msgid "page.navbar.profile" msgstr "Profile" -#: fietsboek/templates/layout.jinja2:63 +#: fietsboek/templates/layout.jinja2:62 msgid "page.navbar.admin" msgstr "Admin" +#: fietsboek/templates/layout.jinja2:68 +msgid "page.navbar.login" +msgstr "Login" + +#: fietsboek/templates/layout.jinja2:72 +msgid "page.navbar.create_account" +msgstr "Create Account" + #: fietsboek/templates/login.jinja2:7 msgid "page.login.title" msgstr "Login" diff --git a/fietsboek/locale/fietslog.pot b/fietsboek/locale/fietslog.pot index ee0be47..b3a5837 100644 --- a/fietsboek/locale/fietslog.pot +++ b/fietsboek/locale/fietslog.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-07-09 15:04+0200\n" +"POT-Creation-Date: 2022-07-11 14:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -361,29 +361,37 @@ msgid "page.navbar.browse" msgstr "" #: fietsboek/templates/layout.jinja2:44 -msgid "page.navbar.login" +msgid "page.navbar.upload" msgstr "" #: fietsboek/templates/layout.jinja2:48 -msgid "page.navbar.create_account" +msgid "page.navbar.user" msgstr "" -#: fietsboek/templates/layout.jinja2:53 -msgid "page.navbar.logout" +#: fietsboek/templates/layout.jinja2:52 +msgid "page.navbar.welcome_user" msgstr "" -#: fietsboek/templates/layout.jinja2:56 -msgid "page.navbar.upload" +#: fietsboek/templates/layout.jinja2:55 +msgid "page.navbar.logout" msgstr "" -#: fietsboek/templates/layout.jinja2:59 +#: fietsboek/templates/layout.jinja2:58 msgid "page.navbar.profile" msgstr "" -#: fietsboek/templates/layout.jinja2:63 +#: fietsboek/templates/layout.jinja2:62 msgid "page.navbar.admin" msgstr "" +#: fietsboek/templates/layout.jinja2:68 +msgid "page.navbar.login" +msgstr "" + +#: fietsboek/templates/layout.jinja2:72 +msgid "page.navbar.create_account" +msgstr "" + #: fietsboek/templates/login.jinja2:7 msgid "page.login.title" msgstr "" diff --git a/fietsboek/templates/layout.jinja2 b/fietsboek/templates/layout.jinja2 index 3e0b3ea..a03b7c1 100644 --- a/fietsboek/templates/layout.jinja2 +++ b/fietsboek/templates/layout.jinja2 @@ -32,38 +32,50 @@ var FRIENDS_URL = "{{ request.route_url('json-friends') }}"; <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbar"> - <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <ul class="navbar-nav w-100 mb-2 mb-lg-0"> <li class="nav-item"> <a class="nav-link" href="{{ request.route_url('home') }}">{{ _("page.navbar.home") }}</a> </li> <li class="nav-item"> <a class="nav-link" href="{{ request.route_url('browse') }}">{{ _("page.navbar.browse") }}</a> </li> - {% if request.identity is none %} - <li class="nav-item"> - <a class="nav-link" href="{{ request.route_url('login') }}">{{ _("page.navbar.login") }}</a> - </li> - {% if request.registry.settings.get('enable_account_registration') %} - <li class="nav-item"> - <a class="nav-link" href="{{ request.route_url('create-account') }}">{{ _("page.navbar.create_account") }}</a> - </li> - {% endif %} - {% else %} - <li class="nav-item"> - <a class="nav-link" href="{{ request.route_url('logout') }}">{{ _("page.navbar.logout") }}</a> - </li> + {% if request.identity is not none %} <li class="nav-item"> <a class="nav-link" href="{{ request.route_url('upload') }}">{{ _("page.navbar.upload") }}</a> </li> - <li class="nav-item"> - <a class="nav-link" href="{{ request.route_url('profile') }}">{{ _("page.navbar.profile") }}</a> - </li> - {% if request.identity.is_admin %} - <li class="nav-item"> - <a class="nav-link" href="{{ request.route_url('admin') }}">{{ _("page.navbar.admin") }}</a> - </li> - {% endif %} {% endif %} + <li class="nav-item ms-lg-auto dropdown"> + <a class="nav-link dropdown-toggle" id="navbarUserMenu" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">{{ _("page.navbar.user") }}</a> + <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarUserMenu"> + {% if request.identity %} + {# Items shown to logged in users #} + <li><h6 class="dropdown-header">{{ _("page.navbar.welcome_user").format(request.identity.name) }}</h6></li> + <li><hr class="dropdown-divider"></li> + <li> + <a class="dropdown-item" href="{{ request.route_url('logout') }}">{{ _("page.navbar.logout") }}</a> + </li> + <li> + <a class="dropdown-item" href="{{ request.route_url('profile') }}">{{ _("page.navbar.profile") }}</a> + </li> + {% if request.identity.is_admin %} + <li> + <a class="dropdown-item" href="{{ request.route_url('admin') }}">{{ _("page.navbar.admin") }}</a> + </li> + {% endif %} + {% else %} + {# Items shown to not-logged-in users #} + <li> + <a class="dropdown-item" href="{{ request.route_url('login') }}">{{ _("page.navbar.login") }}</a> + </li> + {% if request.registry.settings.get('enable_account_registration') %} + <li> + <a class="dropdown-item" href="{{ request.route_url('create-account') }}">{{ _("page.navbar.create_account") }}</a> + </li> + {% endif %} + {% endif %} + </ul> + + </li> </ul> </div> </div> |