mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-18 10:14:17 +01:00
chore(i18n): localize TV subtitle alignment option labels
This commit is contained in:
@@ -324,32 +324,44 @@ export default function SettingsTV() {
|
||||
// MPV alignment options
|
||||
const alignXOptions: TVOptionItem<string>[] = useMemo(
|
||||
() => [
|
||||
{ label: "Left", value: "left", selected: currentAlignX === "left" },
|
||||
{
|
||||
label: "Center",
|
||||
label: t("home.settings.subtitles.align.left"),
|
||||
value: "left",
|
||||
selected: currentAlignX === "left",
|
||||
},
|
||||
{
|
||||
label: t("home.settings.subtitles.align.center"),
|
||||
value: "center",
|
||||
selected: currentAlignX === "center",
|
||||
},
|
||||
{ label: "Right", value: "right", selected: currentAlignX === "right" },
|
||||
{
|
||||
label: t("home.settings.subtitles.align.right"),
|
||||
value: "right",
|
||||
selected: currentAlignX === "right",
|
||||
},
|
||||
],
|
||||
[currentAlignX],
|
||||
[currentAlignX, t],
|
||||
);
|
||||
|
||||
const alignYOptions: TVOptionItem<string>[] = useMemo(
|
||||
() => [
|
||||
{ label: "Top", value: "top", selected: currentAlignY === "top" },
|
||||
{
|
||||
label: "Center",
|
||||
label: t("home.settings.subtitles.align.top"),
|
||||
value: "top",
|
||||
selected: currentAlignY === "top",
|
||||
},
|
||||
{
|
||||
label: t("home.settings.subtitles.align.center"),
|
||||
value: "center",
|
||||
selected: currentAlignY === "center",
|
||||
},
|
||||
{
|
||||
label: "Bottom",
|
||||
label: t("home.settings.subtitles.align.bottom"),
|
||||
value: "bottom",
|
||||
selected: currentAlignY === "bottom",
|
||||
},
|
||||
],
|
||||
[currentAlignY],
|
||||
[currentAlignY, t],
|
||||
);
|
||||
|
||||
// Cache mode options
|
||||
@@ -499,13 +511,13 @@ export default function SettingsTV() {
|
||||
|
||||
const alignXLabel = useMemo(() => {
|
||||
const option = alignXOptions.find((o) => o.selected);
|
||||
return option?.label || "Center";
|
||||
}, [alignXOptions]);
|
||||
return option?.label || t("home.settings.subtitles.align.center");
|
||||
}, [alignXOptions, t]);
|
||||
|
||||
const alignYLabel = useMemo(() => {
|
||||
const option = alignYOptions.find((o) => o.selected);
|
||||
return option?.label || "Bottom";
|
||||
}, [alignYOptions]);
|
||||
return option?.label || t("home.settings.subtitles.align.bottom");
|
||||
}, [alignYOptions, t]);
|
||||
|
||||
const typographyScaleLabel = useMemo(() => {
|
||||
const option = typographyScaleOptions.find((o) => o.selected);
|
||||
|
||||
Reference in New Issue
Block a user