Skip to content

Commit

Permalink
add new translations (#442)
Browse files Browse the repository at this point in the history
* add new translations

* issue-74 add new translations
  • Loading branch information
MadeleyneSilva authored Feb 3, 2025
1 parent bee7f64 commit 5e7ca9d
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 41 deletions.
6 changes: 6 additions & 0 deletions src/components/BaseLayout/Footer/Footer.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from 'styled-components';
import { Text } from 'src/components/Typography';

export const S = {
Footer: styled.footer`
Expand Down Expand Up @@ -34,4 +35,9 @@ export const S = {
text-decoration: underline;
}
`,
Text: styled(Text)`
color: var(--footer-text);
font-size: 14px;
line-height: 22px;
`,
};
5 changes: 4 additions & 1 deletion src/components/BaseLayout/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { S } from './Footer.styles';
import { t } from '@lingui/macro';

interface Props {
type?: 'default' | 'light';
Expand All @@ -10,7 +11,9 @@ export function AppFooter(props: Props) {
return (
<S.Footer className={`_${type}`}>
<S.Content>
Made with &#10084;&#65039; by{' '}
<S.Text>
{t`Made with`} &#10084;&#65039; {t`by`}{' '}
</S.Text>
<S.Link href="https://beda.software/emr" target="_blank" rel="noreferrer">
Beda Software
</S.Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import { ItemContext } from 'sdc-qrf/lib/types';
import { t } from '@lingui/macro';

import { WithQuestionFormProviderDecorator, withColorSchemeDecorator } from 'src/storybook/decorators';

Expand All @@ -19,7 +20,7 @@ export const DateTime: Story = {
<QuestionDateTime
parentPath={[]}
questionItem={{
text: 'Select date',
text: t`Select date`,
type: 'dateTime',
linkId: 'date',
}}
Expand All @@ -33,7 +34,7 @@ export const Date: Story = {
<QuestionDateTime
parentPath={[]}
questionItem={{
text: 'Birth date',
text: t`Birth date`,
type: 'date',
linkId: 'birth-date',
}}
Expand All @@ -47,7 +48,7 @@ export const Time: Story = {
<QuestionDateTime
parentPath={[]}
questionItem={{
text: 'Select time',
text: t`Select time`,
type: 'time',
linkId: 'time',
}}
Expand All @@ -61,7 +62,7 @@ export const FormatedTime: Story = {
<QuestionDateTime
parentPath={[]}
questionItem={{
text: 'Time with no seconsd',
text: t`Time with no seconds`,
type: 'time',
linkId: 'time',
regex: 'HH:mm',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EncounterDetails/AIScribe/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function Extract(props: ExtractProps) {
return (
<RenderRemoteData
remoteData={extractionRD}
renderLoading={() => <Text>Loading...</Text>}
renderLoading={() => <Text> ${t`Loading...`}</Text>}
renderFailure={(error) => <Text>{formatError(error)}</Text>}
>
{() => <></>}
Expand Down
4 changes: 2 additions & 2 deletions src/containers/HealthcareServiceList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Trans } from '@lingui/macro';
import { t, Trans } from '@lingui/macro';
import { Col, Empty, Row } from 'antd';

import { isLoading, isSuccess } from '@beda.software/remote-data';
Expand Down Expand Up @@ -71,7 +71,7 @@ export function HealthcareServiceList() {
dataIndex: 'active',
key: 'active',
width: '20%',
render: (_text, resource) => (resource.active ? 'Active' : 'Inactive'),
render: (_text, resource) => (resource.active ? t`Active` : t`Inactive`),
},
{
title: <Trans>Actions</Trans>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Patient, Practitioner, PractitionerRole } from 'fhir/r4b';
import { useCallback, useState } from 'react';
import { t } from '@lingui/macro';

import { extractBundleResources, getReference } from '@beda.software/fhir-react';
import { isSuccess, mapSuccess } from '@beda.software/remote-data';
Expand Down Expand Up @@ -93,23 +94,23 @@ export function useInvoiceSearchBarSelect() {
const statusOptions = useCallback(async (search: string) => {
const invoiceStatusOptions = [
{
label: 'Balanced',
label: t`Balanced`,
value: 'balanced',
},
{
label: 'Cancelled',
label: t`Cancelled`,
value: 'cancelled',
},
{
label: 'Issued',
label: t`Issued`,
value: 'issued',
},
{
label: 'Draft',
label: t`Draft`,
value: 'draft',
},
{
label: 'Entered in error',
label: t`Entered in error`,
value: 'entered-in-error',
},
];
Expand Down
47 changes: 47 additions & 0 deletions src/locale/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ msgstr ""
msgid "Activate healthcare service"
msgstr ""

#: src/containers/HealthcareServiceList/index.tsx:74
#: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:97
#: src/containers/Prescriptions/index.tsx:185
#: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:82
Expand Down Expand Up @@ -198,6 +199,7 @@ msgstr ""
msgid "Available units"
msgstr ""

#: src/containers/InvoiceList/components/InvoiceListSearchBar/hooks.ts:97
#: src/containers/InvoiceList/tableUtils.tsx:27
msgid "Balanced"
msgstr ""
Expand All @@ -211,6 +213,7 @@ msgstr ""
msgid "Batch Number"
msgstr ""

#: src/components/BaseQuestionnaireResponseForm/widgets/QuestionDateTime.stories.tsx:37
#: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31
#: src/containers/PatientList/index.tsx:85
#: src/containers/PatientResourceListExample/index.tsx:48
Expand All @@ -230,6 +233,10 @@ msgstr ""
msgid "Build your form"
msgstr ""

#: src/components/BaseLayout/Footer/index.tsx:15
msgid "by"
msgstr ""

#: src/containers/PatientDetails/PatientWearables/index.tsx:46
msgid "Calories"
msgstr ""
Expand All @@ -250,6 +257,7 @@ msgstr ""
msgid "Cancel Medication Request"
msgstr ""

#: src/containers/InvoiceList/components/InvoiceListSearchBar/hooks.ts:101
#: src/containers/InvoiceList/tableUtils.tsx:28
#: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:101
#: src/containers/Prescriptions/index.tsx:187
Expand Down Expand Up @@ -386,6 +394,10 @@ msgstr ""
msgid "CRP"
msgstr ""

#: src/utils/relative-date.ts:25
msgid "d.o."
msgstr ""

#: src/components/PatientEncounter/index.tsx:39
#: src/containers/EncounterList/index.tsx:63
#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23
Expand Down Expand Up @@ -491,6 +503,7 @@ msgstr ""
msgid "Download audio"
msgstr ""

#: src/containers/InvoiceList/components/InvoiceListSearchBar/hooks.ts:109
#: src/containers/InvoiceList/tableUtils.tsx:30
#: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:121
#: src/containers/Prescriptions/index.tsx:191
Expand Down Expand Up @@ -582,6 +595,7 @@ msgstr ""
msgid "End date"
msgstr ""

#: src/containers/InvoiceList/components/InvoiceListSearchBar/hooks.ts:113
#: src/containers/InvoiceList/tableUtils.tsx:31
#: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:113
#: src/containers/Prescriptions/index.tsx:189
Expand Down Expand Up @@ -726,6 +740,10 @@ msgstr ""
msgid "in progress"
msgstr ""

#: src/containers/HealthcareServiceList/index.tsx:74
msgid "Inactive"
msgstr ""

#: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:40
msgid "Inline choice"
msgstr ""
Expand Down Expand Up @@ -753,6 +771,7 @@ msgstr ""
msgid "Invoices"
msgstr ""

#: src/containers/InvoiceList/components/InvoiceListSearchBar/hooks.ts:105
#: src/containers/InvoiceList/tableUtils.tsx:29
msgid "Issued"
msgstr ""
Expand Down Expand Up @@ -781,6 +800,10 @@ msgstr ""
msgid "Listen to the audio"
msgstr ""

#: src/containers/EncounterDetails/AIScribe/index.tsx:312
msgid "Loading..."
msgstr ""

#: src/containers/SignIn/index.tsx:89
msgid "Log in"
msgstr ""
Expand All @@ -797,10 +820,18 @@ msgstr ""
msgid "Log out"
msgstr ""

#: src/utils/relative-date.ts:22
msgid "m.o."
msgstr ""

#: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:101
msgid "Macro text"
msgstr ""

#: src/components/BaseLayout/Footer/index.tsx:15
msgid "Made with"
msgstr ""

#: src/components/DashboardCard/creatinine.tsx:91
msgid "Max"
msgstr ""
Expand Down Expand Up @@ -1236,6 +1267,14 @@ msgstr ""
msgid "Select all"
msgstr ""

#: src/components/BaseQuestionnaireResponseForm/widgets/QuestionDateTime.stories.tsx:23
msgid "Select date"
msgstr ""

#: src/components/BaseQuestionnaireResponseForm/widgets/QuestionDateTime.stories.tsx:51
msgid "Select time"
msgstr ""

#: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:30
#: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:55
msgid "Select..."
Expand Down Expand Up @@ -1455,6 +1494,10 @@ msgstr ""
msgid "Time"
msgstr ""

#: src/components/BaseQuestionnaireResponseForm/widgets/QuestionDateTime.stories.tsx:65
msgid "Time with no seconds"
msgstr ""

#: src/containers/PatientDetails/PatientOrders/index.tsx:27
#: src/containers/PatientDetails/PatientOverviewDynamic/components/PatientNoteListCard/NoteList/index.tsx:33
#: src/containers/PatientDetails/PatientResources/utils.tsx:246
Expand Down Expand Up @@ -1562,6 +1605,10 @@ msgstr ""
msgid "Welcome to"
msgstr ""

#: src/utils/relative-date.ts:18
msgid "y.o."
msgstr ""

#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:147
#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:172
#: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:136
Expand Down
Loading

0 comments on commit 5e7ca9d

Please sign in to comment.