Skip to content

@W-23849761 | Centralize translation locale validation in 26.8 - #118

Merged
shauryemahajanSF merged 7 commits into
release/26.8from
W-23849761-manifest-translation-check-26.8
Aug 14, 2026
Merged

shauryemahajanSF merged 7 commits into
release/26.8from
W-23849761-manifest-translation-check-26.8

Conversation

@shauryemahajanSF

@shauryemahajanSF shauryemahajanSF commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • define the required default BM locales once in .github/config/required-bm-locales.txt
  • use one shared checker for registry and packaged app translations
  • require every default locale in both locations while allowing additional filenames matching the BM-supported BCP-47 xx.json or xx-YY.json format
  • run validation when scripts, locale configuration, registry translations, or ZIPs change

Test plan

  • bash .github/scripts/run-all-tests.sh — 10 suites, 0 failures
  • bash .github/scripts/validate-registry-translations.sh commerce-apps-manifest/translations
  • Parse verify-zip.yml and test-scripts.yml with Ruby YAML
  • Linter check on changed files

Run dash-form locale validation for manifest translation changes in the 26.8 release branch.
@shauryemahajanSF
shauryemahajanSF requested review from a team August 13, 2026 19:51
Lock in dash-form locale enforcement for app configuration translations with an explicit regression test.
@shauryemahajanSF shauryemahajanSF changed the title @W-23849761 | Validate manifest translation locales in 26.8 @W-23849761 | Validate translation locale filenames in 26.8 Aug 13, 2026
jbisaSF
jbisaSF previously approved these changes Aug 13, 2026
fi

# Set of supported manifest locales. Region separators use BCP-47 dash form.
SUPPORTED_LOCALES=("ar-MA" "de" "en-US" "es" "fr" "it" "ja" "ko" "nl" "pl" "pt" "zh-CN" "zh-TW")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What determined this list? Should be defined separate from this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbisaSF do you know if Alicia mentioned this was a hard list, or are we good to lift restrictions on which locales are supported?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We saw BM has a fixed set of locales that it supports:

Screenshot 2026-08-13 at 4 24 51 PM

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that was just OOTB, but what I really meant is should the list be hardcoded in the test script?

@shauryemahajanSF shauryemahajanSF Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference is to make default BM locales required, and since it seems merchants can add locales beyond the default, any extra ones should just be formatted correctly. And then have the list in a central place so its not duplicated.

Comment thread .github/scripts/validate-registry-translations.sh Outdated
Reject underscore separators without restricting registry translations to a duplicated locale allowlist.
Describe rejected registry translation filenames as misformatted while preserving the BCP-47 dash-form guidance.
Use one authoritative default-locale list and shared checker for registry and packaged translations while allowing additional valid BM-style locale names.
@shauryemahajanSF shauryemahajanSF changed the title @W-23849761 | Validate translation locale filenames in 26.8 @W-23849761 | Centralize translation locale validation in 26.8 Aug 13, 2026
Describe the intentionally supported locale filename pattern as BM-supported BCP-47 throughout validation and documentation.
Remove the redundant special-case check for en-US from the shared locale validator.

@jeffraab-sfdc jeffraab-sfdc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to require files are present for all BM locales, and are confident the existing submissions meet this requirement, then I'm fine with this.

Requiring the locale files are present doesn't mean they have included all the required keys or have translated the text to the corresponding locale. I don't think you intended to validate those, and I'm fine with that limitation, just pointing it out.

@shauryemahajanSF
shauryemahajanSF merged commit fdab82f into release/26.8 Aug 14, 2026
3 checks passed
@shauryemahajanSF
shauryemahajanSF deleted the W-23849761-manifest-translation-check-26.8 branch August 14, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants