Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MoaidHathot
Copy link

This PR adds --format json support for dotnet new list according to the discussion in #43679

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Oct 13, 2024
@@ -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>
Copy link

@mariuszbyahoo mariuszbyahoo Oct 13, 2024

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"

Copy link
Member

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.

Copy link

@mariuszbyahoo mariuszbyahoo Oct 13, 2024

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 :)

@MoaidHathot
Copy link
Author

@MoaidHathot please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

{
AllowMultipleArgumentsPerToken = true,
Description = SymbolStrings.ListCommand_Option_Format,
Arity = new ArgumentArity(1, 1),
Copy link
Member

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,
Copy link
Member

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;
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants