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:
parent
11f45f5413
commit
3f7e21e08d
3 changed files with 15 additions and 21 deletions
|
@ -77,26 +77,16 @@ 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),
|
count,
|
||||||
count,
|
},
|
||||||
},
|
{
|
||||||
{
|
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>
|
||||||
{_t(
|
{_t(
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue