Skip to content

Commit d34c211

Browse files
committed
Bugfix: Connect/disconnect in custom menu not shown
1 parent b5ca203 commit d34c211

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

resources/lang/de.mo

162 Bytes
Binary file not shown.

resources/lang/de.po

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: OAuth2Client\n"
4-
"POT-Creation-Date: 2025-01-23 05:56+0100\n"
5-
"PO-Revision-Date: 2025-01-23 05:56+0100\n"
4+
"POT-Creation-Date: 2025-01-23 06:30+0100\n"
5+
"PO-Revision-Date: 2025-01-23 06:31+0100\n"
66
"Last-Translator: \n"
77
"Language-Team: \n"
88
"Language: de\n"
@@ -142,13 +142,13 @@ msgstr ""
142142
msgid "Sign in with"
143143
msgstr "Anmelden mit"
144144

145-
#: src/OAuth2Client.php:447 resources/views/login-with-provider.phtml:40
146-
msgid "Disconnect from"
147-
msgstr "Verknüpfung lösen von"
145+
#: src/OAuth2Client.php:447
146+
msgid "Disconnect account from"
147+
msgstr "Konto-Verknüpfung lösen von"
148148

149-
#: src/OAuth2Client.php:453 resources/views/login-with-provider.phtml:36
150-
msgid "Connect with"
151-
msgstr "Verknüpfen mit"
149+
#: src/OAuth2Client.php:453
150+
msgid "Connect account with"
151+
msgstr "Konto-Verknüpfung mit"
152152

153153
#: src/OAuth2Client.php:583
154154
#, php-format
@@ -288,6 +288,14 @@ msgstr "Passwort (innerhalb von webtrees)"
288288
msgid "Request a new user account with"
289289
msgstr "Neues Benutzerkonto anfragen mit"
290290

291+
#: resources/views/login-with-provider.phtml:36
292+
msgid "Connect with"
293+
msgstr "Verknüpfen mit"
294+
295+
#: resources/views/login-with-provider.phtml:40
296+
msgid "Disconnect from"
297+
msgstr "Verknüpfung lösen von"
298+
291299
#: resources/views/password-request-page.phtml:51
292300
msgid "Sign in with an authorization provider"
293301
msgstr "Anmelden mit einem Autorisierungsanbieter"

src/OAuth2Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,19 +444,19 @@ public function getMenu(Tree $tree): ?Menu
444444

445445
//If user is connected with an authorization provider, offer disconnect
446446
if ($user->getPreference(OAuth2Client::USER_PREF_PROVIDER_NAME, '') !== '') {
447-
$sub_menu_label = I18N::translate('Disconnect from');
447+
$sub_menu_label = I18N::translate('Disconnect account from');
448448
$connect_action = OAuth2Client::CONNECT_ACTION_DISCONNECT;
449449
$sign_in_button_labels = AuthorizationProviderFactory::getSignInButtonLabelsByUsers(new Collection([$user]));
450450
}
451451
//If user is not connected with an provider, offer to connect to all available providers
452452
else {
453-
$sub_menu_label = I18N::translate('Connect with');
453+
$sub_menu_label = I18N::translate('Connect account with');
454454
$connect_action = OAuth2Client::CONNECT_ACTION_CONNECT;
455455
$sign_in_button_labels = AuthorizationProviderFactory::getSignInButtonLabels();
456456
}
457457

458-
//If users can connect/disconnect with providers, show submenu entries to connect or disconnect
459-
if ($user->getPreference(OAuth2Client::PREF_CONNECT_WITH_PROVIDERS, '') !== '') {
458+
//If users are allowed to connect/disconnect with providers, show submenu entries to connect or disconnect
459+
if ($this->getPreference(OAuth2Client::PREF_CONNECT_WITH_PROVIDERS, '') !== '') {
460460
foreach ($sign_in_button_labels as $provider_name => $sign_in_button_label) {
461461

462462
$submenus[] = new Menu($sub_menu_label . ' ' . $sign_in_button_label,

0 commit comments

Comments
 (0)