Merge pull request #14963 from mf-fx/replace_no_messages_notification_by_text
Some checks are pending
Code Quality / PHP-CS-Fixer (PHP 8.3) (push) Waiting to run
Code Quality / PHPStan (PHP 8.4) (push) Waiting to run
Code Quality / PHPStan in addons (PHP 8.4) (push) Waiting to run
Code Quality / PHPMD (PHP 8.4) (push) Waiting to run
CI tests / Unit-Tests (PHP 7.4) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.0) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.1) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.2) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.3) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.4) (push) Waiting to run
CI tests / Unit-Tests (PHP 8.5) (push) Waiting to run
CI tests / Database-Tests (PHP 7.4) (push) Waiting to run
CI tests / Database-Tests (PHP 8.0) (push) Waiting to run
CI tests / Database-Tests (PHP 8.1) (push) Waiting to run
CI tests / Database-Tests (PHP 8.2) (push) Waiting to run
CI tests / Database-Tests (PHP 8.3) (push) Waiting to run
CI tests / Database-Tests (PHP 8.4) (push) Waiting to run
CI tests / Database-Tests (PHP 8.5) (push) Waiting to run

Replace fleeting 'No messages' notification with regular text
This commit is contained in:
Michael Vogel 2025-06-03 05:45:15 +02:00 committed by GitHub
commit f6333d38e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 101 additions and 99 deletions

View file

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Copyright (C) 2010-2024, the Friendica project * Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project * SPDX-FileCopyrightText: 2010-2024 the Friendica project
@ -207,7 +208,7 @@ function message_content()
$r = get_messages(DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage()); $r = get_messages(DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage());
if (!DBA::isResult($r)) { if (!DBA::isResult($r)) {
DI::sysmsg()->addNotice(DI::l10n()->t('No messages.')); $o .= DI::l10n()->t('You have no messages.');
return $o; return $o;
} }
@ -222,7 +223,8 @@ function message_content()
$o .= $header; $o .= $header;
$message = DBA::fetchFirst(" $message = DBA::fetchFirst(
"
SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb` SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
FROM `mail` FROM `mail`
LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
@ -245,7 +247,8 @@ function message_content()
} else { } else {
$sql_extra = "AND `mail`.`parent-uri` = ?"; $sql_extra = "AND `mail`.`parent-uri` = ?";
} }
$messages_stmt = DBA::p(" $messages_stmt = DBA::p(
"
SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb` SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
FROM `mail` FROM `mail`
LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
@ -396,8 +399,7 @@ function get_messages(int $uid, int $start, int $limit): array
LEFT JOIN `contact` c ON m.`contact-id` = c.`id` LEFT JOIN `contact` c ON m.`contact-id` = c.`id`
WHERE m.`uid` = ? WHERE m.`uid` = ?
ORDER BY m2.`mailcreated` DESC ORDER BY m2.`mailcreated` DESC
LIMIT ?, ?' LIMIT ?, ?', $uid, $uid, $start, $limit));
, $uid, $uid, $start, $limit));
} }
function render_messages(array $msg, string $t): string function render_messages(array $msg, string $t): string

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2025.02-dev\n" "Project-Id-Version: 2025.02-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-17 21:51+0200\n" "POT-Creation-Date: 2025-06-02 19:22+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -314,7 +314,7 @@ msgid "Submit"
msgstr "" msgstr ""
#: mod/message.php:210 #: mod/message.php:210
msgid "No messages." msgid "You have no messages."
msgstr "" msgstr ""
#: mod/message.php:266 #: mod/message.php:266
@ -589,7 +589,7 @@ msgid "Rotate CCW (left)"
msgstr "" msgstr ""
#: mod/photos.php:1094 mod/photos.php:1150 mod/photos.php:1230 #: mod/photos.php:1094 mod/photos.php:1150 mod/photos.php:1230
#: src/Module/Contact.php:599 src/Module/Item/Compose.php:187 #: src/Module/Contact.php:601 src/Module/Item/Compose.php:187
#: src/Object/Post.php:1156 #: src/Object/Post.php:1156
msgid "This is you" msgid "This is you"
msgstr "" msgstr ""
@ -779,19 +779,19 @@ msgid "All contacts"
msgstr "" msgstr ""
#: src/BaseModule.php:440 src/Content/Conversation/Factory/Channel.php:32 #: src/BaseModule.php:440 src/Content/Conversation/Factory/Channel.php:32
#: src/Content/Widget.php:257 src/Core/ACL.php:185 src/Module/Contact.php:394 #: src/Content/Widget.php:257 src/Core/ACL.php:185 src/Module/Contact.php:396
#: src/Module/Privacy/PermissionTooltip.php:181 #: src/Module/Privacy/PermissionTooltip.php:181
#: src/Module/Privacy/PermissionTooltip.php:203 #: src/Module/Privacy/PermissionTooltip.php:203
#: src/Module/Settings/Channels.php:146 #: src/Module/Settings/Channels.php:146
msgid "Followers" msgid "Followers"
msgstr "" msgstr ""
#: src/BaseModule.php:445 src/Content/Widget.php:258 src/Module/Contact.php:397 #: src/BaseModule.php:445 src/Content/Widget.php:258 src/Module/Contact.php:399
#: src/Module/Settings/Channels.php:145 #: src/Module/Settings/Channels.php:145
msgid "Following" msgid "Following"
msgstr "" msgstr ""
#: src/BaseModule.php:450 src/Content/Widget.php:259 src/Module/Contact.php:400 #: src/BaseModule.php:450 src/Content/Widget.php:259 src/Module/Contact.php:402
msgid "Mutual friends" msgid "Mutual friends"
msgstr "" msgstr ""
@ -1695,7 +1695,7 @@ msgid "Network Widgets"
msgstr "" msgstr ""
#: src/Content/Feature.php:126 src/Content/Widget.php:233 #: src/Content/Feature.php:126 src/Content/Widget.php:233
#: src/Model/Circle.php:587 src/Module/Contact.php:380 #: src/Model/Circle.php:587 src/Module/Contact.php:382
#: src/Module/Welcome.php:62 #: src/Module/Welcome.php:62
msgid "Circles" msgid "Circles"
msgstr "" msgstr ""
@ -1880,7 +1880,7 @@ msgstr ""
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
#: src/Content/Item.php:428 src/Module/Contact.php:448 #: src/Content/Item.php:428 src/Module/Contact.php:450
#: src/Module/Contact/Profile.php:560 #: src/Module/Contact/Profile.php:560
#: src/Module/Moderation/Blocklist/Contact.php:104 #: src/Module/Moderation/Blocklist/Contact.php:104
#: src/Module/Moderation/Users/Active.php:93 #: src/Module/Moderation/Users/Active.php:93
@ -1888,7 +1888,7 @@ msgstr ""
msgid "Block" msgid "Block"
msgstr "" msgstr ""
#: src/Content/Item.php:429 src/Module/Contact.php:449 #: src/Content/Item.php:429 src/Module/Contact.php:451
#: src/Module/Contact/Profile.php:568 #: src/Module/Contact/Profile.php:568
#: src/Module/Notifications/Introductions.php:126 #: src/Module/Notifications/Introductions.php:126
#: src/Module/Notifications/Introductions.php:199 #: src/Module/Notifications/Introductions.php:199
@ -1896,7 +1896,7 @@ msgstr ""
msgid "Ignore" msgid "Ignore"
msgstr "" msgstr ""
#: src/Content/Item.php:430 src/Module/Contact.php:450 #: src/Content/Item.php:430 src/Module/Contact.php:452
#: src/Module/Contact/Profile.php:576 #: src/Module/Contact/Profile.php:576
msgid "Collapse" msgid "Collapse"
msgstr "" msgstr ""
@ -1963,7 +1963,7 @@ msgid "Sign in"
msgstr "" msgstr ""
#: src/Content/Nav.php:225 src/Module/BaseProfile.php:42 #: src/Content/Nav.php:225 src/Module/BaseProfile.php:42
#: src/Module/Contact.php:492 #: src/Module/Contact.php:494
msgid "Conversations" msgid "Conversations"
msgstr "" msgstr ""
@ -1972,7 +1972,7 @@ msgid "Conversations you started"
msgstr "" msgstr ""
#: src/Content/Nav.php:226 src/Module/BaseProfile.php:34 #: src/Content/Nav.php:226 src/Module/BaseProfile.php:34
#: src/Module/BaseSettings.php:86 src/Module/Contact.php:484 #: src/Module/BaseSettings.php:86 src/Module/Contact.php:486
#: src/Module/Contact/Profile.php:462 src/Module/Profile/Profile.php:277 #: src/Module/Contact/Profile.php:462 src/Module/Profile/Profile.php:277
#: src/Module/Welcome.php:43 view/theme/frio/theme.php:219 #: src/Module/Welcome.php:43 view/theme/frio/theme.php:219
msgid "Profile" msgid "Profile"
@ -1992,7 +1992,7 @@ msgid "Your photos"
msgstr "" msgstr ""
#: src/Content/Nav.php:228 src/Module/BaseProfile.php:58 #: src/Content/Nav.php:228 src/Module/BaseProfile.php:58
#: src/Module/BaseProfile.php:61 src/Module/Contact.php:508 #: src/Module/BaseProfile.php:61 src/Module/Contact.php:510
#: view/theme/frio/theme.php:224 #: view/theme/frio/theme.php:224
msgid "Media" msgid "Media"
msgstr "" msgstr ""
@ -2074,8 +2074,8 @@ msgstr ""
#: src/Content/Nav.php:270 src/Content/Nav.php:325 #: src/Content/Nav.php:270 src/Content/Nav.php:325
#: src/Content/Text/HTML.php:872 src/Module/BaseProfile.php:112 #: src/Content/Text/HTML.php:872 src/Module/BaseProfile.php:112
#: src/Module/BaseProfile.php:115 src/Module/Contact.php:406 #: src/Module/BaseProfile.php:115 src/Module/Contact.php:408
#: src/Module/Contact.php:516 view/theme/frio/theme.php:232 #: src/Module/Contact.php:518 view/theme/frio/theme.php:232
msgid "Contacts" msgid "Contacts"
msgstr "" msgstr ""
@ -2240,28 +2240,28 @@ msgstr ""
msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s" msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:926 src/Model/Item.php:3850 #: src/Content/Text/BBCode.php:931 src/Model/Item.php:3850
#: src/Model/Item.php:3856 src/Model/Item.php:3857 #: src/Model/Item.php:3856 src/Model/Item.php:3857
msgid "Link to source" msgid "Link to source"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1748 src/Content/Text/HTML.php:900 #: src/Content/Text/BBCode.php:1753 src/Content/Text/HTML.php:900
msgid "Click to open/close" msgid "Click to open/close"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1803 #: src/Content/Text/BBCode.php:1808
msgid "$1 wrote:" msgid "$1 wrote:"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1877 src/Content/Text/BBCode.php:1878 #: src/Content/Text/BBCode.php:1882 src/Content/Text/BBCode.php:1883
msgid "Encrypted content" msgid "Encrypted content"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:2211 #: src/Content/Text/BBCode.php:2229
msgid "Invalid source protocol" msgid "Invalid source protocol"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:2230 #: src/Content/Text/BBCode.php:2248
msgid "Invalid link protocol" msgid "Invalid link protocol"
msgstr "" msgstr ""
@ -2313,7 +2313,7 @@ msgstr ""
msgid "Examples: Robert Morgenstein, Fishing" msgid "Examples: Robert Morgenstein, Fishing"
msgstr "" msgstr ""
#: src/Content/Widget.php:67 src/Module/Contact.php:440 #: src/Content/Widget.php:67 src/Module/Contact.php:442
#: src/Module/Directory.php:82 view/theme/vier/theme.php:184 #: src/Module/Directory.php:82 view/theme/vier/theme.php:184
msgid "Find" msgid "Find"
msgstr "" msgstr ""
@ -2348,7 +2348,7 @@ msgstr ""
msgid "Everyone" msgid "Everyone"
msgstr "" msgstr ""
#: src/Content/Widget.php:260 src/Module/Contact.php:403 #: src/Content/Widget.php:260 src/Module/Contact.php:405
msgid "No relationship" msgid "No relationship"
msgstr "" msgstr ""
@ -2357,7 +2357,7 @@ msgid "Relationships"
msgstr "" msgstr ""
#: src/Content/Widget.php:267 src/Module/Circle.php:281 #: src/Content/Widget.php:267 src/Module/Circle.php:281
#: src/Module/Contact.php:324 #: src/Module/Contact.php:326
msgid "All Contacts" msgid "All Contacts"
msgstr "" msgstr ""
@ -4377,7 +4377,7 @@ msgid "Policies"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:454 src/Module/Calendar/Event/Form.php:238 #: src/Module/Admin/Site.php:454 src/Module/Calendar/Event/Form.php:238
#: src/Module/Contact.php:527 src/Module/Profile/Profile.php:285 #: src/Module/Contact.php:529 src/Module/Profile/Profile.php:285
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr ""
@ -5718,7 +5718,7 @@ msgstr ""
msgid "Item Source" msgid "Item Source"
msgstr "" msgstr ""
#: src/Module/BaseProfile.php:37 src/Module/Contact.php:487 #: src/Module/BaseProfile.php:37 src/Module/Contact.php:489
msgid "Profile Details" msgid "Profile Details"
msgstr "" msgstr ""
@ -5742,8 +5742,8 @@ msgstr ""
msgid "Tips for New Members" msgid "Tips for New Members"
msgstr "" msgstr ""
#: src/Module/BaseProfile.php:141 src/Module/Contact.php:390 #: src/Module/BaseProfile.php:141 src/Module/Contact.php:392
#: src/Module/Contact.php:537 src/Module/Conversation/Channel.php:98 #: src/Module/Contact.php:539 src/Module/Conversation/Channel.php:98
#: src/Module/Conversation/Community.php:91 #: src/Module/Conversation/Community.php:91
#: src/Module/Conversation/Network.php:349 #: src/Module/Conversation/Network.php:349
#: src/Module/Moderation/BaseUsers.php:130 src/Object/Post.php:611 #: src/Module/Moderation/BaseUsers.php:130 src/Object/Post.php:611
@ -6041,142 +6041,142 @@ msgid_plural "%d contacts edited."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: src/Module/Contact.php:327 #: src/Module/Contact.php:329
msgid "Show all contacts" msgid "Show all contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:332 src/Module/Contact.php:411 #: src/Module/Contact.php:334 src/Module/Contact.php:413
#: src/Module/Moderation/BaseUsers.php:92 #: src/Module/Moderation/BaseUsers.php:92
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
#: src/Module/Contact.php:335 #: src/Module/Contact.php:337
msgid "Only show pending contacts" msgid "Only show pending contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:340 src/Module/Contact.php:414 #: src/Module/Contact.php:342 src/Module/Contact.php:416
#: src/Module/Moderation/BaseUsers.php:100 #: src/Module/Moderation/BaseUsers.php:100
msgid "Blocked" msgid "Blocked"
msgstr "" msgstr ""
#: src/Module/Contact.php:343 #: src/Module/Contact.php:345
msgid "Only show blocked contacts" msgid "Only show blocked contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:348 src/Module/Contact.php:420 #: src/Module/Contact.php:350 src/Module/Contact.php:422
#: src/Module/Settings/Server/Index.php:93 src/Object/Post.php:390 #: src/Module/Settings/Server/Index.php:93 src/Object/Post.php:390
msgid "Ignored" msgid "Ignored"
msgstr "" msgstr ""
#: src/Module/Contact.php:351 #: src/Module/Contact.php:353
msgid "Only show ignored contacts" msgid "Only show ignored contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:356 src/Module/Contact.php:423 #: src/Module/Contact.php:358 src/Module/Contact.php:425
msgid "Collapsed" msgid "Collapsed"
msgstr "" msgstr ""
#: src/Module/Contact.php:359 #: src/Module/Contact.php:361
msgid "Only show collapsed contacts" msgid "Only show collapsed contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:364 src/Module/Contact.php:426 #: src/Module/Contact.php:366 src/Module/Contact.php:428
msgid "Archived" msgid "Archived"
msgstr "" msgstr ""
#: src/Module/Contact.php:367 #: src/Module/Contact.php:369
msgid "Only show archived contacts" msgid "Only show archived contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:372 src/Module/Contact.php:417 #: src/Module/Contact.php:374 src/Module/Contact.php:419
msgid "Hidden" msgid "Hidden"
msgstr "" msgstr ""
#: src/Module/Contact.php:375 #: src/Module/Contact.php:377
msgid "Only show hidden contacts" msgid "Only show hidden contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:383 #: src/Module/Contact.php:385
msgid "Organize your contact circles" msgid "Organize your contact circles"
msgstr "" msgstr ""
#: src/Module/Contact.php:438 #: src/Module/Contact.php:440
msgid "Search your contacts" msgid "Search your contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:439 src/Module/Search/Index.php:202 #: src/Module/Contact.php:441 src/Module/Search/Index.php:202
#, php-format #, php-format
msgid "Results for: %s" msgid "Results for: %s"
msgstr "" msgstr ""
#: src/Module/Contact.php:447 #: src/Module/Contact.php:449
msgid "Update" msgid "Update"
msgstr "" msgstr ""
#: src/Module/Contact.php:448 src/Module/Contact/Profile.php:560 #: src/Module/Contact.php:450 src/Module/Contact/Profile.php:560
#: src/Module/Moderation/Blocklist/Contact.php:105 #: src/Module/Moderation/Blocklist/Contact.php:105
#: src/Module/Moderation/Users/Blocked.php:94 #: src/Module/Moderation/Users/Blocked.php:94
#: src/Module/Moderation/Users/Index.php:103 #: src/Module/Moderation/Users/Index.php:103
msgid "Unblock" msgid "Unblock"
msgstr "" msgstr ""
#: src/Module/Contact.php:449 src/Module/Contact/Profile.php:568 #: src/Module/Contact.php:451 src/Module/Contact/Profile.php:568
msgid "Unignore" msgid "Unignore"
msgstr "" msgstr ""
#: src/Module/Contact.php:450 src/Module/Contact/Profile.php:576 #: src/Module/Contact.php:452 src/Module/Contact/Profile.php:576
msgid "Uncollapse" msgid "Uncollapse"
msgstr "" msgstr ""
#: src/Module/Contact.php:452 #: src/Module/Contact.php:454
msgid "Batch Actions" msgid "Batch Actions"
msgstr "" msgstr ""
#: src/Module/Contact.php:495 #: src/Module/Contact.php:497
msgid "Conversations started by this contact" msgid "Conversations started by this contact"
msgstr "" msgstr ""
#: src/Module/Contact.php:500 #: src/Module/Contact.php:502
msgid "Posts and Comments" msgid "Posts and Comments"
msgstr "" msgstr ""
#: src/Module/Contact.php:503 #: src/Module/Contact.php:505
msgid "Individual Posts and Replies" msgid "Individual Posts and Replies"
msgstr "" msgstr ""
#: src/Module/Contact.php:511 #: src/Module/Contact.php:513
msgid "Posts containing media objects" msgid "Posts containing media objects"
msgstr "" msgstr ""
#: src/Module/Contact.php:519 #: src/Module/Contact.php:521
msgid "View all known contacts" msgid "View all known contacts"
msgstr "" msgstr ""
#: src/Module/Contact.php:530 #: src/Module/Contact.php:532
msgid "Advanced Contact Settings" msgid "Advanced Contact Settings"
msgstr "" msgstr ""
#: src/Module/Contact.php:566 #: src/Module/Contact.php:568
msgid "Mutual Friendship" msgid "Mutual Friendship"
msgstr "" msgstr ""
#: src/Module/Contact.php:570 #: src/Module/Contact.php:572
msgid "is a fan of yours" msgid "is a fan of yours"
msgstr "" msgstr ""
#: src/Module/Contact.php:574 #: src/Module/Contact.php:576
msgid "you are a fan of" msgid "you are a fan of"
msgstr "" msgstr ""
#: src/Module/Contact.php:592 #: src/Module/Contact.php:594
msgid "Pending outgoing contact request" msgid "Pending outgoing contact request"
msgstr "" msgstr ""
#: src/Module/Contact.php:594 #: src/Module/Contact.php:596
msgid "Pending incoming contact request" msgid "Pending incoming contact request"
msgstr "" msgstr ""
#: src/Module/Contact.php:607 src/Module/Contact/Profile.php:414 #: src/Module/Contact.php:609 src/Module/Contact/Profile.php:414
#, php-format #, php-format
msgid "Visit %s's profile [%s]" msgid "Visit %s's profile [%s]"
msgstr "" msgstr ""