commit 86a6d898a1515fa11d1b8e22ca998aa74a58ad30
parent 4972fabba208c3715b31dd32a7f9d4e9a175cb55
Author: Chacón <lechacon@users.noreply.github.com>
Date: Wed, 8 Sep 2021 14:53:46 -0700
Add colons after agreement labels (#1440)
Diffstat:
2 files changed, 29 insertions(+), 28 deletions(-)
diff --git a/src/AppInstallerCLICore/Workflows/ShowFlow.cpp b/src/AppInstallerCLICore/Workflows/ShowFlow.cpp
@@ -8,6 +8,7 @@
using namespace AppInstaller::Repository;
using namespace AppInstaller::CLI;
+using namespace AppInstaller::Utility::literals;
namespace AppInstaller::CLI::Workflow
{
@@ -22,26 +23,26 @@ namespace AppInstaller::CLI::Workflow
auto info = context.Reporter.Info();
// TODO: Come up with a prettier format
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelVersion << " " << manifest.Version << std::endl;
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisher << " " << manifest.CurrentLocalization.Get<Manifest::Localization::Publisher>() << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelVersion << ' ' << manifest.Version << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisher << ' ' << manifest.CurrentLocalization.Get<Manifest::Localization::Publisher>() << std::endl;
auto publisherUrl = manifest.CurrentLocalization.Get<Manifest::Localization::PublisherUrl>();
if (!publisherUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisherUrl << " " << publisherUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisherUrl << ' ' << publisherUrl << std::endl;
}
auto publisherSupportUrl = manifest.CurrentLocalization.Get<Manifest::Localization::PublisherSupportUrl>();
if (!publisherSupportUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisherSupportUrl << " " << publisherSupportUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisherSupportUrl << ' ' << publisherSupportUrl << std::endl;
}
auto author = manifest.CurrentLocalization.Get<Manifest::Localization::Author>();
if (!author.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelAuthor << " " << author << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelAuthor << ' ' << author << std::endl;
}
if (!manifest.Moniker.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelMoniker << " " << manifest.Moniker << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelMoniker << ' ' << manifest.Moniker << std::endl;
}
auto description = manifest.CurrentLocalization.Get<Manifest::Localization::Description>();
if (description.empty())
@@ -51,43 +52,43 @@ namespace AppInstaller::CLI::Workflow
}
if (!description.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelDescription << " " << description << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelDescription << ' ' << description << std::endl;
}
auto homepage = manifest.CurrentLocalization.Get<Manifest::Localization::PackageUrl>();
if (!homepage.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPackageUrl << " " << homepage << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPackageUrl << ' ' << homepage << std::endl;
}
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelLicense << " " << manifest.CurrentLocalization.Get<Manifest::Localization::License>() << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelLicense << ' ' << manifest.CurrentLocalization.Get<Manifest::Localization::License>() << std::endl;
auto licenseUrl = manifest.CurrentLocalization.Get<Manifest::Localization::LicenseUrl>();
if (!licenseUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelLicenseUrl << " " << licenseUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelLicenseUrl << ' ' << licenseUrl << std::endl;
}
auto privacyUrl = manifest.CurrentLocalization.Get<Manifest::Localization::PrivacyUrl>();
if (!privacyUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPrivacyUrl << " " << privacyUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPrivacyUrl << ' ' << privacyUrl << std::endl;
}
auto copyright = manifest.CurrentLocalization.Get<Manifest::Localization::Copyright>();
if (!copyright.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelCopyright << " " << copyright << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelCopyright << ' ' << copyright << std::endl;
}
auto copyrightUrl = manifest.CurrentLocalization.Get<Manifest::Localization::CopyrightUrl>();
if (!copyrightUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelCopyrightUrl << " " << copyrightUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelCopyrightUrl << ' ' << copyrightUrl << std::endl;
}
auto releaseNotes = manifest.CurrentLocalization.Get<Manifest::Localization::ReleaseNotes>();
if (!releaseNotes.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelReleaseNotes << " " << releaseNotes << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelReleaseNotes << ' ' << releaseNotes << std::endl;
}
auto releaseNotesUrl = manifest.CurrentLocalization.Get<Manifest::Localization::ReleaseNotesUrl>();
if (!releaseNotesUrl.empty())
{
- info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelReleaseNotesUrl << " " << releaseNotesUrl << std::endl;
+ info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelReleaseNotesUrl << ' ' << releaseNotesUrl << std::endl;
}
auto agreements = manifest.CurrentLocalization.Get<Manifest::Localization::Agreements>();
if (!agreements.empty())
@@ -97,7 +98,7 @@ namespace AppInstaller::CLI::Workflow
{
if (!agreement.Label.empty())
{
- info << Execution::ManifestInfoEmphasis << agreement.Label << " ";
+ info << Execution::ManifestInfoEmphasis << agreement.Label << ": "_liv;
}
if (!agreement.AgreementText.empty())
@@ -123,26 +124,26 @@ namespace AppInstaller::CLI::Workflow
info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstaller << std::endl;
if (installer)
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerType << " " << Manifest::InstallerTypeToString(installer->InstallerType) << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerType << ' ' << Manifest::InstallerTypeToString(installer->InstallerType) << std::endl;
if (!installer->Locale.empty())
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerLocale << " " << installer->Locale << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerLocale << ' ' << installer->Locale << std::endl;
}
if (!installer->Url.empty())
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerUrl << " " << installer->Url << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerUrl << ' ' << installer->Url << std::endl;
}
if (!installer->Sha256.empty())
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerSha256 << " " << Utility::SHA256::ConvertToString(installer->Sha256) << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerSha256 << ' ' << Utility::SHA256::ConvertToString(installer->Sha256) << std::endl;
}
if (!installer->ProductId.empty())
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerProductId << " " << installer->ProductId << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerProductId << ' ' << installer->ProductId << std::endl;
}
if (!installer->ReleaseDate.empty())
{
- info << " " << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerReleaseDate << " " << installer->ReleaseDate << std::endl;
+ info << " "_liv << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelInstallerReleaseDate << ' ' << installer->ReleaseDate << std::endl;
}
if (Settings::ExperimentalFeature::IsEnabled(Settings::ExperimentalFeature::Feature::Dependencies))
@@ -156,13 +157,13 @@ namespace AppInstaller::CLI::Workflow
if (dependencies.HasAnyOf(Manifest::DependencyType::WindowsFeature))
{
info << " - WindowsFeatures: " << std::endl;
- dependencies.ApplyToType(Manifest::DependencyType::WindowsFeature, [&info](Manifest::Dependency dependency) {info << " " << dependency.Id << std::endl; });
+ dependencies.ApplyToType(Manifest::DependencyType::WindowsFeature, [&info](Manifest::Dependency dependency) {info << " "_liv << dependency.Id << std::endl; });
}
if (dependencies.HasAnyOf(Manifest::DependencyType::WindowsLibrary))
{
info << " - WindowsLibraries: " << std::endl;
- dependencies.ApplyToType(Manifest::DependencyType::WindowsLibrary, [&info](Manifest::Dependency dependency) {info << " " << dependency.Id << std::endl; });
+ dependencies.ApplyToType(Manifest::DependencyType::WindowsLibrary, [&info](Manifest::Dependency dependency) {info << " "_liv << dependency.Id << std::endl; });
}
if (dependencies.HasAnyOf(Manifest::DependencyType::Package))
@@ -170,7 +171,7 @@ namespace AppInstaller::CLI::Workflow
info << " - PackageDependencies: " << std::endl;
dependencies.ApplyToType(Manifest::DependencyType::Package, [&info](Manifest::Dependency dependency)
{
- info << " " << dependency.Id;
+ info << " "_liv << dependency.Id;
if (dependency.MinVersion) info << " [>= " << dependency.MinVersion.value() << "]";
info << std::endl;
});
@@ -179,14 +180,14 @@ namespace AppInstaller::CLI::Workflow
if (dependencies.HasAnyOf(Manifest::DependencyType::External))
{
info << " - ExternalDependencies: " << std::endl;
- dependencies.ApplyToType(Manifest::DependencyType::External, [&info](Manifest::Dependency dependency) {info << " " << dependency.Id << std::endl; });
+ dependencies.ApplyToType(Manifest::DependencyType::External, [&info](Manifest::Dependency dependency) {info << " "_liv << dependency.Id << std::endl; });
}
}
}
}
else
{
- context.Reporter.Warn() << " " << Resource::String::NoApplicableInstallers << std::endl;
+ context.Reporter.Warn() << " "_liv << Resource::String::NoApplicableInstallers << std::endl;
}
}
diff --git a/src/AppInstallerCLICore/Workflows/WorkflowBase.cpp b/src/AppInstallerCLICore/Workflows/WorkflowBase.cpp
@@ -158,7 +158,7 @@ namespace AppInstaller::CLI::Workflow
{
if (!agreement.Label.empty())
{
- context.Reporter.Info() << Execution::SourceInfoEmphasis << Utility::LocIndString{ agreement.Label } << " ";
+ context.Reporter.Info() << Execution::SourceInfoEmphasis << Utility::LocIndString{ agreement.Label } << ": "_liv;
}
if (!agreement.Text.empty())