Introduce resx for BuildValidator and MS.CA.Rebuild to allow localization#53447
Introduce resx for BuildValidator and MS.CA.Rebuild to allow localization#53447RikkiGibson merged 2 commits intodotnet:mainfrom
Conversation
RikkiGibson
left a comment
There was a problem hiding this comment.
Are there any projects other than BuildValidator and Rebuild?
No, the only other thing we have related to this feature is the test project, which doesn't need to be localized.
Thanks so much for taking a stab at this. I think remaining stuff we would want to move includes:
-
Description strings in the CLI
-
We have a lot of messages that we log at this point in the BuildValidator. Honestly not sure if we want them sticking around long-term, or whether we care about localizing things that would only show up in "verbose" mode, or what... so should probably punt on it.
Will try to take a closer look later to determine what else would need to be moved.
| else | ||
| { | ||
| throw new PlatformNotSupportedException("Runtime platform not supported for testing"); | ||
| throw new PlatformNotSupportedException(BuildValidatorResources.Runtime_platform_not_supported_for_testing); |
There was a problem hiding this comment.
I think in this case, it's sufficiently clear if the message string is removed entirely.
|
@jaredpar for second review |
|
Thanks for the contribution @Youssef1313! Will file a follow-up so we don't forget about doing something with the log messages. |
…ures/interpolated-string * upstream/main: (92 commits) Keep casts when necessary to prefer a constant pattern over a type pattern Remove SyntaxKind.DataKeyword (#53614) Display 'readonly' for record structs (#53634) Update Building, Debugging, and Testing on Windows.md (#53543) Update dependencies from https://github.com/dotnet/arcade build 20210521.3 (#53617) Introduce resx for BuildValidator and MS.CA.Rebuild to allow localization (#53447) Report obsoletion diagnostics for slice and indexer (#53463) Update BasicGenerateConstructorDialog.cs Add searchbox in generate overrides dialog Allow `with` on anonymous types (#53248) Report diagnostic on correct node (#53538) Fix NotNullIfNotNull delegate conversion (#53409) Verify quick info session in InvokeQuickInfo Remove unnecessary retry Ensure no navbar IO on the UI thread Enable nullable reference types Fix timeout behavior in GetQuickInfo Add a semantic model based GetQuickInfoAsync entry point into QuickInfoServiceWithProviders Move semantic model based quick info API up to CommonQuickInfoProvider type Fix dnceng build by forcing the use of xcopy msbuild ...
Fixes #52349
I added periods to the end of exception messages when moving to resx.
Enclosed variable inputs to the messages with single quotes.
Replaced an existing double quotes with single quotes to be consistent since this is what used across the whole codebase.
TODO: Haven't yet completed moving everything.
Are there any projects other than BuildValidator and Rebuild?
cc @RikkiGibson