Uh oh!
There was an error while loading. Please reload this page.
Localization - #2041
Conversation
…t can be included in the .Tests project
… in order to be able to validate localized the strings in tests
# 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
Uh oh!
There was an error while loading. Please reload this page.
| <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" /> |
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.
| using System.Linq; | ||
| using Xunit; | ||
| namespace System.CommandLine.ApiCompatibility.Tests |
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
adamsitnik
commented
Feb 17, 2023
@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: |
KalleOlaviNiemitalo
commented
Feb 17, 2023
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
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