Conversation
…t can be included in the .Tests project
… in order to be able to validate localized the strings in tests
This was referenced Feb 14, 2023
Closed
# Conflicts: # src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt # src/System.CommandLine/Builder/CommandLineBuilder.cs # src/System.CommandLine/CommandLineConfiguration.cs # src/System.CommandLine/ParseResult.cs
adamsitnik
commented
Feb 16, 2023
| <Compile Include="..\Common\ArgumentBuilder.cs" Link="Utility\ArgumentBuilder.cs" /> | ||
| <Compile Include="..\Common\OptionBuilder.cs" Link="Utility\OptionBuilder.cs" /> | ||
| <Compile Include="..\System.CommandLine.Suggest\DotnetMuxer.cs" Link="Utility\DotnetMuxer.cs" /> | ||
| <Compile Include="..\System.CommandLine\LocalizationResources.cs" Link="LocalizationResources.cs" /> |
Member
Author
There was a problem hiding this comment.
I am including these types and the resources here so the tests can call the internal APIs to verify error messages.
adamsitnik
commented
Feb 16, 2023
| using System.Linq; | ||
| using Xunit; | ||
|
|
||
| namespace System.CommandLine.ApiCompatibility.Tests |
Member
Author
There was a problem hiding this comment.
I've added this type to a different project than System.CommandLine.Tests to ensure that it does not use the resources included in that project.
…hods and resources
Member
Author
|
@KalleOlaviNiemitalo I've removed all the unused methods and resources, thank you for the feedback! I was also curious if it's not a bug that we don't use them. It turned out that we are now just using different methods for the same purposes: |
|
Huh. I wonder if the unused resources were preserved for API compatibility only. |
# Conflicts: # src/System.CommandLine/Builder/CommandLineBuilder.cs # src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs # src/System.CommandLine/CommandLineConfiguration.cs # src/System.CommandLine/Help/HelpOption.cs # src/System.CommandLine/Help/VersionOption.cs
jonsequitur
approved these changes
Feb 22, 2023
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.
I've not configured OneLocBuild as we may move the code to dotnet/runtime where it's already configured for the whole repo.
To move the existing translations from SDK repo to here I've wrote a console app that took care of mapping the translations by ID, by original English text (some IDs has changed but text remained the same).
The app is ugly but it does what it's needed:
Details