fix(i18n): the video menu's download row says "Download…", and counted copy is pluralized
- The row opens the download dialog, so it is labelled so; the download's state ("Downloaded",
"In queue") is its hint, not its label.
- The share dialog's expiry ("1 days") and a link's view count ("1 views") go through i18next's
plural forms (`count`).
This commit is contained in:
@@ -74,12 +74,14 @@ export function useVideoActions(handlers: VideoActionHandlers, open: boolean) {
|
||||
const hidden = v.status === "hidden";
|
||||
const inProgress = v.position_seconds > 0 && !watched;
|
||||
const dl = index.data?.[v.id];
|
||||
const dlLabel =
|
||||
// The row opens the download dialog, so it says so; the download's state is its hint, not its
|
||||
// label — "Downloaded" read as a status, not as a row that opens something (E28 review J4).
|
||||
const dlState =
|
||||
dl === "done"
|
||||
? t("downloads.button.downloaded")
|
||||
: dl === "queued" || dl === "running" || dl === "paused"
|
||||
? t("downloads.button.queued")
|
||||
: t("downloads.button.label");
|
||||
: undefined;
|
||||
// The two panels open beside the object; a menu opened with no element to anchor to (none of
|
||||
// the triggers does that today) leaves them out rather than opening them at the corner.
|
||||
const at = (kind: "playlist" | "details") =>
|
||||
@@ -140,7 +142,8 @@ export function useVideoActions(handlers: VideoActionHandlers, open: boolean) {
|
||||
? [
|
||||
{
|
||||
id: "download",
|
||||
label: dlLabel,
|
||||
label: t("downloads.menu.download"),
|
||||
title: dlState,
|
||||
icon: <Download className={icon} />,
|
||||
onSelect: () => setFollowUp({ kind: "download", video: v }),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user