Skip to content

Commit

Permalink
Merge pull request #1552 from danskernesdigitalebibliotek/DDFBRA-43-a…
Browse files Browse the repository at this point in the history
…nalyse-af-intelligente-facetter

Add placeholder for game platform facet translation
  • Loading branch information
Adamik10 authored Nov 19, 2024
2 parents 66dde78 + cda7a3c commit de391fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/apps/search-result/search-result.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface SearchResultEntryTextProps {
facetDk5Text: string;
facetFictionalCharactersText: string;
facetFictionNonfictionText: string;
facetGamePlatformText: string;
facetGenreAndFormText: string;
facetMainLanguagesText: string;
facetMaterialTypesText: string;
Expand Down
5 changes: 5 additions & 0 deletions src/apps/search-result/search-result.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ const meta: Meta<typeof SearchResultEntry> = {
description: "Genre and form text",
control: { type: "text" }
},
facetGamePlatformText: {
description: "Game platform text",
control: { type: "text" }
},
facetMainLanguagesText: {
description: "Main languages text",
control: { type: "text" }
Expand Down Expand Up @@ -239,6 +243,7 @@ export const Primary: Story = {
facetDk5Text: "Dk5",
facetFictionalCharactersText: "Fictional characters",
facetFictionNonfictionText: "Fiction or nonfiction",
facetGamePlatformText: "Game platform",
facetGenreAndFormText: "Genre and form",
facetMainLanguagesText: "Main languages",
facetMaterialTypesText: "Material types",
Expand Down
3 changes: 3 additions & 0 deletions src/components/facet-browser/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export const getFacetFieldTranslation = (name: FacetFieldEnum) => {
return "facetWorkTypesText";
case FacetFieldEnum.Year.toLowerCase():
return "facetYearText";
// TODO: Replace this case when FBI API specs have updated
case "gameplatform":
return "facetGamePlatformText";
default:
return invalidSwitchCase<string>(name as never);
}
Expand Down

0 comments on commit de391fc

Please sign in to comment.