Skip to content

Commit 46dce23

Browse files
authored
Merge pull request #1341 from ishgroup/SST-82_OnCourse_localization_and_custom_logo
SST-82_OnCourse_localization_and_custom_logo
2 parents 27bc8e4 + 61222b2 commit 46dce23

File tree

359 files changed

+5508
-4143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

359 files changed

+5508
-4143
lines changed

.idea/codeStyles/Project.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-html/src/js/common/components/dialog/RouteChangeConfirm.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import ErrorOutline from '@mui/icons-material/ErrorOutline';
1010
import Button from '@mui/material/Button';
11+
import $t from '@t';
1112
import { ShowConfirmCaller } from 'ish-ui';
1213
import * as React from 'react';
1314
import { useEffect, useRef } from 'react';
@@ -72,7 +73,7 @@ const RouteChangeConfirm = (
7273
closeConfirm();
7374
}}
7475
>
75-
SAVE
76+
{$t('save')}
7677
</Button>
7778
);
7879

client-html/src/js/common/components/documents/DocumentHeader.tsx

+7-6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import IconButton from '@mui/material/IconButton';
2828
import Menu from '@mui/material/Menu';
2929
import MenuItem from '@mui/material/MenuItem';
3030
import Tooltip from '@mui/material/Tooltip';
31+
import $t from '@t';
3132
import clsx from 'clsx';
3233
import { AppTheme, DocumentIconsChooser, formatRelativeDate, III_DD_MMM_YYYY_HH_MM_SPECIAL } from 'ish-ui';
3334
import React, { MouseEvent } from 'react';
@@ -166,7 +167,7 @@ class DocumentHeader extends React.PureComponent<Props, any> {
166167
return (
167168
<Grid container columnSpacing={3} className="mb-1">
168169
<div className="d-flex overflow-hidden">
169-
<Tooltip title="Open Document URL" disableHoverListener={!validUrl}>
170+
<Tooltip title={$t('open_document_url')} disableHoverListener={!validUrl}>
170171
<ButtonBase
171172
disabled={!validUrl}
172173
onClick={(e: any) => this.openDocumentURL(e, validUrl)}
@@ -233,13 +234,13 @@ class DocumentHeader extends React.PureComponent<Props, any> {
233234
disableRestoreFocus
234235
>
235236
<Alert severity="info">
236-
<AlertTitle>Who can view this document</AlertTitle>
237+
<AlertTitle>{$t('who_can_view_this_document')}</AlertTitle>
237238
{getDocumentShareSummary(item.access, item.attachmentRelations)}
238239
</Alert>
239240
</Popover>
240241

241242
<IconButton
242-
aria-label="more"
243+
aria-label={$t('more')}
243244
aria-controls="document-more-menu"
244245
aria-haspopup="true"
245246
onClick={this.onOpenMoreMenu}
@@ -254,13 +255,13 @@ class DocumentHeader extends React.PureComponent<Props, any> {
254255
onClose={this.onCloseMoreMenu}
255256
>
256257
<MenuItem onClick={this.openDocumentView}>
257-
Document info
258+
{$t('document_info')}
258259
</MenuItem>
259260
<MenuItem onClick={this.openDocumentView}>
260-
Permissions
261+
{$t('permissions')}
261262
</MenuItem>
262263
<MenuItem onClick={this.unlinkItem} className="errorColor">
263-
Unlink
264+
{$t('unlink')}
264265
</MenuItem>
265266
</Menu>
266267
</div>

client-html/src/js/common/components/documents/DocumentTags.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Grid } from "@mui/material";
2-
import Typography from "@mui/material/Typography";
3-
import React from "react";
1+
import { Grid, Typography } from '@mui/material';
2+
import $t from '@t';
3+
import React from 'react';
44

5-
const DocumentTags: React.FC<any> = ({tags, bold, classes}) => (
5+
const DocumentTags: React.FC<any> = ({ tags, bold, classes }) => (
66
<Grid container columnSpacing={3}>
77
{tags.length ? (
88
tags.map(t => (
@@ -13,7 +13,7 @@ const DocumentTags: React.FC<any> = ({tags, bold, classes}) => (
1313
))
1414
) : (
1515
<Typography variant="body2" className={`placeholderContent ${classes && classes.documentNoTags}`}>
16-
No Tags
16+
{$t('no_tags')}
1717
</Typography>
1818
)}
1919
</Grid>

client-html/src/js/common/components/form/FundingUploadComponent.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { AvetmissExportSettings, FundingStatus, FundingUpload } from '@api/model';
77
import { KeyboardArrowDown, OpenInNew } from '@mui/icons-material';
88
import { Button, ButtonBase, FormControl, MenuItem, Select, Typography } from '@mui/material';
9+
import $t from '@t';
910
import clsx from 'clsx';
1011
import { format } from 'date-fns';
1112
import { AnyArgFunction, AppTheme, III_DD_MMM_YYYY_HH_MM_AAAA_SPECIAL, openInternalLink, stubComponent } from 'ish-ui';
@@ -60,7 +61,7 @@ const styles = (theme: AppTheme) => ({
6061
borderRadius: `${theme.shape.borderRadius}px`,
6162
margin: theme.spacing(0, 0, 0.25, 0.25)
6263
},
63-
linkButtonIcon: {fontSize: "1.2em"},
64+
linkButtonIcon: { fontSize: "1.2em" },
6465
rootSelect: {
6566
fontWeight: 700,
6667
paddingRight: `${theme.spacing(2.5)}`
@@ -69,9 +70,9 @@ const styles = (theme: AppTheme) => ({
6970
});
7071

7172
const fundingStatuses: any[] = [
72-
{value: FundingStatus.success, label: "Success"},
73-
{value: FundingStatus.fail, label: "Failed"},
74-
{value: FundingStatus.unknown, label: "Unknown"}
73+
{ value: FundingStatus.success, label: "Success" },
74+
{ value: FundingStatus.fail, label: "Failed" },
75+
{ value: FundingStatus.unknown, label: "Unknown" }
7576
];
7677

7778
interface Props {
@@ -90,7 +91,7 @@ class FundingUploadComponent extends Component<Props, any> {
9091
};
9192

9293
handleChange = event => {
93-
const {onStatusChange, fundingUpload} = this.props;
94+
const { onStatusChange, fundingUpload } = this.props;
9495

9596
onStatusChange(fundingUpload.id, event.target.value);
9697
};
@@ -110,8 +111,7 @@ class FundingUploadComponent extends Component<Props, any> {
110111
<span>{fundingUpload.systemUser}</span>
111112
<span>
112113
{fundingUpload.outcomesCount}
113-
{' '}
114-
outcomes
114+
{$t('outcomes2')}
115115
<ButtonBase
116116
onClick={() => this.handleOutcomeLink(fundingUpload.id)}
117117
classes={{
@@ -172,7 +172,7 @@ class FundingUploadComponent extends Component<Props, any> {
172172
contained: classes.buttonContained
173173
}}
174174
>
175-
Run again
175+
{$t('run_again')}
176176
</Button>
177177
)}
178178
</div>

client-html/src/js/common/components/form/availabilityComponent/AvailabilityItem.tsx

+11-10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Holiday, RepeatEndEnum, RepeatEnum } from '@api/model';
77
import { FormControlLabel, Grid } from '@mui/material';
88
import Button from '@mui/material/Button';
99
import Card from '@mui/material/Card';
10+
import $t from '@t';
1011
import clsx from 'clsx';
1112
import { format } from 'date-fns';
1213
import { normalizeNumberToPositive, StyledCheckbox, validateMinMaxDate, YYYY_MM_DD_MINUSED } from 'ish-ui';
@@ -106,12 +107,12 @@ const AvailabilityItem: React.FC<Props> = ({
106107
"d-flex-start justify-content-space-between": threeColumn
107108
})}
108109
>
109-
<FormField type="text" name={`${item}.description`} label="Description"/>
110+
<FormField type="text" name={`${item}.description`} label={$t('description')}/>
110111
{threeColumn && (
111112
<div className="d-flex errorColor">
112113
<div className="flex-fill"/>
113114
<Button size="small" color="inherit" onClick={onDelete.bind(null, field, index)}>
114-
Delete
115+
{$t('delete2')}
115116
</Button>
116117
</div>
117118
)}
@@ -120,7 +121,7 @@ const AvailabilityItem: React.FC<Props> = ({
120121
<Grid item xs={availabilityLayout[3].xs}>
121122
<FormControlLabel
122123
control={<StyledCheckbox checked={allDay} onChange={onAllDayChange}/>}
123-
label="All day"
124+
label={$t('all_day')}
124125
/>
125126
</Grid>
126127

@@ -129,7 +130,7 @@ const AvailabilityItem: React.FC<Props> = ({
129130
type={allDay ? "date" : "dateTime"}
130131
timezone={timezone}
131132
name={allDay ? `${item}.startDate` : `${item}.startDateTime`}
132-
label="Start"
133+
label={$t('start')}
133134
validate={validateMaxDate}
134135
required
135136
/>
@@ -140,7 +141,7 @@ const AvailabilityItem: React.FC<Props> = ({
140141
type={allDay ? "date" : "dateTime"}
141142
timezone={timezone}
142143
name={allDay ? `${item}.endDate` : `${item}.endDateTime`}
143-
label="End"
144+
label={$t('end')}
144145
validate={validateMinDate}
145146
required
146147
/>
@@ -150,7 +151,7 @@ const AvailabilityItem: React.FC<Props> = ({
150151
<FormField
151152
type="select"
152153
name={`${item}.repeat`}
153-
label="Repeat every"
154+
label={$t('repeat_every')}
154155
items={repeatListItems}
155156
/>
156157
</Grid>
@@ -160,7 +161,7 @@ const AvailabilityItem: React.FC<Props> = ({
160161
<FormField
161162
type="select"
162163
name={`${item}.repeatEnd`}
163-
label="End repeat"
164+
label={$t('end_repeat')}
164165
items={repeatEndListItems}
165166
className="pr-2"
166167
/>
@@ -173,7 +174,7 @@ const AvailabilityItem: React.FC<Props> = ({
173174
type="date"
174175
timezone={timezone}
175176
name={`${item}.repeatOn`}
176-
label="On date"
177+
label={$t('on_date')}
177178
validate={validateMinDate}
178179
className="pr-2"
179180
required
@@ -186,7 +187,7 @@ const AvailabilityItem: React.FC<Props> = ({
186187
<FormField
187188
name={`${item}.repeatEndAfter`}
188189
normalize={normalizeNumberToPositive}
189-
label="Times"
190+
label={$t('times')}
190191
type="number"
191192
min="0"
192193
required
@@ -200,7 +201,7 @@ const AvailabilityItem: React.FC<Props> = ({
200201
<div className="d-flex errorColor">
201202
<div className="flex-fill"/>
202203
<Button size="small" color="inherit" onClick={onDelete.bind(null, field, index)}>
203-
Delete
204+
{$t('delete2')}
204205
</Button>
205206
</div>
206207
)}

client-html/src/js/common/components/form/availabilityComponent/AvailabilityNextHint.tsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* No copying or use of this code is allowed without permission in writing from ish.
44
*/
55

6-
import { Holiday, RepeatEndEnum, RepeatEnum } from "@api/model";
7-
import Typography from "@mui/material/Typography";
8-
import { format as formatDate } from "date-fns";
9-
import { appendTimezone, III_DD_MMM_YYYY } from "ish-ui";
10-
import * as React from "react";
6+
import { Holiday, RepeatEndEnum, RepeatEnum } from '@api/model';
7+
import Typography from '@mui/material/Typography';
8+
import $t from '@t';
9+
import { format as formatDate } from 'date-fns';
10+
import { appendTimezone, III_DD_MMM_YYYY } from 'ish-ui';
11+
import * as React from 'react';
1112

1213
function encreaseDate(date, step) {
1314
switch (step) {
@@ -143,7 +144,7 @@ const AvailabilityNextHint = (props: HintProps) => {
143144
startDate, startDateTime, endDate, endDateTime, ...rest
144145
} = props.item;
145146

146-
const computed: Holiday = {...rest};
147+
const computed: Holiday = { ...rest };
147148

148149
const allDay = Boolean(startDate && endDate);
149150

@@ -154,7 +155,7 @@ const AvailabilityNextHint = (props: HintProps) => {
154155

155156
return (
156157
<div className={props.className}>
157-
<Typography variant="caption">Next</Typography>
158+
<Typography variant="caption">{$t('next')}</Typography>
158159
{dates}
159160
</div>
160161
);

0 commit comments

Comments
 (0)