Skip to content

Commit

Permalink
CHI 2463 Client Profiles: Add missing strings (#1930)
Browse files Browse the repository at this point in the history
* chore: add missing translations for client profiles

* fix linter

* fix linter
  • Loading branch information
mythilytm authored Dec 14, 2023
1 parent 7052b6b commit f9dd02f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const ContactDetailsHome: React.FC<Props> = function ({
const profileLink = featureFlags.enable_client_profiles && savedContact.profileId && (
<SectionActionButton padding="0" type="button" onClick={() => openProfileModal(savedContact.profileId)}>
<Icon icon="DefaultAvatar" />
View Client
<Template code="Profile-ViewClient" />
</SectionActionButton>
);

Expand Down
2 changes: 1 addition & 1 deletion plugin-hrm-form/src/components/profile/ProfileTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ProfileTabs: React.FC<Props> = ({ profileId, task, currentTab, changeProfi
const { profile: { contactsCount, casesCount } = {} } = useProfile({ profileId, shouldAutoload: true });
const tabs = [
{
label: 'Client',
label: <Template code="Profile-ClientTab" />,
key: 'details',
renderComponent: () => <ProfileDetails profileId={profileId} task={task} />,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import React from 'react';
import { ProfileSectionDefinition } from 'hrm-form-definitions';
import { Template } from '@twilio/flex-ui';

import { ProfileCommonProps } from '../types';
import { useProfileSectionByType } from '../../../states/profile/hooks/useProfileSection';
Expand All @@ -34,7 +35,13 @@ const ProfileSectionView = ({ profileId, sectionType }: OwnProps) => {

return (
<ProfileSectionTextContent hasContent={Boolean(section?.content)}>
{section?.content?.length > 0 ? section?.content : `No ${sectionType.label}`}
{section?.content?.length > 0 ? (
section?.content
) : (
<>
<Template code="Profile-Notes-No" /> {sectionType.label}
</>
)}
</ProfileSectionTextContent>
);
};
Expand Down
3 changes: 3 additions & 0 deletions plugin-hrm-form/src/translations/en-US/flexUI.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
"PreviousContacts-OnlyShowRecordsFrom": "Only show records from",

"Profile-Title": "Client Profile",
"Profile-ClientTab": "Client",
"Profile-DetailsHeader-Overview": "Overview",
"Profile-DetailsHeader-Notes": "Notes",
"Profile-IdentifiersHeader": "Identifiers",
Expand All @@ -395,9 +396,11 @@
"Profile-EditHeader": "Edit Profile",
"Profile-EditNoteHeader": "Edit Note",
"Profile-EditButton": "Edit",
"Profile-Notes-No": "No",
"Profile-FlagEditHeader": "Edit Status and Blocking",
"Profile-NoContactsFound": "No Contacts Found",
"Profile-NoCasesFound": "No Cases Found",
"Profile-ViewClient": "View Client",

"UploadFile-ButtonText": "Upload File",
"DownloadFile-ButtonText": "Download File",
Expand Down
4 changes: 1 addition & 3 deletions plugin-hrm-form/src/translations/es-CL/flexUI.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,5 @@
"CaseMerging-RemoveFromCase": "Quitar del caso",
"CaseMerging-ContactRemovedFromCase": "Contacto eliminado del caso",
"CaseMerging-CaseCreatedAndContactAdded": "Caso #{{caseId}} creado y contacto agregado",
"CaseMerging-CancelCase": "Cancelar Caso",

"Something Else": "Enfoque Recomendado"
"CaseMerging-CancelCase": "Cancelar Caso"
}

0 comments on commit f9dd02f

Please sign in to comment.