Fix recommended typo (#431)

This commit is contained in:
Zoe Roux 2024-04-22 23:57:29 +02:00 committed by GitHub
parent 7d354249d4
commit d51ffa6848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 20 additions and 20 deletions

View File

@ -36,7 +36,7 @@ import { Platform, View, ViewProps } from "react-native";
import { Fetch } from "../fetch";
import { InfiniteFetch } from "../fetch-infinite";
import { DefaultLayout } from "../layout";
import { ItemDetails } from "../home/recommanded";
import { ItemDetails } from "../home/recommended";
import { SvgWave } from "../details/show";
import { ItemGrid } from "../browse/grid";

View File

@ -24,8 +24,8 @@ import { Header } from "./header";
import { DefaultLayout } from "../layout";
import { RefreshControl, ScrollView } from "react-native";
import { GenreGrid } from "./genre";
import { Recommanded } from "./recommanded";
import { VerticalRecommanded } from "./vertical";
import { Recommended } from "./recommended";
import { VerticalRecommended } from "./vertical";
import { NewsList } from "./news";
import { WatchlistList } from "./watchlist";
import { useQueryClient } from "@tanstack/react-query";
@ -76,13 +76,13 @@ export const HomePage: QueryPage<{}, Genre> = ({ randomItems }) => {
.map((x) => (
<GenreGrid key={x} genre={x} />
))}
<Recommanded />
<Recommended />
{randomItems
.filter((_, i) => i >= 2 && i < 6)
.map((x) => (
<GenreGrid key={x} genre={x} />
))}
<VerticalRecommanded />
<VerticalRecommended />
{/*
TODO: Lazy load those items
{randomItems.filter((_, i) => i >= 6).map((x) => <GenreGrid key={x} genre={x} />)}
@ -100,6 +100,6 @@ HomePage.getFetchUrls = (_, randomItems) => [
WatchlistList.query(),
NewsList.query(),
...randomItems.filter((_, i) => i < 6).map((x) => GenreGrid.query(x)),
Recommanded.query(),
VerticalRecommanded.query(),
Recommended.query(),
VerticalRecommended.query(),
];

View File

@ -81,7 +81,7 @@ export const ItemDetails = ({
unseenEpisodesCount: number | null;
}>) => {
const [moreOpened, setMoreOpened] = useState(false);
const { css } = useYoshiki("recommanded-card");
const { css } = useYoshiki("recommended-card");
const { t } = useTranslation();
return (
@ -238,15 +238,15 @@ ItemDetails.layout = {
gap: ts(8),
} satisfies Layout;
export const Recommanded = () => {
export const Recommended = () => {
const { t } = useTranslation();
const { css } = useYoshiki();
return (
<View {...css({ marginX: ItemGrid.layout.gap, marginTop: ItemGrid.layout.gap })}>
<H3 {...css({ pX: ts(0.5) })}>{t("home.recommanded")}</H3>
<H3 {...css({ pX: ts(0.5) })}>{t("home.recommended")}</H3>
<InfiniteFetch
query={Recommanded.query()}
query={Recommended.query()}
layout={ItemDetails.layout}
placeholderCount={6}
fetchMore={false}
@ -279,7 +279,7 @@ export const Recommanded = () => {
);
};
Recommanded.query = (): QueryIdentifier<LibraryItem> => ({
Recommended.query = (): QueryIdentifier<LibraryItem> => ({
parser: LibraryItemP,
infinite: true,
path: ["items"],

View File

@ -28,15 +28,15 @@ import { useTranslation } from "react-i18next";
import { ItemGrid } from "../browse/grid";
import { itemMap } from "../browse";
export const VerticalRecommanded = () => {
export const VerticalRecommended = () => {
const { t } = useTranslation();
const { css } = useYoshiki();
return (
<View {...css({ marginY: ItemGrid.layout.gap })}>
<H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommanded")}</H3>
<H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommended")}</H3>
<InfiniteFetch
query={VerticalRecommanded.query()}
query={VerticalRecommended.query()}
placeholderCount={3}
layout={{ ...ItemList.layout, layout: "vertical" }}
fetchMore={false}
@ -48,7 +48,7 @@ export const VerticalRecommanded = () => {
);
};
VerticalRecommanded.query = (): QueryIdentifier<LibraryItem> => ({
VerticalRecommended.query = (): QueryIdentifier<LibraryItem> => ({
parser: LibraryItemP,
infinite: true,
path: ["items"],

View File

@ -1,6 +1,6 @@
{
"home": {
"recommanded": "Recommanded",
"recommended": "Recommended",
"news": "News",
"watchlist": "Continue watching",
"info": "See more",

View File

@ -1,6 +1,6 @@
{
"home": {
"recommanded": "Recommandé",
"recommended": "Recommandé",
"news": "Nouveautés",
"watchlist": "Continuer de regarder",
"info": "Voir plus",

View File

@ -1,6 +1,6 @@
{
"home": {
"recommanded": "推荐",
"recommended": "推荐",
"news": "新闻",
"watchlist": "继续观看",
"info": "查看更多",

View File

@ -246,7 +246,7 @@ func (ts *Stream) run(start int32) error {
args = append(args,
"-f", "segment",
// needed for rounding issues when forcing keyframes
// recommanded value is 1/(2*frame_rate), which for a 24fps is ~0.021
// recommended value is 1/(2*frame_rate), which for a 24fps is ~0.021
// we take a little bit more than that to be extra safe but too much can be harmfull
// when segments are short (can make the video repeat itself)
"-segment_time_delta", "0.05",