From f212df79e5f87cfc06bccdc7296fe125ef7798ea Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 12 Dec 2021 07:54:18 -0500 Subject: [PATCH 1/2] Redirect to network page after delegation switch - Add a notice with the switched account name --- src/Module/Delegation.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index bc3c72e8d..c1cf15759 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -108,8 +108,9 @@ class Delegation extends BaseModule $ret = []; Hook::callAll('home_init', $ret); - DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname()); - // NOTREACHED + notice($this->t('You are now logged in as %s', $user['username'])); + + DI::baseUrl()->redirect('network'); } protected function content(array $request = []): string From b0b5a6c6f246202fc97eb63d3a8a504104c559e5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 12 Dec 2021 07:58:59 -0500 Subject: [PATCH 2/2] Update main translation file after adding a string --- view/lang/C/messages.po | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 17d33bc16..c1ffab662 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2021.12-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-08 13:36+0000\n" +"POT-Creation-Date: 2021-12-12 07:58-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -128,7 +128,7 @@ msgstr "" #: mod/wallmessage.php:37 mod/wallmessage.php:56 mod/wallmessage.php:90 #: mod/wallmessage.php:110 src/Module/Attach.php:55 src/Module/BaseApi.php:92 #: src/Module/BaseNotifications.php:97 src/Module/Contact/Advanced.php:60 -#: src/Module/Delegation.php:118 src/Module/FollowConfirm.php:18 +#: src/Module/Delegation.php:119 src/Module/FollowConfirm.php:18 #: src/Module/FriendSuggest.php:56 src/Module/Group.php:42 #: src/Module/Group.php:85 src/Module/Invite.php:41 src/Module/Invite.php:130 #: src/Module/Notifications/Notification.php:48 @@ -407,7 +407,7 @@ msgstr "" #: src/Module/Debug/ActivityPubConversion.php:141 #: src/Module/Debug/Babel.php:313 src/Module/Debug/Localtime.php:64 #: src/Module/Debug/Probe.php:54 src/Module/Debug/WebFinger.php:51 -#: src/Module/Delegation.php:147 src/Module/FriendSuggest.php:144 +#: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144 #: src/Module/Install.php:252 src/Module/Install.php:294 #: src/Module/Install.php:331 src/Module/Invite.php:177 #: src/Module/Item/Compose.php:150 src/Module/Profile/Profile.php:247 @@ -2127,16 +2127,16 @@ msgstr "" msgid "toggle mobile" msgstr "" -#: src/App/Router.php:276 +#: src/App/Router.php:286 #, php-format msgid "Method not allowed for this module. Allowed method(s): %s" msgstr "" -#: src/App/Router.php:278 src/Module/HTTPException/PageNotFound.php:33 +#: src/App/Router.php:288 src/Module/HTTPException/PageNotFound.php:33 msgid "Page not found." msgstr "" -#: src/App/Router.php:305 +#: src/App/Router.php:315 msgid "You must be logged in to use addons. " msgstr "" @@ -7903,21 +7903,26 @@ msgstr "" msgid "Lookup address:" msgstr "" -#: src/Module/Delegation.php:142 -msgid "Switch between your accounts" +#: src/Module/Delegation.php:111 +#, php-format +msgid "You are now logged in as %s" msgstr "" #: src/Module/Delegation.php:143 -msgid "Manage your accounts" +msgid "Switch between your accounts" msgstr "" #: src/Module/Delegation.php:144 +msgid "Manage your accounts" +msgstr "" + +#: src/Module/Delegation.php:145 msgid "" "Toggle between different identities or community/group pages which share " "your account details or which you have been granted \"manage\" permissions" msgstr "" -#: src/Module/Delegation.php:145 +#: src/Module/Delegation.php:146 msgid "Select an identity to manage: " msgstr ""