Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replaced Master word with default
  • Loading branch information
sayalijoshi27 committed Nov 4, 2025
commit b46532a71c44e6df331b9aca0b2fa8b16b38c892
12 changes: 8 additions & 4 deletions ui/src/components/Common/AddStack/addStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { getCMSDataFromFile } from '../../../cmsData/cmsSelector';
import { CS_ENTRIES } from '../../../utilities/constants';

// Interface
import { AddStackCMSData, defaultAddStackCMSData } from './addStack.interface';
import { AddStackCMSData, defaultAddStackCMSData, Errors, Stack } from './addStack.interface';

// Styles
import './addStack.scss';
Expand Down Expand Up @@ -129,8 +129,12 @@ const AddStack = (props: any): JSX.Element => {
<FinalForm
onSubmit={onSubmit}
keepDirtyOnReinitialize={true}
validate={(values: any) => {
const errors: any = {};
validate={(values: Stack) => {
const errors: Errors = {
name: '',
locale: '',
description: ''
};
if (!values?.name || values?.name?.trim().length < 1) {
errors.name = 'Stack name required';
}
Expand Down Expand Up @@ -263,7 +267,7 @@ const AddStack = (props: any): JSX.Element => {
version={'v2'}
placeholder={addStackCMSData?.stack_locale_description}
/>
<div className="stack-creation-warning"><span className='imp-text'>Important:</span> The master language cannot be changed after the stack has been created.</div>
<div className="stack-creation-warning"><span className='imp-text'>Important:</span> The default language cannot be changed after the stack has been created.</div>
{meta?.error && meta?.touched && (
<ValidationMessage
testId="cs-stack-create-language-validation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export type ExistingFieldType = {
* @returns {JSX.Element | null} - Returns a JSX element if empty, otherwise null.
*/
const Mapper = ({
key,
uid,
cmsLocaleOptions,
handleLangugeDelete,
options,
Expand Down Expand Up @@ -252,7 +250,6 @@ const Mapper = ({
selectedValue: { label: string; value: string },
index: number,
) => {
const csLocaleKey = existingField?.[index]?.value;
const selectedLocaleKey = selectedValue?.value;
const existingLabel = existingField?.[index];
//const selectedLocaleKey = selectedMappings[index];
Expand Down Expand Up @@ -392,7 +389,7 @@ const Mapper = ({

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

const prevStackRef:any = useRef(null);

Expand Down
8 changes: 4 additions & 4 deletions ui/src/components/DestinationStack/Actions/LoadStacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const LoadStacks = (props: LoadFileFormatProps) => {
const [isError, setIsError] = useState<boolean>(false);
const [errorMessage, setErrorMessage] = useState<string>('');
const [placeholder] = useState<string>('Select a stack');
const [localePlaceholder, setlocalePlaceholder ] = useState<string>('Master Locale will be set after stack selection');
const [localePlaceholder, setlocalePlaceholder ] = useState<string>('Default Locale will be set after stack selection');
const newMigrationDataRef = useRef(newMigrationData);
const [isStackLoading, setIsStackLoading] = useState<boolean>(true);

Expand All @@ -97,7 +97,7 @@ const LoadStacks = (props: LoadFileFormatProps) => {
setlocalePlaceholder('')
}
else{
setlocalePlaceholder('Master Locale will be set after stack selection');
setlocalePlaceholder('Default Locale will be set after stack selection');
}
},[selectedStack])

Expand Down Expand Up @@ -334,10 +334,10 @@ const LoadStacks = (props: LoadFileFormatProps) => {
</div>
</div>
<div className="col-12">
<label className="title" htmlFor="master_locale">Master Locale <span className='asterisk_input'></span>
<label className="title" htmlFor="master_locale">Default Locale <span className='asterisk_input'></span>
</label>
<Tooltip
content="Master Locale is auto-selected based on the chosen stack."
content="Default Locale is auto-selected based on the chosen stack."
position="right"
>
<Icon icon="Information" version="v2" size="small"></Icon>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FileDetails, ICMSType, INewMigration } from '../../../context/app/app.i
import { fileValidation } from '../../../services/api/upload.service';
import { RootState } from '../../../store';
import { updateNewMigrationData } from '../../../store/slice/migrationDataSlice';
import { Button, CircularLoader, Paragraph } from '@contentstack/venus-components';
import { Button, Paragraph } from '@contentstack/venus-components';
import { isEmptyString } from '../../../utilities/functions';
import { useParams } from 'react-router';
import { ICardType } from '../../../components/Common/Card/card.interface';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/LegacyCms/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '../../context/app/app.interface';

import { isEmptyString, validateArray } from '../../utilities/functions';
import { ICardType, defaultCardType } from '../Common/Card/card.interface';
import { ICardType } from '../Common/Card/card.interface';
import './legacyCms.scss';
import { IFilterType } from '../Common/Modal/FilterModal/filterModal.interface';
import { getCMSDataFromFile } from '../../cmsData/cmsSelector';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Migration/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type LegacyCmsRef = {
getInternalActiveStepIndex: () => number;
};
type LocalesType = {
[key: string]: any
[key: string]: string;
}

/**
Expand Down