Skip to content

Commit

Permalink
#265 : fix plurals
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermau committed Feb 14, 2025
1 parent 6936224 commit 20f7ac5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion api/src/core/usecases/readWriteSillData/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export type Software = {
similarSoftwares: Software.SimilarSoftware[];
keywords: string[];
programmingLanguages: string[];
referencePublication?: SILL.ScholarlyArticle[];
referencePublications?: SILL.ScholarlyArticle[];
};

export namespace Software {
Expand Down
8 changes: 4 additions & 4 deletions web/src/core/usecases/softwareCatalog/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ function apiSoftwareToInternalSoftware(params: {
similarSoftwares,
keywords,
programmingLanguages,
referencePublication
referencePublications
} = apiSoftware;

assert<
Expand Down Expand Up @@ -964,7 +964,7 @@ function apiSoftwareToInternalSoftware(params: {
})(),
userDeclaration,
programmingLanguages,
referencePublication
referencePublications
};
}

Expand Down Expand Up @@ -996,7 +996,7 @@ function internalSoftwareToExternalSoftware(params: {
softwareType,
userDeclaration,
programmingLanguages,
referencePublication,
referencePublications,
...rest
} = internalSoftware;

Expand Down Expand Up @@ -1033,7 +1033,7 @@ function internalSoftwareToExternalSoftware(params: {
userDeclaration,
programmingLanguages,
applicationCategories,
referencePublication
referencePublications
};
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/core/usecases/softwareCatalog/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export namespace State {
| undefined;
programmingLanguages: string[];
applicationCategories: string[];
referencePublication?: ApiTypes.SILL.ScholarlyArticle[];
referencePublications?: ApiTypes.SILL.ScholarlyArticle[];
};

export type External = Common & {
Expand Down
2 changes: 1 addition & 1 deletion web/src/core/usecases/softwareDetails/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export namespace State {
programmingLanguages: string[];
keywords: string[];
applicationCategories: string[];
referencePublication?: ApiTypes.SILL.ScholarlyArticle[];
referencePublications?: ApiTypes.SILL.ScholarlyArticle[];
softwareType: ApiTypes.SoftwareType;
};
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/core/usecases/softwareDetails/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function apiSoftwareToSoftware(params: {
serviceProviders,
programmingLanguages,
keywords,
referencePublication,
referencePublications,
applicationCategories
} = apiSoftware;

Expand Down Expand Up @@ -337,7 +337,7 @@ function apiSoftwareToSoftware(params: {
programmingLanguages,
keywords,
applicationCategories,
referencePublication,
referencePublications,
softwareType
};
}
6 changes: 3 additions & 3 deletions web/src/ui/pages/softwareDetails/PublicationTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import { useTranslation } from "react-i18next";
import { ApiTypes } from "api";

export type Props = {
referencePublication?: ApiTypes.SILL.ScholarlyArticle[];
referencePublications?: ApiTypes.SILL.ScholarlyArticle[];
};

export const PublicationTab = (props: Props) => {
const { referencePublication } = props;
const { referencePublications } = props;

const { t } = useTranslation();

return (
<>
<h6>{t("softwareDetails.tabReferencePublicationTitle")}</h6>
<ul>
{referencePublication?.map(article => {
{referencePublications?.map(article => {
return (
<li>
<a
Expand Down
6 changes: 3 additions & 3 deletions web/src/ui/pages/softwareDetails/SoftwareDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default function SoftwareDetails(props: Props) {
)
}
]),
...(software.referencePublication === undefined
...(software.referencePublications === undefined
? []
: [
{
Expand All @@ -270,8 +270,8 @@ export default function SoftwareDetails(props: Props) {
),
"content": (
<PublicationTab
referencePublication={
software.referencePublication
referencePublications={
software.referencePublications
}
></PublicationTab>
)
Expand Down

0 comments on commit 20f7ac5

Please sign in to comment.