-
Notifications
You must be signed in to change notification settings - Fork 385
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
Localization #2041
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
@@ -32,6 +32,8 @@ | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@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
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: