Fix display of room notification debug info (#12183)

* Fix display of room notification debug info

 * Add 'one' string because apprently it just displays nothing at all
   if that's missing, rather than erroring or falling back to use the 'other'.
 * Simplify and always display the count: it's debug info so it's best to
   be very explicit anyway, plus simpler code & one less string.

* Update snapshot
This commit is contained in:
David Baker 2024-01-29 12:38:37 +00:00 committed by GitHub
parent 11f45f5413
commit 3f7e21e08d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 21 deletions

View file

@ -77,8 +77,7 @@ export default function RoomNotifications({ onBack }: IDevtoolsProps): JSX.Eleme
<h2>{_t("devtools|room_status")}</h2> <h2>{_t("devtools|room_status")}</h2>
<ul> <ul>
<li> <li>
{count > 0 {_t(
? _t(
"devtools|room_unread_status_count", "devtools|room_unread_status_count",
{ {
status: humanReadableNotificationLevel(level), status: humanReadableNotificationLevel(level),
@ -87,15 +86,6 @@ export default function RoomNotifications({ onBack }: IDevtoolsProps): JSX.Eleme
{ {
strong: (sub) => <strong>{sub}</strong>, strong: (sub) => <strong>{sub}</strong>,
}, },
)
: _t(
"devtools|room_unread_status",
{
status: humanReadableNotificationLevel(level),
},
{
strong: (sub) => <strong>{sub}</strong>,
},
)} )}
</li> </li>
<li> <li>

View file

@ -765,8 +765,8 @@
"room_notifications_total": "Total: ", "room_notifications_total": "Total: ",
"room_notifications_type": "Type: ", "room_notifications_type": "Type: ",
"room_status": "Room status", "room_status": "Room status",
"room_unread_status": "Room unread status: <strong>%(status)s</strong>",
"room_unread_status_count": { "room_unread_status_count": {
"one": "Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>",
"other": "Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>" "other": "Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>"
}, },
"save_setting_values": "Save setting values", "save_setting_values": "Save setting values",

View file

@ -16,6 +16,10 @@ exports[`<RoomNotifications /> should render 1`] = `
<strong> <strong>
None None
</strong> </strong>
, count:
<strong>
0
</strong>
</span> </span>
</li> </li>
<li> <li>