Skip to content

Commit

Permalink
Merge pull request #639 from jona42-ui/missing/translations
Browse files Browse the repository at this point in the history
(feat)add missing translations
  • Loading branch information
mozzy11 authored Dec 11, 2023
2 parents f7766c3 + a2e9669 commit e7e4b69
Show file tree
Hide file tree
Showing 17 changed files with 211 additions and 108 deletions.
22 changes: 11 additions & 11 deletions frontend/src/components/cytology/CytologyCaseView.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ function CytologyCaseView() {
setNotificationBody({
kind: NotificationKinds.success,
title: <FormattedMessage id="notification.title" />,
message: "Succesfuly saved",
message: <FormattedMessage id="save.success"/>,
});
} else {
setNotificationBody({
kind: NotificationKinds.error,
title: <FormattedMessage id="notification.title" />,
message: "Error while saving",
message: <FormattedMessage id="error.save.msg"/>,
});
}
}
Expand All @@ -192,7 +192,7 @@ function CytologyCaseView() {
setNotificationBody({
kind: NotificationKinds.success,
title: <FormattedMessage id="notification.title" />,
message: "Succesfuly Generated Report",
message: <FormattedMessage id="success.report.status"/>,
});
var params = { ...reportParams };
if (!params[index]) {
Expand All @@ -215,7 +215,7 @@ function CytologyCaseView() {
setNotificationBody({
kind: NotificationKinds.error,
title: <FormattedMessage id="notification.title" />,
message: "Error while Generating Report",
message:<FormattedMessage id="error.report.status"/>,
});
}
};
Expand Down Expand Up @@ -546,7 +546,7 @@ function CytologyCaseView() {
<Select
id="status"
name="status"
labelText="Status"
labelText={<FormattedMessage id="label.filters.status"/>}
value={pathologySampleInfo.status}
onChange={(event) => {
setPathologySampleInfo({
Expand Down Expand Up @@ -1324,9 +1324,9 @@ function CytologyCaseView() {
<FormattedMessage id="cytology.label.other" /> :
<TextInput
id="otherNeoPlasms"
labelText="Enter text rest"
labelText={intl.formatMessage({ id: "enterText.label" })}
hideLabel={true}
placeholder="Other Malignant"
placeholder={intl.formatMessage({ id: "otherMalignant.placeholder" })}
value={
filterDiagnosisResultsByCategory(
"EPITHELIAL_CELL_ABNORMALITY",
Expand Down Expand Up @@ -1388,7 +1388,7 @@ function CytologyCaseView() {
<Column lg={4} md={8} sm={4}>
<FilterableMultiSelect
id="nonNeoPlastic"
titleText="Select Result"
titleText={intl.formatMessage({ id: "selectResult.title" })}
items={diagnosisResultNonNeoPlasticCellular}
itemToString={(item) => (item ? item.value : "")}
initialSelectedItems={
Expand Down Expand Up @@ -1491,7 +1491,7 @@ function CytologyCaseView() {
<Column lg={4} md={8} sm={4}>
<FilterableMultiSelect
id="reactiveChanges"
titleText="Select Result"
titleText={intl.formatMessage({ id: "selectResult.title" })}
items={diagnosisResultReactiveCellular}
itemToString={(item) => (item ? item.value : "")}
initialSelectedItems={
Expand Down Expand Up @@ -1591,7 +1591,7 @@ function CytologyCaseView() {
<Column lg={4} md={8} sm={4}>
<FilterableMultiSelect
id="organisms"
titleText="Select Result"
titleText={intl.formatMessage({ id: "selectResult.title" })}
items={diagnosisResultOrganisms}
itemToString={(item) => (item ? item.value : "")}
initialSelectedItems={
Expand Down Expand Up @@ -1688,7 +1688,7 @@ function CytologyCaseView() {
<Column lg={4} md={8} sm={4}>
<FilterableMultiSelect
id="OTHER"
titleText="Select Result"
titleText={intl.formatMessage({ id: "selectResult.title" })}
items={diagnosisResultOther}
itemToString={(item) => (item ? item.value : "")}
initialSelectedItems={
Expand Down
28 changes: 14 additions & 14 deletions frontend/src/components/cytology/CytologyDashBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ function CytologyDashboard() {
onChange={(e) =>
setFilters({ ...filters, searchTerm: e.target.value })
}
placeholder="Search by LabNo or Family Name"
labelText="Search by LabNo or Family Name"
placeholder={intl.formatMessage({ id: "label.seacrh.labno.family" })}
labelText={<FormattedMessage id="label.seacrh.labno.family"/>}
/>
</Column>
<Column lg={8} md={4} sm={2}>
<div className="inlineDivBlock">
<div>Filters:</div>
<div>{intl.formatMessage({ id: "filters.label" })}</div>
<Checkbox
labelText="My cases"
labelText={<FormattedMessage id="label.filters.mycases"/>}
id="filterMyCases"
value={filters.myCases}
onChange={(e) =>
Expand All @@ -317,15 +317,15 @@ function CytologyDashboard() {
<Select
id="statusFilter"
name="statusFilter"
labelText="Status"
labelText={<FormattedMessage id="label.filters.status"/>}
value={
filters.statuses.length > 1 ? "All" : filters.statuses[0].id
}
onChange={setStatusFilter}
noLabel
>
<SelectItem disabled value="placeholder" text="Status" />
<SelectItem text="All" value="All" />
<SelectItem disabled value="placeholder" text={intl.formatMessage({ id: "label.filters.status"})} />
<SelectItem text={intl.formatMessage({ id: "all.label" })} value="All" />
{statuses.map((status, index) => {
return (
<SelectItem
Expand All @@ -348,31 +348,31 @@ function CytologyDashboard() {
headers={[
{
key: "requestDate",
header: "Request Date",
header: intl.formatMessage({ id: "sample.requestDate" }),
},
{
key: "status",
header: "Stage",
header:intl.formatMessage({ id: "label.filters.status"}),
},
{
key: "lastName",
header: "Last Name",
header: intl.formatMessage({ id: "patient.last.name"}),
},
{
key: "firstName",
header: "First Name",
header: intl.formatMessage({ id: "patient.first.name" }),
},
{
key: "assignedTechnician",
header: "Assigned Technician",
header: intl.formatMessage({ id:"label.button.select.technician" }) ,
},
{
key: "assignedCytoPathologist",
header: "Assigned CytoPathologist",
header: intl.formatMessage({ id: "assigned.cytopathologist.label" }),
},
{
key: "labNumber",
header: "Lab Number",
header: intl.formatMessage({ id: "sample.label.labnumber" }),
},
]}
isSortable
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/components/data/LabTableHeaders.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { FormattedMessage } from 'react-intl';
export const labHeaderData = [
{
key: "formName",
header: "FormName",
header: <FormattedMessage id="header.formname"/>,
},
{
key: "firstName",
header: "First Name",
header: <FormattedMessage id="patient.first.name"/>,
},
{
key: "lastName",
header: "Last Name",
header: <FormattedMessage id="patient.last.name"/>,
},
];
13 changes: 7 additions & 6 deletions frontend/src/components/data/PatientResultsTableHeaders.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import { FormattedMessage } from 'react-intl';
export const patientSearchHeaderData = [
{
key: "lastName",
header: "Last Name",
header: <FormattedMessage id="patient.last.name"/>,
},
{
key: "firstName",
header: "First Name",
header: <FormattedMessage id="patient.first.name"/>,
},
{
key: "gender",
header: "Gender",
header: <FormattedMessage id="patient.gender"/>,
},
{
key: "dob",
header: "Date Of Birth",
header: <FormattedMessage id="patient.dob"/>,
},
{
key: "subjectNumber",
header: "Unique Health ID number",
header: <FormattedMessage id="patient.subject.number"/>,
},
{
key: "nationalId",
header: "National ID",
header: <FormattedMessage id="patient.natioanalid"/>,
},
];
26 changes: 14 additions & 12 deletions frontend/src/components/data/ReflexRuleOptions.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
import { FormattedMessage } from 'react-intl';

export const relationOptions = [
{
value: "EQUALS",
label: "equals",
label: <FormattedMessage id="label.equals"/>,
},
{
value: "NOT_EQUALS",
label: "does not equal",
label: <FormattedMessage id="label.notequals"/>,
},
{
value: "INSIDE_NORMAL_RANGE",
label: "is inside the normal range",
label: <FormattedMessage id="label.inside.normalrange"/>,
},
{
value: "OUTSIDE_NORMAL_RANGE",
label: "is outside the normal range",
label: <FormattedMessage id="label.outside.normalrange"/>,
},
];

export const overallOptions = [
{
value: "ANY",
label: "Any",
label: <FormattedMessage id="label.any"/>,
},
{
value: "ALL",
label: "All",
label: <FormattedMessage id="all.label"/>,
},
];

export const actionOptions = [
{
value: "ADD_TEST",
label: "Add test to order",
label: <FormattedMessage id="label.test.add"/>,
},
{
value: "ADD_NOTIFICATION",
label: "Add pop up notification to user",
label: <FormattedMessage id="label.add.notification"/>,
},
{
value: "ADD_INTERNAL_NOTE",
label: "Add Internal Note",
label: <FormData id="rulebuilder.label.addInternalNote"/>,
},
{
value: "ADD_EXTERNAL_NOTE",
label: "Add External Note",
label: <FormattedMessage id="rulebuilder.label.addExternalNote"/>,
},
{
value: "ADD_INTERNAL_TRIGGER_MESSAGE",
label: "Add Internal `triggered by` message",
label: <FormattedMessage id="rulebuilder.label.add.internaltrigger"/>,
},
{
value: "ADD_EXTERNAL_TRIGGER_MESSAGE",
label: "Add External `triggered by` message",
label: <FormattedMessage id="rulebuilder.label.add.externaltrigger"/>,
},
];
15 changes: 8 additions & 7 deletions frontend/src/components/data/SampleTypesTableHeaders.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
import { FormattedMessage } from 'react-intl';
export const sampleTypesTableHeader = [
{
key: "select_checkBox",
header: "",
},
{
key: "_id",
header: "ID",
header: <FormattedMessage id="header.ID"/>,
},
{
key: "sampleType",
header: "Sample Type",
header: <FormattedMessage id="sample.type"/>,
},
{
key: "collectionDate",
header: "Collection Date(dd/mm/yyyy)",
header: <FormattedMessage id="sample.collection.date"/> +"(dd/mm/yyyy) ",
},
{
key: "collectionTime",
header: "Collection Time(hh:mm)",
header: <FormattedMessage id="sample.collection.time"/> +"(hh:mm) ",
},
{
key: "collector",
header: "Collector",
header: <FormattedMessage id= "collector.label"/>,
},
{
key: "reject",
header: "Reject",
header:<FormattedMessage id="header.reject"/>,
},
{
key: "rejectReason",
header: "Reject Reason",
header: <FormattedMessage id="header.rejection.reason"/>,
},
{
key: "removeSample",
Expand Down
Loading

0 comments on commit e7e4b69

Please sign in to comment.