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

View file

@ -765,8 +765,8 @@
"room_notifications_total": "Total: ",
"room_notifications_type": "Type: ",
"room_status": "Room status",
"room_unread_status": "Room unread status: <strong>%(status)s</strong>",
"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>"
},
"save_setting_values": "Save setting values",

View file

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