Skip to content

Commit

Permalink
Merge pull request #839 from BIDMCDigitalPsychiatry/trans-hindi
Browse files Browse the repository at this point in the history
Trans hindi
  • Loading branch information
sarithapillai8 authored Oct 23, 2024
2 parents f329817 + ff886f0 commit 679a9cb
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 40 deletions.
3 changes: 2 additions & 1 deletion public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,8 @@
"Yawn and stretch for 10 seconds every hour today.": "आज हर घंटे 10 सेकंड के लिए अँगड़ाई ले और स्ट्रेच करें।",
"Do a fake yawn if you have to. That will trigger real ones. Say 'ahh' as you exhale. Notice how a yawn interrupts your thoughts and feelings. This brings you into the present. Then stretch really, really slowly for at least 20 seconds. Notice any tightness and say 'ease' or just say hello to that place (being mindful – noticing without judgment). Take another 20 seconds to notice and then get back to what you were doing.": "अगर आप चाहें तो नकली जम्हाई लें । यह असली जम्हाई को शुरू करेगा। साँस छोड़ते हुए 'आह' कहें। ध्यान दें कि कैसे एक जम्हाई आपके विचारों और भावनाओं में बाधा डालती है। यह आपको वर्तमान में लाता है। फिर कम से कम 20 सेकंड के लिए बहुत ही धीरे-धीरे स्ट्रेच करें । किसी भी जकड़न पर ध्यान दें और कहें ' ढीला छोड़ो ' या उस जगह नमस्ते कहें (सावधान रहना - बिना निर्णय के ध्यान देना)। ध्यान देने के लिए एक और 20 सेकंड का समय लें और फिर आप जो कर रहे थे उस पर वापस जाएं।",
"Possibility. Ask yourself what is possible or what is a forward step.": "संभावना, अपने आप से पूछें कि क्या संभव है या आगे क्या करना है।",
"If you find yourself being reactive, try the following steps:\n-\tPause and take one to three big breaths/\n-\tSay “step back” (you don’t have to physically – you can just do it in your mind.)\n-\tSay “clear head.”\n-\tSay “calm body.”\n-\tBreath again. Say \u201Crelax,\u201D \u201Cmelt,\u201D or \u201Cease.\u201D.":

"If you find yourself being reactive, try the following steps:\n- Pause and take one to three big breaths/\n- Say 'step back' (you don’t have to physically \u2013 you can just do it in your mind.)\n- Say 'clear head.'\n- Say 'calm body.'\n- Breath again. Say 'relax,' 'melt,' or 'ease.'.":
"यदि आप स्वयं को प्रतिक्रियाशील पाते हैं, तो निम्न चरणों का प्रयास करें:\n- रुकें और एक से तीन बड़ी सांसें लें/\n- 'पीछे हटो' कहें (आपको शारीरिक रूप से नहीं करना है - आप इसे केवल अपने दिमाग में कर सकते हैं।)\n- 'दिमाग को खाली करो/तरोताजा करो ' कहें।\n- कहो 'शांत शरीर।'\n- फिर से सांस लें। 'तनाव मुक्त हो ' 'शांत हो जाओ,' या ' ढीला करो' कहें।",

"Give yourself or someone else loving-kindness.": "अपने आप पर या किसी और पर प्रेम- दयालुता दिखाओ ।",
Expand Down
14 changes: 6 additions & 8 deletions src/components/CredentialManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export function CredentialEditor({ credential, auxData, mode, onChange, title, p
label={`${t("Name")}`}
type="text"
variant="outlined"
helperText={`${t("Enter the family member or clinician's name here.")}`}
// helperText={`${t("Enter the family member or clinician's name here.")}`}
value={name}
onChange={(event) => setName(event.target.value)}
style={{ marginBottom: 16 }}
Expand All @@ -170,9 +170,9 @@ export function CredentialEditor({ credential, auxData, mode, onChange, title, p
label={`${t("Role")}`}
type="text"
variant="outlined"
helperText={`${t(
"Enter the family member or clinician's role here. For this credential to appear as a care team member, either a photo or role MUST be saved."
)}`}
// helperText={`${t(
// "Enter the family member or clinician's role here. For this credential to appear as a care team member, either a photo or role MUST be saved."
// )}`}
value={role}
onChange={(event) => setRole(event.target.value)}
style={{ marginBottom: 16 }}
Expand Down Expand Up @@ -236,9 +236,7 @@ export function CredentialEditor({ credential, auxData, mode, onChange, title, p
helperText={
!accepted
? `${t("Password is not complex enough and does not comply with organization password requirement.")}`
: `${t(
"Enter the new password here, then press the 'Done' button on the right of the box. Tap elsewhere if you do not want to change the password."
)}`
: `${t("On the right of the box, press the check mark in the circle to save changes.")}`
}
value={password}
onChange={(event) => setPassword(event.target.value)}
Expand Down Expand Up @@ -568,7 +566,7 @@ export const CredentialManager: React.FunctionComponent<{
</Grid>
))}
<Grid item>
<Tooltip title={`${t("Add a new member of your care team.")}`}>
<Tooltip title={`${t("Add Credentials")}`}>
<IconButton
onClick={() =>
setSelected((selected) => ({
Expand Down
11 changes: 9 additions & 2 deletions src/components/Prevent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,15 @@ export default function Prevent({
const [selectedActivities, setSelectedActivities] = React.useState([])
const [selectedExperimental, setSelectedExperimental] = React.useState([])
const [newEvent, setNewEvent] = React.useState(false)
const [startDate, setStartDate] = React.useState<number>()
const [endDate, setEndDate] = React.useState<number>()

let currentDate = new Date()
let prevDate = new Date()
let endTime = currentDate.getTime()
prevDate.setMonth(prevDate.getMonth() - 3)
let startTime = prevDate.getTime()

const [startDate, setStartDate] = React.useState<number>(startTime)
const [endDate, setEndDate] = React.useState<number>(endTime)

const setTabActivities = () => {
let gActivities = allActivities.filter((x: any) => !!x?.category && x?.category.includes("prevent"))
Expand Down
35 changes: 24 additions & 11 deletions src/components/Researcher/ActivityList/ScheduleActivity.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import React, { useState } from "react"
import { Box, IconButton, Icon, Fab, Dialog, DialogContent, makeStyles, Theme, createStyles } from "@material-ui/core"
import {
Box,
IconButton,
Icon,
Fab,
Dialog,
DialogContent,
makeStyles,
Theme,
createStyles,
Tooltip,
} from "@material-ui/core"
import { useTranslation } from "react-i18next"
import ActivityScheduler from "./ActivityScheduler"
import PercentageSettings from "./PercentageSettings"
Expand Down Expand Up @@ -42,16 +53,18 @@ export default function ScheduleActivity({ activity, activities, setActivities,
const [showScheduler, setShowScheduler] = useState(false)
return (
<span>
<Fab
size="small"
color="primary"
classes={{ root: classes.btnWhite }}
onClick={() => {
setShowScheduler(true)
}}
>
<Icon>calendar_today</Icon>
</Fab>
<Tooltip title={t("Schedule activity")} arrow>
<Fab
size="small"
color="primary"
classes={{ root: classes.btnWhite }}
onClick={() => {
setShowScheduler(true)
}}
>
<Icon>calendar_today</Icon>
</Fab>
</Tooltip>
<Dialog
fullWidth
maxWidth="md"
Expand Down
36 changes: 20 additions & 16 deletions src/components/Researcher/ActivityList/UpdateActivity.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react"
import { Icon, Fab, makeStyles, Theme, createStyles, Link } from "@material-ui/core"
import { Icon, Fab, makeStyles, Theme, createStyles, Link, Tooltip } from "@material-ui/core"
import { useTranslation } from "react-i18next"
import ConfirmationDialog from "../../ConfirmationDialog"
import LAMP from "lamp-core"
Expand Down Expand Up @@ -52,22 +52,26 @@ export default function UpdateActivity({
return (
<span>
{!!profile ? (
<Fab
size="small"
color="primary"
classes={{ root: classes.btnWhite }}
onClick={(event) => {
participantCount > 1
? setConfirmationDialog(3)
: (window.location.href = `/#/researcher/${researcherId}/activity/${activity.id}`)
}}
>
<Icon>mode_edit</Icon>
</Fab>
<Tooltip title={participantCount > 1 ? t("Edit activity for multiple participants") : t("Edit activity")} arrow>
<Fab
size="small"
color="primary"
classes={{ root: classes.btnWhite }}
onClick={(event) => {
participantCount > 1
? setConfirmationDialog(3)
: (window.location.href = `/#/researcher/${researcherId}/activity/${activity.id}`)
}}
>
<Icon>mode_edit</Icon>
</Fab>
</Tooltip>
) : (
<Link href={`/#/researcher/${researcherId}/activity/${activity.id}`} underline="none">
<Icon>mode_edit</Icon>
</Link>
<Tooltip title={t("Edit activity")} arrow>
<Link href={`/#/researcher/${researcherId}/activity/${activity.id}`} underline="none">
<Icon>mode_edit</Icon>
</Link>
</Tooltip>
)}
<ConfirmationDialog
confirmationDialog={confirmationDialog}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Researcher/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default function Dashboard({ onParticipantSelect, researcherId, mode, tab
<ListItemIcon className={classes.menuIcon}>
<Studies />
</ListItemIcon>
<ListItemText primary={`${t("Studies")}`} />
<ListItemText primary={`${t("Groups")}`} />
</ListItem>
)}
{mode === "researcher" && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Researcher/Studies/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default function Header({ studies, researcherId, searchData, setParticipa
<Box>
<Box display="flex" className={classes.header}>
<Box flexGrow={1} pt={1}>
<Typography variant="h5">{`${t("Studies")}`}</Typography>
<Typography variant="h5">{`${t("Groups")}`}</Typography>
</Box>
<Box>
<SearchBox searchData={searchData} />
Expand Down

0 comments on commit 679a9cb

Please sign in to comment.