Localized Android icons: prevent sibling-locale fallback#4925
Merged
Conversation
Contributor
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks:
Unused image preview:
|
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Contributor
Cloudflare Preview
|
Collaborator
Author
|
Compared 105 screenshots: 105 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
Collaborator
Author
|
Compared 105 screenshots: 105 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Android's resource resolver (API 24+) walks every child of the parent locale when it can't find an exact or parent-language match, so an ar-PK device with only drawable-ar-rAE/ supplied would match the AE icon. Insert the default app icon into drawable-<lang>/ (and mipmap-*-<lang>/) when only region-qualified variants are provided, so the parent-locale lookup succeeds before sibling matching kicks in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
920acd8 to
0210813
Compare
Collaborator
Author
|
Compared 15 screenshots: 15 matched. |
Collaborator
Author
|
Compared 104 screenshots: 104 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
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.
Summary
cn1_icon_ar_AE.pngshipped, the build emitteddrawable-ar-rAE-*/with nodrawable-ar/, so anar-PKdevice hit the AE icon as a sibling match (customer report).processLocalizedIconsnow does a first pass to identify languages that have region-qualified variants but no language-only variant, and writes the default (non-localized) app icon intodrawable-<lang>/(andmipmap-*-<lang>/for adaptive icons). The parent-locale lookup now succeeds before Android escalates to sibling regions.cn1_icon_<lang>.pngit remains the language-level fallback — no behaviour change for that pattern.lang_COUNTRY→langmatching at runtime, so it's unaffected.Test plan
cn1_icon_ar_AE.pngsupplied and verifydrawable-ar-rAE-*/icon.png+drawable-ar-*/icon.png(default icon) are both produced.cn1_icon_ar.pngandcn1_icon_ar_AE.pngand verifydrawable-ar-*/uses the user-supplied Arabic icon (no barrier override).🤖 Generated with Claude Code