Skip to content

[Loc][MWPW-188683] Support config-stage sheet and defaultlocales column for locale selection#5800

Open
maagrawal16 wants to merge 4 commits intoadobecom:milostudio-stagefrom
maagrawal16:MWPW-188683
Open

[Loc][MWPW-188683] Support config-stage sheet and defaultlocales column for locale selection#5800
maagrawal16 wants to merge 4 commits intoadobecom:milostudio-stagefrom
maagrawal16:MWPW-188683

Conversation

@maagrawal16
Copy link
Copy Markdown

@maagrawal16 maagrawal16 commented Apr 10, 2026

These are the changes made to support Lingo in the Milo Studio Localization workflow:

config-stage sheet support

  • fetchLocales now accepts an optional configName parameter (defaults to 'config')
  • When the env is stage or local, the tool first attempts to fetch from config-stage.json, which allows tenants to maintain stage-specific locale configurations
  • Falls back gracefully to config.json if config-stage is not present for a given tenant, so existing tenants are unaffected
  • env is now resolved before fetchLocaleDetails() is called in locui-create.js to ensure the correct config sheet is fetched on initialization

defaultlocales column support

  • Locale sheets can now include an optional defaultlocales column per language, allowing tenants to define a subset of livecopies that should be pre-selected when a language is chosen
  • When defaultlocales is present, only those locales are activated on language select (instead of all livecopies)
  • Deselecting a language still removes all livecopies as before
  • setSelectedLocalesAndRegions and getLanguageDetails in utils.js also respect defaultlocales when computing active/selected locales

defaultlocales in translation workflow

  • For translation projects, only the defaultlocales for each language are passed in the locales payload (instead of an empty list)
  • No frontend behavior change — this is a data-only update to ensure the correct locales are sent downstream

defaultlocales in region selection

  • When a region is selected (e.g. Americas), all locales from the region still appear in the Selected Locales panel, but only locales that match a language's defaultlocales are activated
  • For example, selecting Americas adds ca (English) and ca_fr (French) to the panel, but since French has defaultlocales = fr, only ca is active — ca_fr appears but is not pre-selected
  • Deselecting a region still removes all its locales as before

Resolves: MWPW-188683

Test URLs:

@mokimo mokimo removed the trivial label Apr 14, 2026
@maagrawal16 maagrawal16 added the needs-verification PR requires E2E testing by a reviewer label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-verification PR requires E2E testing by a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants