Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.I

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"add-content", @"Add content to a translation memory");
var command = new Command(commandName ?? @"add-content", @"Add content to a translation memory");
command.Arguments.Add(Id);
command.Options.Add(Source);
command.Options.Add(Target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.I

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"add-glossary", @"Add glossary terms to a memory");
var command = new Command(commandName ?? @"add-glossary", @"Add glossary terms to a memory");
command.Arguments.Add(Id);
command.Options.Add(Type);
command.Options.Add(Tuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.M

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"create-memory", @"Create a translation memory");
var command = new Command(commandName ?? @"create-memory", @"Create a translation memory");
command.Arguments.Add(NameOption);
command.Options.Add(DescriptionOption);
command.Options.Add(ExternalId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.M

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"delete-memory", @"Delete a translation memory");
var command = new Command(commandName ?? @"delete-memory", @"Delete a translation memory");
command.Arguments.Add(Id);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.D

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"detect-language", @"Detect language of text");
var command = new Command(commandName ?? @"detect-language", @"Detect language of text");
command.Options.Add(Q);
command.Options.Add(Format);
command.Options.Add(Input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.C

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"get-context-vector", @"Generate context vector for adaptive translation");
var command = new Command(commandName ?? @"get-context-vector", @"Generate context vector for adaptive translation");
command.Options.Add(Source);
command.Options.Add(Targets);
command.Options.Add(Text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.I

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"get-import-job", @"Get import job status");
var command = new Command(commandName ?? @"get-import-job", @"Get import job status");
command.Arguments.Add(Id);


Expand Down
4 changes: 2 additions & 2 deletions src/cli/ModernMT.CLI/Commands/GetMemoryCommandApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.M

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"get-memory", @"Get a translation memory");
var command = new Command(commandName ?? @"get-memory", @"Get a translation memory");
command.Arguments.Add(Id);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.L

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"list-languages", @"List supported languages");
var command = new Command(commandName ?? @"list-languages", @"List supported languages");



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.M

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"list-memories", @"List translation memories");
var command = new Command(commandName ?? @"list-memories", @"List translation memories");



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.Q

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"quality-estimation", @"Estimate translation quality");
var command = new Command(commandName ?? @"quality-estimation", @"Estimate translation quality");
command.Options.Add(Source);
command.Options.Add(Target);
command.Options.Add(Sentence);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.B

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"translate-batch", @"Submit batch translation");
var command = new Command(commandName ?? @"translate-batch", @"Submit batch translation");
command.Options.Add(Source);
command.Options.Add(Target);
command.Options.Add(Q);
Expand Down
4 changes: 2 additions & 2 deletions src/cli/ModernMT.CLI/Commands/TranslateCommandApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.T

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"translate", @"Translate text");
var command = new Command(commandName ?? @"translate", @"Translate text");
command.Options.Add(Source);
command.Options.Add(Target);
command.Options.Add(Q);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ private static string FormatResponse(ParseResult parseResult, global::ModernMT.M

static partial void CustomizeCommand(ref Command command);

public static Command Create()
public static Command Create(string? commandName = null)
{
var command = new Command(@"update-memory", @"Update a translation memory");
var command = new Command(commandName ?? @"update-memory", @"Update a translation memory");
command.Arguments.Add(Id);
command.Options.Add(NameOption);
command.Options.Add(DescriptionOption);
Expand Down
Loading