331 references to LocalizableStrings
Microsoft.TemplateEngine.Cli (307)
ChoiceTemplateParameter.cs (7)
115
LocalizableStrings
.ParseChoiceTemplateOption_Error_InvalidDefaultValue,
123
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_MissingDefaultValue, or.IdentifierToken?.Value));
134
LocalizableStrings
.ParseChoiceTemplateOption_Error_InvalidDefaultIfNoOptionValue,
142
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_MissingDefaultIfNoOptionValue, or.IdentifierToken?.Value));
148
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_InvalidCount, or.IdentifierToken?.Value, argumentResult.Tokens.Count));
157
LocalizableStrings
.ParseChoiceTemplateOption_Error_InvalidArgument,
227
LocalizableStrings
.ParseChoiceTemplateOption_ErrorText_InvalidChoiceValue,
CliConsoleFormatter.cs (2)
41
textWriter.WriteLine(string.Format(
LocalizableStrings
.GenericError, message));
45
textWriter.WriteLine(string.Format(
LocalizableStrings
.GenericWarning, message));
CliTemplateParameter.cs (6)
336
LocalizableStrings
.ParseTemplateOption_Error_InvalidDefaultValue,
346
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_MissingDefaultValue, or.IdentifierToken?.Value));
358
LocalizableStrings
.ParseTemplateOption_Error_InvalidDefaultIfNoOptionValue,
365
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_MissingDefaultIfNoOptionValue, or.IdentifierToken?.Value));
377
LocalizableStrings
.ParseTemplateOption_Error_InvalidArgument,
386
argumentResult.AddError(string.Format(
LocalizableStrings
.ParseTemplateOption_Error_InvalidCount, or.IdentifierToken?.Value, argumentResult.Tokens.Count));
Commands\AliasAssignmentCoordinator.cs (4)
31
errors.Add(string.Format(
LocalizableStrings
.AliasAssignmentCoordinator_Error_NameShouldNotHaveColon, parameter.Name));
85
errors.Add(string.Format(
LocalizableStrings
.AliasAssignmentCoordinator_Error_ShortAlias, parameter.Name, fullShortNameOverride, qualifiedShortNameOverride));
129
errors.Add(string.Format(
LocalizableStrings
.AliasAssignmentCoordinator_Error_LongAlias, parameter.Name, $"--{longName}", $"--param:{longName}"));
161
Reporter.Verbose.WriteLine(string.Format(
LocalizableStrings
.AliasAssignmentCoordinator_Error_ShortAlias, parameter.Name, shortName, qualifiedShortName));
Commands\BaseCommand.cs (11)
96
Reporter.Output.WriteLine(
LocalizableStrings
.Commands_TemplateShortNameCommandConflict_Info, usedCommandAlias);
112
LocalizableStrings
.Commands_Warning_DeprecatedCommand,
116
Reporter.Output.WriteLine(
LocalizableStrings
.Commands_Warning_DeprecatedCommand_Info.Yellow());
199
Reporter.Output.WriteLine(
LocalizableStrings
.CurrentConfiguration);
207
.DefineColumn(mp => mp.Id.ToString(),
LocalizableStrings
.MountPointFactories, showAlways: true)
208
.DefineColumn(mp => mp.GetType().FullName ?? string.Empty,
LocalizableStrings
.Type, showAlways: true)
209
.DefineColumn(mp => mp.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty,
LocalizableStrings
.Assembly, showAlways: true);
218
.DefineColumn(g => g.Id.ToString(),
LocalizableStrings
.Generators, showAlways: true)
219
.DefineColumn(g => g.GetType().FullName ?? string.Empty,
LocalizableStrings
.Type, showAlways: true)
220
.DefineColumn(g => g.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty,
LocalizableStrings
.Assembly, showAlways: true);
283
Reporter.Error.WriteLine(
LocalizableStrings
.BaseCommand_ExitCodeHelp, (int)returnCode);
Commands\create\InstantiateCommand.cs (27)
125
string.Format(
LocalizableStrings
.InstantiateCommand_Info_NoMatchingTemplatesSubCommands, instantiateArgs.ShortName).Bold().Red());
143
reporter.WriteLine(
LocalizableStrings
.AmbiguousTemplatesHeader.Bold().Red());
149
.DefineColumn(t => t.GroupIdentity ?? t.Templates[0].Identity, out object? identityColumn,
LocalizableStrings
.ColumnNameIdentity, showAlways: true)
150
.DefineColumn(t => t.Name,
LocalizableStrings
.ColumnNameTemplateName, shrinkIfNeeded: true, minWidth: 15, showAlways: true)
151
.DefineColumn(t => string.Join(",", t.ShortNames),
LocalizableStrings
.ColumnNameShortName, showAlways: true)
152
.DefineColumn(t => string.Join(",", t.Languages),
LocalizableStrings
.ColumnNameLanguage, showAlways: true)
153
.DefineColumn(t => string.Join(",", t.Authors),
LocalizableStrings
.ColumnNameAuthor, showAlways: true, shrinkIfNeeded: true, minWidth: 10)
154
.DefineColumn(t => Task.Run(() => GetTemplatePackagesList(t)).GetAwaiter().GetResult(),
LocalizableStrings
.ColumnNamePackage, showAlways: true)
158
reporter.WriteLine(
LocalizableStrings
.AmbiguousTemplatesMultiplePackagesHint.Bold().Red());
171
environmentSettings.Host.Logger.LogWarning(
LocalizableStrings
.InstantiateCommand_Warning_FailedToGetTemplatePackageForTemplateGroup, templateGroup.GroupIdentity);
325
reporter.WriteLine(
LocalizableStrings
.AmbiguousTemplatesHeader.Bold().Red());
332
.DefineColumn(t => t.Identity, out object? identityColumn,
LocalizableStrings
.ColumnNameIdentity, showAlways: true)
333
.DefineColumn(t => t.Name,
LocalizableStrings
.ColumnNameTemplateName, shrinkIfNeeded: true, minWidth: 15, showAlways: true)
334
.DefineColumn(t => string.Join(",", t.ShortNameList),
LocalizableStrings
.ColumnNameShortName, showAlways: true)
335
.DefineColumn(t => t.GetLanguage() ?? string.Empty,
LocalizableStrings
.ColumnNameLanguage, showAlways: true)
336
.DefineColumn(t => t.Precedence.ToString(), out object? precedenceColumn,
LocalizableStrings
.ColumnNamePrecedence, showAlways: true)
337
.DefineColumn(t => t.Author ?? string.Empty,
LocalizableStrings
.ColumnNameAuthor, showAlways: true, shrinkIfNeeded: true, minWidth: 10)
338
.DefineColumn(t => Task.Run(() => GetTemplatePackage(t)).GetAwaiter().GetResult(),
LocalizableStrings
.ColumnNamePackage, showAlways: true)
343
reporter.WriteLine(
LocalizableStrings
.AmbiguousTemplatesMultiplePackagesHint.Bold().Red());
349
reporter.WriteLine(string.Format(
LocalizableStrings
.AmbiguousTemplatesSamePackageHint, templatePackage).Bold().Red());
364
environmentSettings.Host.Logger.LogWarning(
LocalizableStrings
.InstantiateCommand_Warning_FailedToGetTemplatePackageForTemplate, template.Identity);
449
Reporter.Error.WriteLine(
LocalizableStrings
.GenericWarning, e.Message);
470
reporter.WriteLine(
LocalizableStrings
.InstantiateCommand_Info_TypoCorrection_Templates);
498
reporter.WriteLine(
LocalizableStrings
.InstantiateCommand_Info_TypoCorrection_Subcommands);
515
reporter.WriteLine(
LocalizableStrings
.Generic_CommandHints_List_Template, instantiateArgs.ShortName);
524
reporter.WriteLine(
LocalizableStrings
.Generic_CommandHints_List);
536
reporter.WriteLine(
LocalizableStrings
.Generic_CommandHints_Search);
Commands\create\InstantiateCommand.NoMatchHandling.cs (8)
93
StringBuilder invalidParamsErrorText = new(
LocalizableStrings
.InvalidCommandOptions);
100
invalidParamsErrorText.Indent(1).AppendFormat(
LocalizableStrings
.InvalidParameterNameDetail, invalidParam.InputFormat);
107
invalidParamsErrorText.Indent(1).AppendFormat(
LocalizableStrings
.InvalidParameterDetail, invalidParam.InputFormat, invalidParam.SpecifiedValue);
117
invalidParamsErrorText.Indent(1).AppendFormat(
LocalizableStrings
.InvalidParameterDefault, invalidParam.InputFormat, invalidParam.SpecifiedValue);
146
reporter.WriteLine(string.Format(
LocalizableStrings
.Generic_Info_NoMatchingTemplates, string.Join(" ", tokens)).Bold().Red());
153
reporter.WriteLine(
LocalizableStrings
.InvalidParameterTemplateHint);
196
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.Generic_Info_NoMatchingTemplates, baseInputParameters).Bold().Red());
207
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.TemplateOptions_Error_AllowedValuesForOptionList, token.Value, allowedValues));
Commands\create\InstantiateCommand.TabCompletion.cs (1)
92
Reporter.Error.WriteLine(
LocalizableStrings
.GenericWarning, e.Message);
Commands\create\InvalidTemplateOptionResult.cs (2)
119
error.AppendFormat(
LocalizableStrings
.InvalidParameterDetail, InputFormat, SpecifiedValue);
155
text.Append(' ').Append(
LocalizableStrings
.PossibleValuesHeader);
Commands\create\TemplateCommand.cs (4)
227
reporter.WriteLine(
LocalizableStrings
.TemplateCommand_DisplayConstraintResults_Warning, templateArgs.Template.Name);
231
reporter.WriteLine(
LocalizableStrings
.TemplateCommand_DisplayConstraintResults_Error, templateArgs.Template.Name);
242
reporter.WriteLine(
LocalizableStrings
.TemplateCommand_DisplayConstraintResults_Hint, SharedOptions.ForceOption.Name);
247
reporter.WriteLine(
LocalizableStrings
.TemplateCommand_DisplayConstraintResults_Hint_TemplateNotUsable);
Commands\details\DetailsCommand.cs (1)
24
Description =
LocalizableStrings
.DetailsCommand_Argument_PackageIdentifier,
Commands\Extensions.cs (1)
75
LocalizableStrings
.Commands_Validator_WrongArgumentValue,
Commands\InvalidTemplateParametersException.cs (1)
23
stringBuilder.Append(string.Format(
LocalizableStrings
.Exception_InvalidTemplateParameters_MessageHeader, Template.Identity, Template.ShortNameList[0]));
Commands\NewCommand.Legacy.cs (2)
102
commandResult.AddError(string.Format(
LocalizableStrings
.Commands_Validator_WrongTokens, string.Join(",", wrongTokens)));
132
commandResult.AddError(string.Format(
LocalizableStrings
.Commands_Validator_WrongTokens, string.Join(",", wrongTokens)));
HostSpecificDataLoader.cs (2)
50
LocalizableStrings
.HostSpecificDataLoader_Warning_FailedToRead,
79
LocalizableStrings
.HostSpecificDataLoader_Warning_FailedToReadFromFile,
IReporterExtensions.cs (3)
32
reporter.WriteLine(
LocalizableStrings
.CommandOutput);
50
reporter.WriteLine(string.IsNullOrWhiteSpace(output) ?
LocalizableStrings
.Generic_Empty : output);
59
reporter.WriteLine(string.IsNullOrWhiteSpace(output) ?
LocalizableStrings
.Generic_Empty : output);
LocalizableStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.TemplateEngine.Cli.LocalizableStrings", typeof(
LocalizableStrings
).Assembly);
PostActionDispatcher.cs (16)
89
Reporter.Output.WriteLine(
LocalizableStrings
.ProcessingPostActions);
101
Reporter.Output.WriteLine(
LocalizableStrings
.ActionWouldHaveBeenTakenAutomatically);
114
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionDispatcher_Error_NotSupported, action.ActionId);
117
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionDescription, action.Description);
127
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionDispatcher_Error_RunScriptNotAllowed);
130
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionDescription, action.Description);
180
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionPromptHeader);
183
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionDescription, action.Description);
189
Reporter.Output.WriteLine(string.Format(
LocalizableStrings
.PostActionCommand, $"{executable} {commandArgs}").Bold().Red());
191
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionPromptRequest, YesAnswer, NoAnswer);
206
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionInvalidInputRePrompt, input, YesAnswer, NoAnswer);
227
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionFailedInstructionHeader);
233
Reporter.Error.WriteLine(
LocalizableStrings
.PostActionFailedInstructionHeader);
234
Reporter.Verbose.WriteLine(
LocalizableStrings
.Generic_Details, e.ToString());
250
stream.WriteLine(
LocalizableStrings
.PostActionInstructions, action.ManualInstructions);
256
stream.WriteLine(string.Format(
LocalizableStrings
.PostActionCommand, $"{executable} {commandArgs}").Bold().Red());
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (14)
88
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, JsonFileNameArgument));
94
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotBoolean, DetectRepoRoot));
100
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotBoolean, IncludeAllDirectoriesInSearch));
108
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotBoolean, IncludeAllParentDirectoriesInSearch));
124
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotBoolean, AllowFileCreationArgument));
130
Reporter.Error.WriteLine(
LocalizableStrings
.PostAction_ModifyJson_Error_NoJsonFile);
141
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_MultipleJsonFiles, jsonFileName));
168
Reporter.Output.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Succeeded, jsonFileName));
180
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_NullJson, fileContent));
186
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotBoolean, AllowPathCreationArgument));
194
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ParentPropertyPathInvalid, propertyPath));
259
Reporter.Verbose.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Verbose_AttemptingToFindJsonFile, matchPattern, directory));
312
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, NewJsonPropertyNameArgument));
318
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, NewJsonPropertyValueArgument));
PostActionProcessors\ChmodPostActionProcessor.cs (4)
55
Reporter.Error.WriteLine(
LocalizableStrings
.UnableToSetPermissions, entry.Key, file);
65
Reporter.Error.WriteLine(
LocalizableStrings
.UnableToSetPermissions, entry.Key, file);
71
Reporter.Error.WriteLine(
LocalizableStrings
.UnableToSetPermissions, entry.Key, file);
72
Reporter.Verbose.WriteLine(
LocalizableStrings
.Generic_Details, ex.ToString());
PostActionProcessors\InstructionDisplayPostActionProcessor.cs (3)
18
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionDescription, actionConfig.Description);
19
Reporter.Output.WriteLine(
LocalizableStrings
.PostActionInstructions, actionConfig.ManualInstructions);
24
Reporter.Output.WriteLine(string.Format(
LocalizableStrings
.PostActionCommand, $"{executable} {commandArgs}").Bold().Red());
PostActionProcessors\ProcessStartPostActionProcessor.cs (7)
21
Reporter.Error.WriteLine(
LocalizableStrings
.PostAction_ProcessStartProcessor_Error_ConfigMissingExecutable);
50
Reporter.Output.WriteLine(
LocalizableStrings
.RunningCommand, command);
66
Reporter.Error.WriteLine(
LocalizableStrings
.CommandFailed);
75
Reporter.Error.WriteLine(
LocalizableStrings
.CommandFailed);
82
Reporter.Output.WriteLine(
LocalizableStrings
.CommandSucceeded);
88
Reporter.Error.WriteLine(
LocalizableStrings
.CommandFailed);
91
Reporter.Verbose.WriteLine(
LocalizableStrings
.Generic_Details, ex.ToString());
TabularOutput\TemplateGroupDisplay.cs (6)
233
.DefineColumn(t => t.Name, out object? nameColumn,
LocalizableStrings
.ColumnNameTemplateName, shrinkIfNeeded: true, minWidth: 15, showAlways: true)
234
.DefineColumn(t => t.ShortNames,
LocalizableStrings
.ColumnNameShortName, showAlways: true)
235
.DefineColumn(t => t.Languages, out object? languageColumn,
LocalizableStrings
.ColumnNameLanguage, TabularOutputSettings.ColumnNames.Language, defaultColumn: true)
236
.DefineColumn(t => t.Type,
LocalizableStrings
.ColumnNameType, TabularOutputSettings.ColumnNames.Type, defaultColumn: false)
237
.DefineColumn(t => t.Author,
LocalizableStrings
.ColumnNameAuthor, TabularOutputSettings.ColumnNames.Author, defaultColumn: false, shrinkIfNeeded: true, minWidth: 10)
238
.DefineColumn(t => t.Classifications, out object? tagsColumn,
LocalizableStrings
.ColumnNameTags, TabularOutputSettings.ColumnNames.Tags, defaultColumn: true)
TemplateInvoker.cs (21)
107
ChangeKind.Create =>
LocalizableStrings
.Create,
108
ChangeKind.Change =>
LocalizableStrings
.Change,
109
ChangeKind.Delete =>
LocalizableStrings
.Delete,
110
ChangeKind.Overwrite =>
LocalizableStrings
.Overwrite,
111
_ =>
LocalizableStrings
.UnknownChangeKind
137
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.InvalidNameParameter, printableChars, nonPrintableChars).Bold().Red());
200
Reporter.Output.WriteLine(
LocalizableStrings
.CreateSuccessful, resultTemplateName);
204
Reporter.Output.WriteLine(
LocalizableStrings
.FileActionsWouldHaveBeenTaken);
216
Reporter.Output.WriteLine(
LocalizableStrings
.ThirdPartyNotices, templateArgs.Template.ThirdPartyNotices);
222
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.CreateFailed, resultTemplateName, instantiateResult.ErrorMessage).Bold().Red());
233
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.MissingRequiredParameter, fixedMessage, resultTemplateName).Bold().Red());
237
Reporter.Error.WriteLine(
LocalizableStrings
.TemplateCreator_Error_TemplateNotFound.Bold().Red());
239
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateCreator_Hint_RebuildCache);
255
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateCreator_Hint_Uninstall);
258
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateCreator_Hint_Install);
266
Reporter.Error.WriteLine($"{
LocalizableStrings
.InvalidCommandOptions}: {instantiateResult.ErrorMessage}".Bold().Red());
267
Reporter.Error.WriteLine(
LocalizableStrings
.RunHelpForInformationAboutAcceptedParameters);
275
Reporter.Error.WriteLine(
LocalizableStrings
.DestructiveChangesNotification.Bold().Red());
290
LocalizableStrings
.RerunCommandAndPassForceToCreateAnyway, SharedOptions.ForceOption.Name).Bold().Red()
301
Reporter.Error.WriteLine(
LocalizableStrings
.OperationCancelled.Bold().Red());
304
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.UnexpectedResult, Enum.GetName(typeof(CreationResultStatus), instantiateResult.Status), instantiateResult.ErrorMessage).Bold().Red());
TemplateListCoordinator.cs (13)
53
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatesFoundMatchingInputParameters, GetInputParametersString(args));
72
Reporter.Output.WriteLine(
LocalizableStrings
.NoTemplatesFound);
75
Reporter.Output.WriteLine(
LocalizableStrings
.Generic_CommandHints_Search);
89
LocalizableStrings
.Generic_Info_NoMatchingTemplates,
98
LocalizableStrings
.TemplatesNotValidGivenTheSpecifiedFilter,
110
LocalizableStrings
.TemplateListCoordinator_Error_FailedConstraints,
118
Reporter.Error.WriteLine(
LocalizableStrings
.Generic_CommandHints_Search);
152
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_Description, Example.For<NewCommand>(args.ParseResult));
156
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_TemplatesHeader, Example.For<NewCommand>(args.ParseResult));
163
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_ExampleHeader);
171
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_DisplayOptionsHint);
178
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_ListTemplatesHint);
185
Reporter.Output.WriteLine(
LocalizableStrings
.TemplateInformationCoordinator_DotnetNew_SearchTemplatesHint);
TemplatePackageCoordinator.cs (76)
73
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Error_PackageForTemplateNotFound, args.Template.Identity);
99
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Error_PackageForTemplateNotFound, template.Identity);
149
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAvailable, displayString);
151
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateSingleCommandHeader);
169
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_BuiltInCheck_Info_BuiltInPackageAvailable, $"{packageId}::{version}", provider);
170
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_BuiltInCheck_Info_UninstallPackage);
218
Reporter.Output.WriteLine(string.Format(
LocalizableStrings
.Colon_Separator_Deprecated, split[0], split.Length > 1 ? split[1] : string.Empty).Yellow());
229
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Error_FoundNoPackagesToInstall);
241
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Error_SameInstallRequests, installRequest.PackageIdentifier);
245
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Info_PackagesToBeInstalled);
315
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_PackagesToBeUpdated);
346
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_AllPackagesAreUpToDate);
378
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_Success, uninstallResult.TemplatePackage.DisplayName);
382
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Error_GenericError, uninstallResult.TemplatePackage.DisplayName, uninstallResult.ErrorMessage);
473
LocalizableStrings
.Generic_Info_NoMatchingTemplatePackage.Bold().Red(),
482
WriteIfNotNull(
LocalizableStrings
.DetailsCommand_Property_Version, packageMetadata.PackageVersion.ToString(), reporter, 1);
485
WriteIfNotNull(
LocalizableStrings
.DetailsCommand_Property_PrefixReserved, packageMetadata.PrefixReserved.ToString(), reporter, 1);
487
WriteIfNotNull(
LocalizableStrings
.DetailsCommand_Property_Description, packageMetadata.Description, reporter, 1);
490
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_SourceFeed}: {sourceFeed}".Indent(1));
494
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_Authors}:".Indent(1));
505
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_Owners}:".Indent(1));
514
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_LicenseMetadata}:".Indent(1));
515
WriteIfNotNull(
LocalizableStrings
.DetailsCommand_Property_License, packageMetadata.License, reporter, 2);
521
$"{
LocalizableStrings
.DetailsCommand_Property_LicenseExpression}: ".Indent(1) +
529
$"{
LocalizableStrings
.DetailsCommand_Property_LicenseUrl}: ".Indent(2) +
537
$"{
LocalizableStrings
.DetailsCommand_Property_RepoUrl}: {projectUrl}".Indent(2));
551
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_Authors}:".Indent(1));
566
$"{
LocalizableStrings
.DetailsCommand_Property_RepoUrl}: {nuGetSource}".Indent(1));
572
reporter.WriteLine($"{
LocalizableStrings
.DetailsCommand_Property_Templates}:".Indent(1));
579
.DefineColumn(t => t.Name,
LocalizableStrings
.ColumnNameTemplateName, minWidth: 15, showAlways: true, shrinkIfNeeded: true)
580
.DefineColumn(t => t.ShortNames,
LocalizableStrings
.ColumnNameShortName, minWidth: 15, showAlways: true)
581
.DefineColumn(t => t.Type,
LocalizableStrings
.ColumnNameType, minWidth: 15, showAlways: true)
582
.DefineColumn(t => t.Classifications,
LocalizableStrings
.ColumnNameTags, minWidth: 15, showAlways: true, shrinkIfNeeded: true)
583
.DefineColumn(t => t.Languages,
LocalizableStrings
.ColumnNameLanguage, minWidth: 15, showAlways: true);
596
Reporter.Verbose.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Verbose_NuGetCredentialServiceError, ex.ToString());
632
reporter.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Info_OverrideNotice);
633
reporter.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Info_PackageIsAvailable);
642
reporter.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_Info_UseForceToOverride, SharedOptions.ForceOption.Name);
720
LocalizableStrings
.TemplatePackageCoordinator_Error_PackageNotFound,
728
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Error_TemplateIncludedToPackages, notFoundPackage);
735
LocalizableStrings
.TemplatePackageCoordinator_Error_PackageNameContainsTemplates,
739
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Error_UninstallCommandHeader);
760
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Error_ListPackagesHeader);
769
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Error_ListPackagesHeader);
825
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAvailablePackages);
835
.DefineColumn(r => r.Identifier, out object? packageColumn,
LocalizableStrings
.ColumnNamePackage, showAlways: true)
836
.DefineColumn(r => r.CurrentVersion ?? string.Empty,
LocalizableStrings
.ColumnNameCurrentVersion, showAlways: true)
837
.DefineColumn(r => r.LatestVersion ?? string.Empty,
LocalizableStrings
.ColumnNameLatestVersion, showAlways: true)
842
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateSingleCommandHeader);
854
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAllCommandHeader);
882
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_InstalledItems);
886
Reporter.Output.WriteLine(
LocalizableStrings
.NoItems);
895
Reporter.Output.WriteLine($"{
LocalizableStrings
.Version} {managedSource.Version}".Indent(level: 2));
901
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_DetailsHeader.Indent(level: 2));
911
Reporter.Output.WriteLine($"{
LocalizableStrings
.Templates}:".Indent(level: 2));
919
Reporter.Output.WriteLine($"{
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_UninstallCommandHint}".Indent(level: 2));
959
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Info_Success, result.TemplatePackage.DisplayName);
969
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Warning_No_Templates_In_Package, result.TemplatePackage.DisplayName);
979
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_InvalidNuGetFeeds,
986
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_PackageNotFound,
992
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_DownloadFailed,
998
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_UnsupportedRequest,
1004
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled,
1006
Reporter.Error.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint, BaseInstallCommand.ForceOption.Aliases.First());
1013
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_UninstallFailed,
1019
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_InvalidPackage,
1026
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_GenericError,
1043
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_ConstraintsNotice);
1063
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_InvalidNuGetFeeds,
1071
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_PackageNotFound,
1078
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_PackageNotSupported,
1085
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_GenericError,
1110
throw new Exception(string.Format(
LocalizableStrings
.DetailsCommand_UnableToLoadResources, currentDirectory), ex);
1117
throw new Exception(
LocalizableStrings
.DetailsCommand_NoNuGetSources);
1137
Reporter.Output.WriteLine(string.Format(
LocalizableStrings
.DetailsCommand_UnableToLoadResource, source));
1146
throw new Exception(
LocalizableStrings
.DetailsCommand_NoNuGetSources);
TemplatePackageDisplay.cs (42)
25
{ 0,
LocalizableStrings
.TemplatePackageCoordinator_VulnerabilitySeverity_Low.Cyan() },
26
{ 1,
LocalizableStrings
.TemplatePackageCoordinator_VulnerabilitySeverity_Moderate.Blue() },
27
{ 2,
LocalizableStrings
.TemplatePackageCoordinator_VulnerabilitySeverity_High.Yellow() },
28
{ 3,
LocalizableStrings
.TemplatePackageCoordinator_VulnerabilitySeverity_Critical.Red() },
51
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAvailable, displayString);
53
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateSingleCommandHeader);
71
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_BuiltInCheck_Info_BuiltInPackageAvailable, $"{packageId}::{version}", provider);
72
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_BuiltInCheck_Info_UninstallPackage);
106
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Info_Success, result.TemplatePackage.DisplayName);
116
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Warning_No_Templates_In_Package, result.TemplatePackage.DisplayName);
121
_reporterOutput.WriteLine(string.Format(
LocalizableStrings
.TemplatePackageCoordinator_Download_VulnerablePackage));
132
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_InvalidNuGetFeeds,
139
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_PackageNotFound,
145
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_DownloadFailed,
151
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_UnsupportedRequest,
157
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled,
159
_reporterError.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint, BaseInstallCommand.ForceOption.Name);
166
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_UninstallFailed,
172
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_InvalidPackage,
182
LocalizableStrings
.TemplatePackageCoordinator_Download_Error_VulnerablePackage,
186
LocalizableStrings
.TemplatePackageCoordinator_Install_Error_VulnerablePackageTip,
194
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_VulnerablePackage,
198
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_VulnerablePackageTip,
214
LocalizableStrings
.TemplatePackageCoordinator_lnstall_Error_GenericError,
228
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_InstalledItems);
232
Reporter.Output.WriteLine(
LocalizableStrings
.NoItems);
241
Reporter.Output.WriteLine($"{
LocalizableStrings
.Version} {managedSource.Version}".Indent(level: 2));
247
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_DetailsHeader.Indent(level: 2));
257
Reporter.Output.WriteLine($"{
LocalizableStrings
.Templates}:".Indent(level: 2));
265
Reporter.Output.WriteLine($"{
LocalizableStrings
.TemplatePackageCoordinator_Uninstall_Info_UninstallCommandHint}".Indent(level: 2));
284
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAvailablePackages);
294
.DefineColumn(r => r.Identifier, out object? packageColumn,
LocalizableStrings
.ColumnNamePackage, showAlways: true)
295
.DefineColumn(r => r.CurrentVersion ?? string.Empty,
LocalizableStrings
.ColumnNameCurrentVersion, showAlways: true)
296
.DefineColumn(r => r.LatestVersion ?? string.Empty,
LocalizableStrings
.ColumnNameLatestVersion, showAlways: true)
301
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateSingleCommandHeader);
313
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Update_Info_UpdateAllCommandHeader);
341
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_InvalidNuGetFeeds,
349
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_PackageNotFound,
356
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_PackageNotSupported,
363
LocalizableStrings
.TemplatePackageCoordinator_UpdateCheck_Error_VulnerablePackage,
372
LocalizableStrings
.TemplatePackageCoordinator_Update_Error_GenericError,
403
_reporterOutput.WriteLine(
LocalizableStrings
.TemplatePackageCoordinator_Install_ConstraintsNotice);
TemplateSearch\CliTemplateSearchCoordinator.cs (22)
45
Reporter.Output.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Info_SearchInProgress);
59
Reporter.Error.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Error_NoSources.Bold().Red());
67
Reporter.Error.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Info_MatchesFromSource, result.Provider.Factory.DisplayName);
68
Reporter.Error.WriteLine(string.Format(
LocalizableStrings
.CliTemplateSearchCoordinator_Error_SearchFailure, result.ErrorMessage).Red().Bold());
72
Reporter.Output.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Info_MatchesFromSource, result.Provider.Factory.DisplayName);
84
LocalizableStrings
.Generic_Info_NoMatchingTemplates,
93
Reporter.Output.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Info_InstallHelp);
99
Reporter.Output.WriteLine(
LocalizableStrings
.Generic_ExampleHeader);
181
Reporter.Output.WriteLine(
LocalizableStrings
.TemplatesFoundMatchingInputParameters, GetInputParametersString(commandArgs));
192
.DefineColumn(r => r.TemplateGroupInfo.Name, out object? nameColumn,
LocalizableStrings
.ColumnNameTemplateName, showAlways: true, shrinkIfNeeded: true, minWidth: 15)
193
.DefineColumn(r => r.TemplateGroupInfo.ShortNames,
LocalizableStrings
.ColumnNameShortName, showAlways: true)
194
.DefineColumn(r => r.TemplateGroupInfo.Author,
LocalizableStrings
.ColumnNameAuthor, TabularOutputSettings.ColumnNames.Author, defaultColumn: false, shrinkIfNeeded: true, minWidth: 12)
195
.DefineColumn(r => r.TemplateGroupInfo.Languages,
LocalizableStrings
.ColumnNameLanguage, TabularOutputSettings.ColumnNames.Language, defaultColumn: true)
196
.DefineColumn(r => r.TemplateGroupInfo.Type,
LocalizableStrings
.ColumnNameType, TabularOutputSettings.ColumnNames.Type, defaultColumn: false)
197
.DefineColumn(r => r.TemplateGroupInfo.Classifications,
LocalizableStrings
.ColumnNameTags, TabularOutputSettings.ColumnNames.Tags, defaultColumn: false, shrinkIfNeeded: true, minWidth: 10)
198
.DefineColumn(r => GetPackageInfo(r.PackageName, r.PackageOwners), out object? packageColumn,
LocalizableStrings
.ColumnNamePackageNameAndOwners, showAlways: true)
199
.DefineColumn(r => GetReservedMark(r.Reserved),
LocalizableStrings
.ColumnNameTrusted, showAlways: true, textAlign: TextAlign.Center)
200
.DefineColumn(r => r.PrintableTotalDownloads, out object? downloadsColumn,
LocalizableStrings
.ColumnNameTotalDownloads, showAlways: true, textAlign: TextAlign.Center);
255
Reporter.Error.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Error_NoTemplateName.Red().Bold());
256
Reporter.Error.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Info_SearchHelp, string.Join(", ", BaseSearchCommand.SupportedFilters.Select(f => $"'{f.OptionFactory().Name}'")));
257
Reporter.Error.WriteLine(
LocalizableStrings
.Generic_ExamplesHeader);
282
Reporter.Error.WriteLine(
LocalizableStrings
.CliTemplateSearchCoordinator_Error_TemplateNameIsTooShort.Bold().Red());
Microsoft.TemplateEngine.Cli.UnitTests (24)
PostActionTests\AddJsonPropertyPostActionTests.cs (4)
63
mockReporter.Verify(r => r.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ParentPropertyPathInvalid, parentPropertyPath)), Times.Once);
535
errorReporter.Verify(r => r.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, "jsonFileName")), Times.Once);
549
errorReporter.Verify(r => r.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, "newJsonPropertyName")), Times.Once);
563
errorReporter.Verify(r => r.WriteLine(string.Format(
LocalizableStrings
.PostAction_ModifyJson_Error_ArgumentNotConfigured, "newJsonPropertyValue")), Times.Once);
TemplatePackageCoordinatorTests.cs (20)
42
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Authors}:")
44
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_RepoUrl}: ANuGetSource");
102
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Description}: This is the package description")
103
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Authors}:")
105
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Owners}:")
107
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_LicenseExpression}: https://licenses.nuget.org/MIT")
108
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_LicenseUrl}: https://github.com/dotnet/sdk")
109
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_RepoUrl}: http://github.com/")
110
.And.NotContain($" {
LocalizableStrings
.DetailsCommand_Property_PrefixReserved}: true");
149
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Description}: This is the package description")
150
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Authors}:")
152
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Owners}:")
154
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_LicenseExpression}: https://licenses.nuget.org/MIT")
155
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_LicenseUrl}: https://github.com/dotnet/sdk")
156
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_RepoUrl}: http://github.com/")
157
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_PrefixReserved}: True");
196
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Description}: This is the package description")
197
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Authors}:")
239
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Description}: This is the package description")
240
.And.Contain($" {
LocalizableStrings
.DetailsCommand_Property_Owners}:")