Move hardcoded Aapt2Compile warning string to Resources.resx for localization - #12227
Merged
Merged
Conversation
Closed
5 tasks
…calization Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move hardcoded Aapt2Compile warning string into Resources.resx for localization
Move hardcoded Aapt2Compile warning string to Resources.resx for localization
Jul 24, 2026
jonathanpeppers
marked this pull request as ready for review
July 24, 2026 13:20
Contributor
There was a problem hiding this comment.
Pull request overview
Moves a hardcoded English warning message in the Aapt2Compile MSBuild task onto the existing Properties.Resources localization pipeline, aligning warning output with the repo’s localized resource conventions (per issue #12226).
Changes:
- Add a new
Aapt2IgnoringDirectorystring resource (with{0}placeholder and comment) to the main EnglishResources.resx. - Update
Resources.Designer.csto expose the new strongly-typed resource property. - Replace the interpolated warning literal in
Aapt2Compilewith a resource-based formatted warning message.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Compile.cs | Switches the warning emission from an English literal to a localized resource string. |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.resx | Adds the new Aapt2IgnoringDirectory resource entry with placeholder and translator comment. |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs | Adds the generated accessor property for the new resource key. |
Files not reviewed (1)
- src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs: Generated file
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1fe1fe3-edd9-4a1f-8616-8b5072aca8c4
jonathanpeppers
enabled auto-merge (squash)
July 24, 2026 16:28
rolfbjarne
approved these changes
Jul 27, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Aapt2Compileemitted a hardcoded, uncoded warning when a resource directory no longer existed. This moves the message into the localization resources and follows the established coded-warning pattern.Changes
XA4323:Ignoring directory '{0}' as it does not exist!Log.LogCodedWarning("XA4323", Properties.Resources.XA4323, fileOrDirectory)The warning text remains unchanged; it now includes the
XA4323code and can be localized.Fixes #12226