diff --git a/src/AppInstallerCLICore/Workflows/ShowFlow.cpp b/src/AppInstallerCLICore/Workflows/ShowFlow.cpp index 9dbdbde4bb..920f2eaf91 100644 --- 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() << std::endl; + info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelVersion << ' ' << manifest.Version << std::endl; + info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelPublisher << ' ' << manifest.CurrentLocalization.Get() << std::endl; auto publisherUrl = manifest.CurrentLocalization.Get(); 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(); 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(); 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(); 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(); 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() << std::endl; + info << Execution::ManifestInfoEmphasis << Resource::String::ShowLabelLicense << ' ' << manifest.CurrentLocalization.Get() << std::endl; auto licenseUrl = manifest.CurrentLocalization.Get(); 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(); 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(); 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(); 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(); 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(); 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(); 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 index 636198d844..1e52c80b9e 100644 --- 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())