Skip to content

Commit 98e3929

Browse files
authored
refactor(console,experience): minor improvements to hints and translation (#7703)
refactor(console,experience): minor improvements to hints and translations
1 parent 003b1cd commit 98e3929

File tree

2 files changed

+10
-7
lines changed
  • packages
    • console/src/pages/SignInExperience/PageContent/components/ProfileFieldPartSubForm
    • phrases-experience/src/locales/en

2 files changed

+10
-7
lines changed

packages/console/src/pages/SignInExperience/PageContent/components/ProfileFieldPartSubForm/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CustomProfileFieldType } from '@logto/schemas';
2+
import { cond } from '@silverhand/essentials';
23
import { type ReactNode } from 'react';
34
import { useFormContext, Controller } from 'react-hook-form';
45
import { Trans, useTranslation } from 'react-i18next';
@@ -130,11 +131,13 @@ function ProfileFieldPartSubForm({ index }: Props) {
130131
error={formErrors?.label?.message}
131132
placeholder={t('sign_in_exp.custom_profile_fields.details.label_placeholder')}
132133
value={value || fallbackValue}
133-
description={
134-
<Trans components={{ a: <TextLink to="/sign-in-experience/content" /> }}>
135-
{t('sign_in_exp.custom_profile_fields.details.label_tip')}
136-
</Trans>
137-
}
134+
description={cond(
135+
isBuiltInFieldName && (
136+
<Trans components={{ a: <TextLink to="/sign-in-experience/content" /> }}>
137+
{t('sign_in_exp.custom_profile_fields.details.label_tip')}
138+
</Trans>
139+
)
140+
)}
138141
onChange={onChange}
139142
/>
140143
);

packages/phrases-experience/src/locales/en/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const profile = {
22
name: 'Name',
33
avatar: 'Avatar',
4-
givenName: 'Given name',
5-
familyName: 'Family name',
4+
givenName: 'First name',
5+
familyName: 'Last name',
66
middleName: 'Middle name',
77
fullname: 'Full name',
88
nickname: 'Nickname',

0 commit comments

Comments
 (0)