-
Notifications
You must be signed in to change notification settings - Fork 672
Localize DefaultProvisioningContextProvider interaction strings #10961
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: JamesNK <[email protected]>
…entation Co-authored-by: JamesNK <[email protected]>
tests/Aspire.Hosting.Azure.Tests/AzureProvisioningStringsTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: JamesNK <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR localizes user-facing strings in the Azure provisioning experience by replacing hardcoded strings with resource strings from a new AzureProvisioningStrings.resx
file. The change enables future internationalization of Azure provisioning prompts, input labels, and validation messages while maintaining backward compatibility.
- Adds comprehensive localization infrastructure with 12 resource strings covering all user-facing text
- Updates
DefaultProvisioningContextProvider
to use resource strings instead of hardcoded text - Generates translation files for 12 languages with proper XLIFF structure
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Aspire.Hosting.Azure/Resources/AzureProvisioningStrings.resx |
Adds primary resource file with 12 localized strings for Azure provisioning UI |
src/Aspire.Hosting.Azure/Resources/xlf/*.xlf |
Generated XLIFF translation files for 12 languages with proper structure |
src/Aspire.Hosting.Azure/Provisioning/Internal/DefaultProvisioningContextProvider.cs |
Updates code to use resource strings instead of hardcoded text |
Files not reviewed (1)
- src/Aspire.Hosting.Azure/Resources/AzureProvisioningStrings.Designer.cs: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as far as the outputs in this for the CLI interaction.
This PR addresses the localization of user-facing strings in
DefaultProvisioningContextProvider
that are displayed through the interaction service. Previously, all strings were hardcoded directly in the code, making them impossible to localize for international users.Changes Made
Resource Infrastructure:
Resources/AzureProvisioningStrings.resx
with 12 localized strings covering all user-facing text inDefaultProvisioningContextProvider
AzureProvisioningStrings.Designer.cs
file following the same pattern as other Aspire projects.xlf
files for 12 languages, enabling future translationsCode Updates:
DefaultProvisioningContextProvider
to useAzureProvisioningStrings
instead of hardcoded stringsAspire.Hosting.Azure.Resources
Localized Strings Include:
Testing:
AzureProvisioningStringsTests.cs
to verify all resource strings load correctlyTechnical Approach
The implementation follows the established pattern used by other Aspire projects like
Aspire.Hosting.Resources.InteractionStrings
. Resource strings are accessed directly without dependency injection to match the existing codebase architecture, ensuring consistency across the project.Example
Before:
After:
This change enables future localization of the Azure provisioning experience while maintaining full backward compatibility with existing functionality.
Fixes #10960.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.