Skip to content

Commit d08f437

Browse files
authored
Merge pull request #3690 from techmatters/CHI-3368-data_translations
CHI-3368: Add more translation templates for values that come from config
2 parents 928f5d8 + 0e4c2c8 commit d08f437

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

plugin-hrm-form/src/components/callTypeButtons/CallTypeButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const CallTypeButtons: React.FC<Props> = ({
170170
marginRight={i % 2 === 0}
171171
disabled={loadingStatus === LoadingStatus.LOADING}
172172
>
173-
{callType.label}
173+
<Template code={callType.label} />
174174
</NonDataCallTypeButton>
175175
))}
176176
</Box>

plugin-hrm-form/src/components/callTypeButtons/styles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ type NonDataCallTypeButtonProps = {
7070
export const NonDataCallTypeButton = styled(Button)<NonDataCallTypeButtonProps>`
7171
white-space: normal;
7272
width: 140px;
73-
height: 44px;
74-
margin-bottom: 10px;
73+
min-height: 44px;
74+
padding: 0;
7575
display: inline-flex;
7676
align-items: center;
7777
justify-content: center;

plugin-hrm-form/src/components/common/forms/CategoryCheckboxes.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
import React from 'react';
1717
import { CategoryEntry } from 'hrm-form-definitions';
18+
import { Template } from '@twilio/flex-ui';
1819

1920
import {
2021
SubcategoriesWrapper,
@@ -56,7 +57,7 @@ const createSubcategoryCheckbox = (
5657
checked={selected}
5758
data-testid={`categories.${category}.${label}`}
5859
/>
59-
{label}
60+
<Template code={label} />
6061
</CategoryCheckboxField>
6162
</CategoryCheckboxLabel>
6263
{toolkitUrl && (

plugin-hrm-form/src/components/common/forms/Section.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ArrowDownIcon = ContactDetailsIcon(ArrowDropDownTwoTone);
3131
const ArrowUpIcon = ContactDetailsIcon(ArrowDropUpTwoTone);
3232

3333
type MyProps = {
34-
sectionTitle: string | JSX.Element;
34+
sectionTitle: string;
3535
color?: string;
3636
expanded: boolean;
3737
handleExpandClick: (event?: any) => void;
@@ -67,7 +67,9 @@ const Section: React.FC<MyProps> = ({
6767
onClick={handleExpandClick}
6868
data-testid={buttonDataTestid}
6969
>
70-
<SectionTitleText>{sectionTitle}</SectionTitleText>
70+
<SectionTitleText>
71+
<Template code={sectionTitle} />
72+
</SectionTitleText>
7173
{!hideIcon && (expanded ? <ArrowUpIcon /> : <ArrowDownIcon />)}
7274
</SectionTitleButton>
7375
{showEditButton && (

plugin-hrm-form/src/components/resources/mappingComponents/khpMappings/ResourceSearchFilters.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ const ResourceSearchFilters: React.FC<{}> = () => {
189189
);
190190
}}
191191
/>
192-
&nbsp;&nbsp;{label ?? value}
192+
&nbsp;&nbsp;
193+
<Template code={label ?? value} />
193194
</FormLabel>
194195
</Grid>
195196
))}

0 commit comments

Comments
 (0)