mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-19 02:34: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
|
// MPV alignment options
|
||||||
const alignXOptions: TVOptionItem<string>[] = useMemo(
|
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",
|
value: "center",
|
||||||
selected: currentAlignX === "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(
|
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",
|
value: "center",
|
||||||
selected: currentAlignY === "center",
|
selected: currentAlignY === "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Bottom",
|
label: t("home.settings.subtitles.align.bottom"),
|
||||||
value: "bottom",
|
value: "bottom",
|
||||||
selected: currentAlignY === "bottom",
|
selected: currentAlignY === "bottom",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[currentAlignY],
|
[currentAlignY, t],
|
||||||
);
|
);
|
||||||
|
|
||||||
// Cache mode options
|
// Cache mode options
|
||||||
@@ -499,13 +511,13 @@ export default function SettingsTV() {
|
|||||||
|
|
||||||
const alignXLabel = useMemo(() => {
|
const alignXLabel = useMemo(() => {
|
||||||
const option = alignXOptions.find((o) => o.selected);
|
const option = alignXOptions.find((o) => o.selected);
|
||||||
return option?.label || "Center";
|
return option?.label || t("home.settings.subtitles.align.center");
|
||||||
}, [alignXOptions]);
|
}, [alignXOptions, t]);
|
||||||
|
|
||||||
const alignYLabel = useMemo(() => {
|
const alignYLabel = useMemo(() => {
|
||||||
const option = alignYOptions.find((o) => o.selected);
|
const option = alignYOptions.find((o) => o.selected);
|
||||||
return option?.label || "Bottom";
|
return option?.label || t("home.settings.subtitles.align.bottom");
|
||||||
}, [alignYOptions]);
|
}, [alignYOptions, t]);
|
||||||
|
|
||||||
const typographyScaleLabel = useMemo(() => {
|
const typographyScaleLabel = useMemo(() => {
|
||||||
const option = typographyScaleOptions.find((o) => o.selected);
|
const option = typographyScaleOptions.find((o) => o.selected);
|
||||||
|
|||||||
Reference in New Issue
Block a user