-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Draft] Adding --format support to dotnet new list
#44140
base: main
Are you sure you want to change the base?
[Draft] Adding --format support to dotnet new list
#44140
Conversation
@@ -107,6 +107,11 @@ Jeśli polecenie zostanie określone bez argumentu, zostanie wyświetlona lista | |||
<target state="translated">Wyszukuje tylko aktualizacje i wyświetla pakiety szablonów do zaktualizowania bez stosowania aktualizacji.</target> | |||
<note /> | |||
</trans-unit> | |||
<trans-unit id="ListCommand_Option_Format"> | |||
<source>Specifies the output format type for the list packages command</source> |
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 can offer a translation to Polish:
"Określa format w jakim zostanie zwrócony wynik wywołania komendy list packages"
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.
Hey - unfortunately we cannot accept translations for any localizable text in this project, they all have to go through our internal localization process. We have some documentation about it here: https://github.com/dotnet/sdk/blob/main/documentation/project-docs/Localization.md
What's been done in this PR (defining new strings) is totally fine, but we can't do anything more than that.
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.
Hi, no worries - I rather added it as a proposal or hint or something like that. I am currently on a stage of setting this repository to be debuggable on my PC locally, but many thanks for the additional md resource :)
@dotnet-policy-service agree |
{ | ||
AllowMultipleArgumentsPerToken = true, | ||
Description = SymbolStrings.ListCommand_Option_Format, | ||
Arity = new ArgumentArity(1, 1), |
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.
nit: consider using ArgumentArity.ExactlyOne
here since it's the same as ArgumentArity(1,1)
.
#pragma warning disable SA1201 // Elements should appear in the correct order | ||
public enum FormatOptions | ||
{ | ||
Console, |
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 think the current layout would be more accurately described as 'table'
instead of 'console'
, what do you think?
@@ -5,6 +5,7 @@ | |||
using Microsoft.TemplateEngine.Abstractions; | |||
using Microsoft.TemplateEngine.Cli.Commands; | |||
using Microsoft.TemplateEngine.Utils; | |||
using Newtonsoft.Json; |
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.
Please use System.Text.Json for serialization by default
This PR adds
--format json
support fordotnet new list
according to the discussion in #43679