Skip to content

Commit 20bd6cf

Browse files
authored
update: Add localization of contact card section titles (#1871)
* update: Add localization for the contact section headers * update: Add a story showing localization of contact section titles
1 parent 592c5fe commit 20bd6cf

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

packages/mgt-components/src/components/mgt-person-card/sections/mgt-person-card-contact/mgt-person-card-contact.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,40 +83,40 @@ export class MgtPersonCardContact extends BasePersonCardSection {
8383
icon: getSvg(SvgIcon.Email, '#929292'),
8484
onClick: () => this.sendEmail(getEmailFromGraphEntity(this._person)),
8585
showCompact: true,
86-
title: 'Email'
86+
title: this.strings.emailTitle
8787
},
8888
chat: {
8989
icon: getSvg(SvgIcon.Chat, '#929292'),
9090
onClick: () => this.sendChat(this._person?.userPrincipalName),
9191
showCompact: false,
92-
title: 'Teams'
92+
title: this.strings.chatTitle
9393
},
9494
businessPhone: {
9595
icon: getSvg(SvgIcon.CellPhone, '#929292'),
9696
onClick: () => this.sendCall(this._person?.businessPhones?.length > 0 ? this._person.businessPhones[0] : null),
9797
showCompact: true,
98-
title: 'Business Phone'
98+
title: this.strings.businessPhoneTitle
9999
},
100100
cellPhone: {
101101
icon: getSvg(SvgIcon.CellPhone, '#929292'),
102102
onClick: () => this.sendCall(this._person?.mobilePhone),
103103
showCompact: true,
104-
title: 'Mobile Phone'
104+
title: this.strings.cellPhoneTitle
105105
},
106106
department: {
107107
icon: getSvg(SvgIcon.Department, '#929292'),
108108
showCompact: false,
109-
title: 'Department'
109+
title: this.strings.departmentTitle
110110
},
111111
title: {
112112
icon: getSvg(SvgIcon.Person, '#929292'),
113113
showCompact: false,
114-
title: 'Title'
114+
title: this.strings.titleTitle
115115
},
116116
officeLocation: {
117117
icon: getSvg(SvgIcon.OfficeLocation, '#929292'),
118118
showCompact: true,
119-
title: 'Office Location'
119+
title: this.strings.officeLocationTitle
120120
}
121121
};
122122
// tslint:enable: object-literal-sort-keys

packages/mgt-components/src/components/mgt-person-card/sections/mgt-person-card-contact/strings.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,12 @@
66
*/
77

88
export const strings = {
9-
contactSectionTitle: 'Contact'
9+
contactSectionTitle: 'Contact',
10+
emailTitle: 'Email',
11+
chatTitle: 'Teams',
12+
businessPhoneTitle: 'Business Phone',
13+
cellPhoneTitle: 'Mobile Phone',
14+
departmentTitle: 'Department',
15+
titleTitle: 'Title',
16+
officeLocationTitle: 'Office Location'
1017
};

stories/components/personCard/personCard.a.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ export const localization = () => html`
5353
showMoreSectionButton: 'أظهر المزيد' // global declaration
5454
},
5555
'person-card-contact': {
56-
contactSectionTitle: 'اتصل'
56+
contactSectionTitle: 'اتصل',
57+
emailTitle: 'البريد الإلكتروني',
58+
chatTitle: 'دردشة',
59+
businessPhoneTitle: 'هاتف العمل',
60+
cellPhoneTitle: 'هاتف محمول',
61+
departmentTitle: ' قسم، أقسام',
62+
titleTitle: 'لقب',
63+
officeLocationTitle: 'موقع المكتب'
5764
},
5865
'person-card-organization': {
5966
reportsToSectionTitle: 'تقارير ل',

0 commit comments

Comments
 (0)