diff --git a/web/src/sections/Library/view.tsx b/web/src/sections/Library/view.tsx index 7f0cb7b..3b95304 100644 --- a/web/src/sections/Library/view.tsx +++ b/web/src/sections/Library/view.tsx @@ -19,6 +19,22 @@ function customId(entry: GameEntry): string { : entry.id; } +/** + * Display label for a store badge. Steam and custom keep their localized strings; every other store + * (lutris, heroic, epic, …) is a proper noun shown capitalized, so new providers surface correctly + * without a translation per store. + */ +function storeLabel(store: string): string { + switch (store) { + case "custom": + return m.library_store_custom(); + case "steam": + return m.library_store_steam(); + default: + return store.charAt(0).toUpperCase() + store.slice(1); + } +} + interface FormState { title: string; portrait: string; @@ -276,7 +292,7 @@ const GameCard: FC = ({ game, onEdit, onDelete, deleting }) => { variant={isCustom ? "secondary" : "outline"} className="bg-background/80 backdrop-blur" > - {isCustom ? m.library_store_custom() : m.library_store_steam()} + {storeLabel(game.store)} {isCustom && (