-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix --project
and --solution
descriptions for dotnet test
MTP to use "test" instead of "run" and extract shared localization strings
#51052
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
base: release/10.0.1xx
Are you sure you want to change the base?
Changes from 4 commits
b68d460
4c9c63e
7d82904
9587df9
605166a
99e653e
d8074b5
cecdc27
9b2267f
504b6d2
3cc26fb
8b5c495
435f66c
d9189db
6ca6dfb
bf21991
7cf2ad4
3877d3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 have a minor nit: the strings for
run
andtest
are the same except for the 'verb' used - we've been extracting this pattern out to shared strings and providing the 'verb' as a parameter when creating the Option/Argument.@copilot can you extract the shared loc string and update the test and run usages of the Project and Solution options to use the shared string, passing in the matching verb?
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.
@baronfel Is it fine if the words "run"/"test" are not localized? Or do we want to also have resources with "single" words for "run" and "test" so they are localized?
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.
good point - @copilot make those single words localizeable as well
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.
Done in commit 99e653e. Created parameterized resource strings
CmdProjectDescriptionFormat
andCmdSolutionDescriptionFormat
, and factory methodsCommonOptions.ProjectOption(string verb)
andCommonOptions.SolutionOption(string verb)
. Both test and run commands now use these shared methods with their respective verbs ("test" and "run").Test command:
Run command:
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.
Done in commit d8074b5. Added localized verb resources
VerbRun
andVerbTest
in CliCommandStrings.resx. Updated both test and run command parsers to use these localized strings instead of hardcoded "test" and "run".Changes:
VerbRun
andVerbTest
resource stringsMicrosoftTestingPlatformOptions
to useCliCommandStrings.VerbTest
RunCommandParser
to useCliCommandStrings.VerbRun
The verbs are now properly localizable, ensuring consistent translations across all languages.