-
Notifications
You must be signed in to change notification settings - Fork 7
Add automation to detect missing locale translations from dependent packages #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
|
@copilot - Rename the
|
…omments/prints, make MUI dynamic Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Done in commit 56b4971. Changes made:
|
|
@copilot A few more adjustments:
|
…rmat Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Done in commit 0ab272f. Changes made:
|
|
@copilot You shouldn't rely on |
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Done in commit 2c740ea. Changes made:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
Test antdwith urlopen('REDACTED') as response:
Test antdreq = Request('REDACTED')
|
|
@copilot Workflow fails with the following error message:
|
Co-authored-by: ArtyomVancyan <44609997+ArtyomVancyan@users.noreply.github.com>
Done in commit e63a075. Changes made:
|
Locale Detection Automation - Complete ✅
Successfully implemented automation to detect missing locale files in
react-phone-hooksby comparing against locales available in dependent packages (antd and MUI).Files Added
scripts/check-locales/__main__.pyhttps://github.com/ant-design/ant-design/tree/master/components/localehttps://github.com/mui/material-ui/tree/master/packages/mui-material/src/localecontext.ts,useLocale.ts) using regex patterncurlsubprocess to fetch directory listings from GitHub API.github/workflows/locales.ymltests.yml)missing-locales,translation,enhancementlabelscontents: read,issues: writeupdate.ymlworkflowTesting & Validation
✅ Script execution: Compiles successfully
✅ Python syntax: No errors
✅ Locale filtering: Only validates proper locale codes (e.g.,
enUS,zhCN,kuLatn)✅ Non-locale filtering: Excludes utility files like
context,useLocale✅ Workflow syntax: Fixed backtick escaping issue in GitHub Actions script
✅ Action versions: Consistent with existing workflows
✅ Permissions: Properly scoped for security
Implementation Details
Locale name pattern:
^[a-z]{2,3}[A-Z][A-Za-z]{1,3}$enUS,zhCN,arEG,kuLatn,beBY,psAF,mrINcontext,useLocale,indexAntd locales: Fetched from GitHub API, file names like
en_US.tsconverted toenUSMUI locales: Fetched from GitHub API, file names like
enUS.tsused directlyNetwork: Uses
curlsubprocess to fetch from GitHub API with proper User-Agent headersThis implementation follows the same pattern as existing workflows and fetches data directly from upstream sources.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.