locale second stage
This commit is contained in:
@@ -16,6 +16,13 @@ export interface Team {
|
||||
group: GroupId;
|
||||
crest?: string | null; // URL zur Flagge / zum Wappen (football-data: crest)
|
||||
localisedName: string; // Lokalisierter Anzeigename (z.B. "Deutschland")
|
||||
localisedNames?: { de: string; en: string };
|
||||
}
|
||||
|
||||
export function teamName(team: Team | undefined, locale: string): string {
|
||||
if (!team) return "—";
|
||||
if (locale === "en") return team.localisedNames?.en ?? team.name ?? "—";
|
||||
return team.localisedNames?.de ?? team.name ?? "—";
|
||||
}
|
||||
|
||||
export type MatchStatus =
|
||||
|
||||
Reference in New Issue
Block a user