CMG-1057, CMG-1058 | Language Mapper and Locale Migration Fixes#1107
Closed
chetan-contentstack wants to merge 1 commit into
Closed
CMG-1057, CMG-1058 | Language Mapper and Locale Migration Fixes#1107chetan-contentstack wants to merge 1 commit into
chetan-contentstack wants to merge 1 commit into
Conversation
CMG-1057: fix already-mapped locales appearing in dropdowns on restart, Add Language button stuck disabled after one addition, and rows locking prematurely before user advances past step 2. CMG-1058: route new-locale entries through localize path instead of creating duplicate entries; fix save button visibility and sticky footer in entry mapper; tighten step-1→step-3 skip guard to require all source locales mapped before bypassing step 2.
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Jira Ticket
CMG-1057 · CMG-1058
📋 PR Type
📝 Description
What changed?
CMG-1057 — Language mapper (Step 2) fixes for delta restart:
CMG-1058 — Delta migration correctness and UI fixes:
Why?
On a delta restart with extra locales added, the language mapper was showing already-consumed locales in dropdowns and blocking the user from adding more than one new language. On migration, new-locale entries were being imported as fresh entries (new UIDs) instead of being added as localizations to the entries created in the first iteration, breaking the localization relationship entirely.
🧩 Affected Areas
api— Node.js backendui— React frontendupload-api— Upload API serverdocker/docker-compose🧪 How to Test
CMG-1057:
CMG-1058:
Expected result: No duplicate entries created for new locales; existing entries gain locale variants. Language mapper dropdowns filter correctly and rows remain editable until saved.
📸 Screenshots / Recordings
🔗 Related PRs / Dependencies
✅ Author Checklist
feature/,bugfix/, orhotfix/+ 5–30 lowercase chars.env/example.envupdated if new environment variables were addednpm test)README.md/ docs updated if behaviour changed👀 Reviewer Notes
api/src/utils/entry-update.utils.ts— theremoveEntriesFromDatabasefunction previously skipped new-locale directories entirely (continue), leaving their entries in the import data for the CLI to create as fresh entries. It now falls through and routes any entry with a known Contentstack UID into the localize path (entriesToUpdate), removing it from import data to prevent duplication.LoadLanguageMapper.tsx. The key invariant:locale.valueis only set on rows rebuilt from a prior iteration's saved mapping; newly-added rows always havevalue = '', soisDisabled && !!locale.valuecorrectly locks only rebuilt rows.