@W-23849761 | Centralize translation locale validation in 26.8 - #118
Conversation
Run dash-form locale validation for manifest translation changes in the 26.8 release branch.
Lock in dash-form locale enforcement for app configuration translations with an explicit regression test.
| 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") |
There was a problem hiding this comment.
What determined this list? Should be defined separate from this file?
There was a problem hiding this comment.
@jbisaSF do you know if Alicia mentioned this was a hard list, or are we good to lift restrictions on which locales are supported?
There was a problem hiding this comment.
I thought that was just OOTB, but what I really meant is should the list be hardcoded in the test script?
There was a problem hiding this comment.
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.
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.
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
left a comment
There was a problem hiding this comment.
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.

Summary
.github/config/required-bm-locales.txtxx.jsonorxx-YY.jsonformatTest plan
bash .github/scripts/run-all-tests.sh— 10 suites, 0 failuresbash .github/scripts/validate-registry-translations.sh commerce-apps-manifest/translationsverify-zip.ymlandtest-scripts.ymlwith Ruby YAML