Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
rollback: remove resource type translations
Browse files Browse the repository at this point in the history
  • Loading branch information
BPierrick committed Jan 4, 2022
1 parent ad29fff commit 22667dd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/features/conditions/ConditionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ConditionCard = ({ condition }: ConditionCardProps): JSX.Element => {
}
subheader={
<div className={classes.flexContainer}>
{<Tag value={t(resourceType)} color="#555" />}
{<Tag value={resourceType} color="#555" />}
{codeTag && <Tag value={codeTag} color="#CCC" />}
{codeTitle && (
<Typography display="inline" variant="h5">
Expand Down
2 changes: 1 addition & 1 deletion src/features/documentReferences/DocumentReferenceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const DocumentReferenceCard = ({
}
subheader={
<div className={classes.flexContainer}>
{<Tag value={t(resourceType)} color="#555" />}
{<Tag value={resourceType} color="#555" />}
</div>
}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/features/encounters/EncounterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const EncounterCard = ({ encounter }: EncounterCardProps): JSX.Element => {
}
subheader={
<div className={classes.flexContainer}>
<Tag value={t(resourceType)} color="#555" />
<Tag value={resourceType} color="#555" />
{locationName && <Tag value={locationName} color="#CCC" />}
</div>
}
Expand Down
6 changes: 2 additions & 4 deletions src/features/resources/ResourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useMemo } from "react";

import type { IResourceList } from "@ahryman40k/ts-fhir-types/lib/R4";
import { Card, CardHeader } from "@mui/material";
import { useTranslation } from "react-i18next";

import Tag from "common/components/Tag";
import ConditionCard from "features/conditions/ConditionCard";
Expand All @@ -16,7 +15,6 @@ type ResourceCardProps = {
};

const ResourceCard = ({ resource }: ResourceCardProps): JSX.Element => {
const { t } = useTranslation();
const card: JSX.Element = useMemo(() => {
switch (resource.resourceType) {
case "Condition":
Expand All @@ -30,13 +28,13 @@ const ResourceCard = ({ resource }: ResourceCardProps): JSX.Element => {
return (
<Card>
<CardHeader
title={<Tag value={t(resource.resourceType)} color="#555" />}
title={<Tag value={resource.resourceType} color="#555" />}
/>
<ResourceCardActions resource={resource} />
</Card>
);
}
}, [resource, t]);
}, [resource]);

return card;
};
Expand Down
3 changes: 1 addition & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
"ipp": "IPP",
"showFHIRResource": "Show FHIR Resource",
"hideFHIRResource": "Hide FHIR Resource",
"viewDocument": "View document",
"DocumentReference": "Document"
"viewDocument": "View document"
}
5 changes: 1 addition & 4 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@
"unknown": "Inconnu",
"software": "Logiciel",
"display": "Afficher",
"Encounter": "Séjour",
"Condition": "Pathologie",
"removeAll": "Tout retirer",
"selectAll": "Tout sélectionner",
"ins": "INS-NIR",
"ipp": "IPP",
"showFHIRResource": "Afficher la ressource FHIR",
"hideFHIRResource": "Cacher la ressource FHIR",
"viewDocument": "Afficher le document",
"DocumentReference": "Document"
"viewDocument": "Afficher le document"
}

0 comments on commit 22667dd

Please sign in to comment.