fix(notifications): a notice value is no plain string, so a translated name cannot freeze in one language
A name goes in as raw(), a translated word as its own msg(): tsc now lists every value, and the ones that froze are said when shown — Watch later and an untitled channel in the pin and channel notices, a Plex season's name in its removal toast (a new seasonTitleText, which seasonTitle says).
This commit is contained in:
@@ -81,7 +81,7 @@ import RemoteImage from "../../components/ui/RemoteImage";
|
||||
import { useOpenLinkedPlayer } from "../../features/player/useOpenLinkedPlayer";
|
||||
import { budgetFrom, budgetParams, DEFAULT_BUDGET } from "../../lib/homeUrlState";
|
||||
import { useUrlMirror } from "../../lib/useUrlMirror";
|
||||
import { msg } from "../../lib/notifications";
|
||||
import { msg, raw } from "../../lib/notifications";
|
||||
|
||||
// The Home surface — "Mit nézzek most?".
|
||||
//
|
||||
@@ -238,10 +238,10 @@ function useHomeCardMenu({
|
||||
danger: true,
|
||||
// The pin id travels on the shelf card, so this needs no lookup — and unlike every
|
||||
// other surface it can never be in the "not known yet" state.
|
||||
onSelect: () => pin.remove(target.pin_id as number, target.title),
|
||||
onSelect: () => pin.remove(target.pin_id as number, raw(target.title)),
|
||||
},
|
||||
]
|
||||
: pin.item(pinTargetForCard(pinned ?? target), (pinned ?? target).title)),
|
||||
: pin.item(pinTargetForCard(pinned ?? target), raw((pinned ?? target).title))),
|
||||
];
|
||||
return {
|
||||
menu,
|
||||
|
||||
Reference in New Issue
Block a user