Skip to content

Commit b46532a

Browse files
committed
Replaced Master word with default
1 parent d6c63ee commit b46532a

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

ui/src/components/Common/AddStack/addStack.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { getCMSDataFromFile } from '../../../cmsData/cmsSelector';
2424
import { CS_ENTRIES } from '../../../utilities/constants';
2525

2626
// Interface
27-
import { AddStackCMSData, defaultAddStackCMSData } from './addStack.interface';
27+
import { AddStackCMSData, defaultAddStackCMSData, Errors, Stack } from './addStack.interface';
2828

2929
// Styles
3030
import './addStack.scss';
@@ -129,8 +129,12 @@ const AddStack = (props: any): JSX.Element => {
129129
<FinalForm
130130
onSubmit={onSubmit}
131131
keepDirtyOnReinitialize={true}
132-
validate={(values: any) => {
133-
const errors: any = {};
132+
validate={(values: Stack) => {
133+
const errors: Errors = {
134+
name: '',
135+
locale: '',
136+
description: ''
137+
};
134138
if (!values?.name || values?.name?.trim().length < 1) {
135139
errors.name = 'Stack name required';
136140
}
@@ -263,7 +267,7 @@ const AddStack = (props: any): JSX.Element => {
263267
version={'v2'}
264268
placeholder={addStackCMSData?.stack_locale_description}
265269
/>
266-
<div className="stack-creation-warning"><span className='imp-text'>Important:</span> The master language cannot be changed after the stack has been created.</div>
270+
<div className="stack-creation-warning"><span className='imp-text'>Important:</span> The default language cannot be changed after the stack has been created.</div>
267271
{meta?.error && meta?.touched && (
268272
<ValidationMessage
269273
testId="cs-stack-create-language-validation"

ui/src/components/DestinationStack/Actions/LoadLanguageMapper.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export type ExistingFieldType = {
3030
* @returns {JSX.Element | null} - Returns a JSX element if empty, otherwise null.
3131
*/
3232
const Mapper = ({
33-
key,
34-
uid,
3533
cmsLocaleOptions,
3634
handleLangugeDelete,
3735
options,
@@ -252,7 +250,6 @@ const Mapper = ({
252250
selectedValue: { label: string; value: string },
253251
index: number,
254252
) => {
255-
const csLocaleKey = existingField?.[index]?.value;
256253
const selectedLocaleKey = selectedValue?.value;
257254
const existingLabel = existingField?.[index];
258255
//const selectedLocaleKey = selectedMappings[index];
@@ -392,7 +389,7 @@ const Mapper = ({
392389

393390
{locale?.value === 'master_locale' ? (
394391
<Tooltip
395-
content="This is the master locale of above selected stacks and cannot be changed. Please select a corresponding language to map."
392+
content="This is the default locale of above selected stacks and cannot be changed. Please select a corresponding language to map."
396393
position="top"
397394
>
398395
<div>
@@ -531,7 +528,6 @@ const LanguageMapper = ({stack, uid} :{ stack : IDropDown, uid : string}) => {
531528
const [currentStack, setCurrentStack] = useState<IDropDown>(stack);
532529
const [previousStack, setPreviousStack] = useState<IDropDown>();
533530
const [isStackChanged, setisStackChanged] = useState<boolean>(false);
534-
const [stackValue, setStackValue] = useState<string>(stack?.value)
535531

536532
const prevStackRef:any = useRef(null);
537533

ui/src/components/DestinationStack/Actions/LoadStacks.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const LoadStacks = (props: LoadFileFormatProps) => {
8484
const [isError, setIsError] = useState<boolean>(false);
8585
const [errorMessage, setErrorMessage] = useState<string>('');
8686
const [placeholder] = useState<string>('Select a stack');
87-
const [localePlaceholder, setlocalePlaceholder ] = useState<string>('Master Locale will be set after stack selection');
87+
const [localePlaceholder, setlocalePlaceholder ] = useState<string>('Default Locale will be set after stack selection');
8888
const newMigrationDataRef = useRef(newMigrationData);
8989
const [isStackLoading, setIsStackLoading] = useState<boolean>(true);
9090

@@ -97,7 +97,7 @@ const LoadStacks = (props: LoadFileFormatProps) => {
9797
setlocalePlaceholder('')
9898
}
9999
else{
100-
setlocalePlaceholder('Master Locale will be set after stack selection');
100+
setlocalePlaceholder('Default Locale will be set after stack selection');
101101
}
102102
},[selectedStack])
103103

@@ -334,10 +334,10 @@ const LoadStacks = (props: LoadFileFormatProps) => {
334334
</div>
335335
</div>
336336
<div className="col-12">
337-
<label className="title" htmlFor="master_locale">Master Locale <span className='asterisk_input'></span>
337+
<label className="title" htmlFor="master_locale">Default Locale <span className='asterisk_input'></span>
338338
</label>
339339
<Tooltip
340-
content="Master Locale is auto-selected based on the chosen stack."
340+
content="Default Locale is auto-selected based on the chosen stack."
341341
position="right"
342342
>
343343
<Icon icon="Information" version="v2" size="small"></Icon>

ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FileDetails, ICMSType, INewMigration } from '../../../context/app/app.i
44
import { fileValidation } from '../../../services/api/upload.service';
55
import { RootState } from '../../../store';
66
import { updateNewMigrationData } from '../../../store/slice/migrationDataSlice';
7-
import { Button, CircularLoader, Paragraph } from '@contentstack/venus-components';
7+
import { Button, Paragraph } from '@contentstack/venus-components';
88
import { isEmptyString } from '../../../utilities/functions';
99
import { useParams } from 'react-router';
1010
import { ICardType } from '../../../components/Common/Card/card.interface';

ui/src/components/LegacyCms/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '../../context/app/app.interface';
1414

1515
import { isEmptyString, validateArray } from '../../utilities/functions';
16-
import { ICardType, defaultCardType } from '../Common/Card/card.interface';
16+
import { ICardType } from '../Common/Card/card.interface';
1717
import './legacyCms.scss';
1818
import { IFilterType } from '../Common/Modal/FilterModal/filterModal.interface';
1919
import { getCMSDataFromFile } from '../../cmsData/cmsSelector';

ui/src/pages/Migration/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type LegacyCmsRef = {
7171
getInternalActiveStepIndex: () => number;
7272
};
7373
type LocalesType = {
74-
[key: string]: any
74+
[key: string]: string;
7575
}
7676

7777
/**

0 commit comments

Comments
 (0)