diff --git a/include/vcpkg/base/messages.h b/include/vcpkg/base/messages.h index 8b9388773e..716951943b 100644 --- a/include/vcpkg/base/messages.h +++ b/include/vcpkg/base/messages.h @@ -675,6 +675,7 @@ namespace vcpkg "=== curl output ===\n" "{actual}\n" "=== end curl output ==="); + DECLARE_MESSAGE(DefaultBrowserLaunched, (msg::url), "", "Default browser launched to {url}."); DECLARE_MESSAGE(DefaultPathToBinaries, (msg::path), "", @@ -691,6 +692,7 @@ namespace vcpkg (), "This message is normally displayed only in development.", "Downloading latest vcpkg-ce bundle..."); + DECLARE_MESSAGE(EmailVcpkgTeam, (msg::url), "", "Send an email to {url} with any feedback."); DECLARE_MESSAGE(EmptyLicenseExpression, (), "", "SPDX license expression was empty."); DECLARE_MESSAGE(EnvStrFailedToExtract, (), "", "could not expand the environment string:"); DECLARE_MESSAGE(ErrorDetectingCompilerInfo, @@ -783,6 +785,7 @@ namespace vcpkg "", "One or more {vendor} credential providers failed to authenticate. See '{url}' for more details " "on how to provide credentials."); + DECLARE_MESSAGE(FeedbackAppreciated, (), "", "Thank you for your feedback!"); DECLARE_MESSAGE(FishCompletion, (msg::path), "", "vcpkg fish completion is already added at \"{path}\"."); DECLARE_MESSAGE( ForceSystemBinariesOnWeirdPlatforms, @@ -1014,8 +1017,8 @@ namespace vcpkg "{value} is a localized message name like LocalizedMessageMustNotEndWithNewline", "The message named {value} ends with a newline which should be added by formatting " "rather than by localization."); - DECLARE_MESSAGE(MissingExtension, (msg::extension), "", "Missing '{extension}' extension."); DECLARE_MESSAGE(Missing7zHeader, (), "", "Unable to find 7z header."); + DECLARE_MESSAGE(MissingExtension, (msg::extension), "", "Missing '{extension}' extension."); DECLARE_MESSAGE(MonoInstructions, (), "", @@ -1026,6 +1029,7 @@ namespace vcpkg (msg::path, msg::exit_code), "", "msiexec failed while extracting \"{path}\" with launch or exit code {exit_code} and message:"); + DECLARE_MESSAGE(NavigateToNPS, (msg::url), "", "Please navigate to {url} in your preferred browser."); DECLARE_MESSAGE(NewConfigurationAlreadyExists, (msg::path), "", @@ -1042,6 +1046,7 @@ namespace vcpkg "Either specify --name and --version to produce a manifest intended for C++ libraries, or specify " "--application to indicate that the manifest is not intended to be used as a port."); DECLARE_MESSAGE(NewVersionCannotBeEmpty, (), "", "--version cannot be empty."); + DECLARE_MESSAGE(NoCachedPackages, (), "", "No packages are cached."); DECLARE_MESSAGE(NoLocalizationForMessages, (), "", "No localized messages for the following: "); DECLARE_MESSAGE(NoRegistryForPort, (msg::package_name), "", "no registry configured for port {package_name}"); DECLARE_MESSAGE(NugetPackageFileSucceededButCreationFailed, @@ -1068,10 +1073,18 @@ namespace vcpkg "Error messages are is printed after this.", "while loading {path}:"); DECLARE_MESSAGE(ParseControlErrorInfoWrongTypeFields, (), "", "The following fields had the wrong types:"); + DECLARE_MESSAGE(PortDependencyConflict, + (msg::package_name), + "", + "Port {package_name} has the following unsupported dependencies:"); DECLARE_MESSAGE(PortNotInBaseline, (msg::package_name), "", "the baseline does not contain an entry for port {package_name}"); + DECLARE_MESSAGE(PortSupportsField, + (msg::value), + "'{value}' is the value of the 'supports' field in the port's vcpkg.json.", + "(supports: \"{value}\")"); DECLARE_MESSAGE(PreviousIntegrationFileRemains, (), "", "Previous integration file was not removed."); DECLARE_MESSAGE(ProcessorArchitectureMalformed, (msg::arch), @@ -1121,6 +1134,7 @@ namespace vcpkg (), "", "Please make sure you have started a new bash shell for the change to take effect."); + DECLARE_MESSAGE(SupportedPort, (msg::package_name), "", "Port {package_name} is supported."); DECLARE_MESSAGE(SystemApiErrorMessage, (msg::system_api, msg::exit_code, msg::error_msg), "", @@ -1158,6 +1172,11 @@ namespace vcpkg (msg::value, msg::list), "{value} is the value provided by the user and {list} a list of unknown variables seperated by comma", "invalid argument: url template '{value}' contains unknown variables: {list}"); + DECLARE_MESSAGE(UnsupportedPort, (msg::package_name), "", "Port {package_name} is not supported."); + DECLARE_MESSAGE(UnsupportedPortDependency, + (msg::value), + "'{value}' is the name of a port dependency.", + "- dependency {value} is not supported."); DECLARE_MESSAGE(UnsupportedSystemName, (msg::system_name), "", diff --git a/locales/messages.en.json b/locales/messages.en.json index 79df3b0828..1f21c940a5 100644 --- a/locales/messages.en.json +++ b/locales/messages.en.json @@ -80,6 +80,7 @@ "CouldNotDeduceNugetIdAndVersion": "Could not deduce nuget id and version from filename: {path}", "CreatedNuGetPackage": "Created nupkg: \"{path}\"", "CurlReportedUnexpectedResults": "curl has reported unexpected results to vcpkg and vcpkg cannot continue.\nPlease review the following text for sensitive information and open an issue on the Microsoft/vcpkg GitHub to help fix this problem!\ncmd: {command_line}\n=== curl output ===\n{actual}\n=== end curl output ===", + "DefaultBrowserLaunched": "Default browser launched to {url}.", "DefaultPathToBinaries": "Based on your system settings, the default path to store binaries is \"{path}\". This consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.", "DetectCompilerHash": "Detecting compiler hash for triplet {triplet}...", "DownloadAvailable": "A downloadable copy of this tool is available and can be used by unsetting {env_var}.", @@ -87,6 +88,7 @@ "DownloadingVcpkgCeBundle": "Downloading vcpkg-ce bundle {version}...", "DownloadingVcpkgCeBundleLatest": "Downloading latest vcpkg-ce bundle...", "ElapsedForPackage": "Elapsed time to handle {spec}: {elapsed}", + "EmailVcpkgTeam": "Send an email to {url} with any feedback.", "EmptyLicenseExpression": "SPDX license expression was empty.", "EnvStrFailedToExtract": "could not expand the environment string:", "ErrorDetectingCompilerInfo": "while detecting compiler information:\nThe log file content at \"{path}\" is:", @@ -119,6 +121,7 @@ "FailedToStoreBackToMirror": "failed to store back to mirror:", "FailedToStoreBinaryCache": "Failed to store binary cache {path}", "FailedVendorAuthentication": "One or more {vendor} credential providers failed to authenticate. See '{url}' for more details on how to provide credentials.", + "FeedbackAppreciated": "Thank you for your feedback!", "FishCompletion": "vcpkg fish completion is already added at \"{path}\".", "ForceSystemBinariesOnWeirdPlatforms": "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, and ppc64le platforms.", "FormattedParseMessageExpression": "on expression: {value}", @@ -191,12 +194,14 @@ "MissingExtension": "Missing '{extension}' extension.", "MonoInstructions": "This may be caused by an incomplete mono installation. Full mono is available on some systems via `sudo apt install mono-complete`. Ubuntu 18.04 users may need a newer version of mono, available at https://www.mono-project.com/download/stable/", "MsiexecFailedToExtract": "msiexec failed while extracting \"{path}\" with launch or exit code {exit_code} and message:", + "NavigateToNPS": "Please navigate to {url} in your preferred browser.", "NewConfigurationAlreadyExists": "Creating a manifest would overwrite a vcpkg-configuration.json at {path}.", "NewManifestAlreadyExists": "A manifest is already present at {path}.", "NewNameCannotBeEmpty": "--name cannot be empty.", "NewOnlyOneVersionKind": "Only one of --version-relaxed, --version-date, or --version-string may be specified.", "NewSpecifyNameVersionOrApplication": "Either specify --name and --version to produce a manifest intended for C++ libraries, or specify --application to indicate that the manifest is not intended to be used as a port.", "NewVersionCannotBeEmpty": "--version cannot be empty.", + "NoCachedPackages": "No packages are cached.", "NoLocalizationForMessages": "No localized messages for the following: ", "NoRegistryForPort": "no registry configured for port {package_name}", "NoteMessage": "note: ", @@ -208,7 +213,9 @@ "ParseControlErrorInfoTypesEntry": "{value} was expected to be {expected}", "ParseControlErrorInfoWhileLoading": "while loading {path}:", "ParseControlErrorInfoWrongTypeFields": "The following fields had the wrong types:", + "PortDependencyConflict": "Port {package_name} has the following unsupported dependencies:", "PortNotInBaseline": "the baseline does not contain an entry for port {package_name}", + "PortSupportsField": "(supports: \"{value}\")", "PreviousIntegrationFileRemains": "Previous integration file was not removed.", "ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.", "ProcessorArchitectureMissing": "The required environment variable %PROCESSOR_ARCHITECTURE% is missing.", @@ -225,6 +232,7 @@ "SourceFieldPortNameMismatch": "The 'Source' field inside the CONTROL file, or \"name\" field inside the vcpkg.json file has the name {package_name} and does not match the port directory \"{path}\".", "StoredBinaryCache": "Stored binary cache: \"{path}\"", "SuggestStartingBashShell": "Please make sure you have started a new bash shell for the change to take effect.", + "SupportedPort": "Port {package_name} is supported.", "SystemApiErrorMessage": "calling {system_api} failed with {exit_code} ({error_msg})", "ToolFetchFailed": "Could not fetch {tool_name}.", "ToolInWin10": "This utility is bundled with Windows 10 or later.", @@ -237,6 +245,8 @@ "UnknownParameterForIntegrate": "Unknown parameter '{value}' for integrate.", "UnknownTool": "vcpkg does not have a definition of this tool for this platform.", "UnknownVariablesInTemplate": "invalid argument: url template '{value}' contains unknown variables: {list}", + "UnsupportedPort": "Port {package_name} is not supported.", + "UnsupportedPortDependency": "- dependency {value} is not supported.", "UnsupportedSystemName": "Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.", "UnsupportedToolchain": "in triplet {triplet}: Unable to find a valid toolchain for requested target architecture {arch}.\nThe selected Visual Studio instance is at: {path}\nThe available toolchain combinations are: {list}", "UpdateBaselineAddBaselineNoManifest": "the --{option} switch was passed, but there is no manifest file to add a `builtin-baseline` field to.", diff --git a/locales/messages.json b/locales/messages.json index a1b2a5c287..910cd24647 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -146,6 +146,8 @@ "_CreatedNuGetPackage.comment": "An example of {path} is /foo/bar.", "CurlReportedUnexpectedResults": "curl has reported unexpected results to vcpkg and vcpkg cannot continue.\nPlease review the following text for sensitive information and open an issue on the Microsoft/vcpkg GitHub to help fix this problem!\ncmd: {command_line}\n=== curl output ===\n{actual}\n=== end curl output ===", "_CurlReportedUnexpectedResults.comment": "{command_line} is the command line to call curl.exe, {actual} is the console output of curl.exe locale-invariant download results. An example of {command_line} is vcpkg install zlib.", + "DefaultBrowserLaunched": "Default browser launched to {url}.", + "_DefaultBrowserLaunched.comment": "An example of {url} is https://github.com/microsoft/vcpkg.", "DefaultPathToBinaries": "Based on your system settings, the default path to store binaries is \"{path}\". This consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.", "_DefaultPathToBinaries.comment": "An example of {path} is /foo/bar.", "DetectCompilerHash": "Detecting compiler hash for triplet {triplet}...", @@ -160,6 +162,8 @@ "_DownloadingVcpkgCeBundleLatest.comment": "This message is normally displayed only in development.", "ElapsedForPackage": "Elapsed time to handle {spec}: {elapsed}", "_ElapsedForPackage.comment": "An example of {spec} is zlib:x64-windows. An example of {elapsed} is 3.532 min.", + "EmailVcpkgTeam": "Send an email to {url} with any feedback.", + "_EmailVcpkgTeam.comment": "An example of {url} is https://github.com/microsoft/vcpkg.", "EmptyLicenseExpression": "SPDX license expression was empty.", "EnvStrFailedToExtract": "could not expand the environment string:", "ErrorDetectingCompilerInfo": "while detecting compiler information:\nThe log file content at \"{path}\" is:", @@ -210,6 +214,7 @@ "_FailedToStoreBinaryCache.comment": "An example of {path} is /foo/bar.", "FailedVendorAuthentication": "One or more {vendor} credential providers failed to authenticate. See '{url}' for more details on how to provide credentials.", "_FailedVendorAuthentication.comment": "An example of {vendor} is Azure. An example of {url} is https://github.com/microsoft/vcpkg.", + "FeedbackAppreciated": "Thank you for your feedback!", "FishCompletion": "vcpkg fish completion is already added at \"{path}\".", "_FishCompletion.comment": "An example of {path} is /foo/bar.", "ForceSystemBinariesOnWeirdPlatforms": "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, and ppc64le platforms.", @@ -332,6 +337,8 @@ "MonoInstructions": "This may be caused by an incomplete mono installation. Full mono is available on some systems via `sudo apt install mono-complete`. Ubuntu 18.04 users may need a newer version of mono, available at https://www.mono-project.com/download/stable/", "MsiexecFailedToExtract": "msiexec failed while extracting \"{path}\" with launch or exit code {exit_code} and message:", "_MsiexecFailedToExtract.comment": "An example of {path} is /foo/bar. An example of {exit_code} is 127.", + "NavigateToNPS": "Please navigate to {url} in your preferred browser.", + "_NavigateToNPS.comment": "An example of {url} is https://github.com/microsoft/vcpkg.", "NewConfigurationAlreadyExists": "Creating a manifest would overwrite a vcpkg-configuration.json at {path}.", "_NewConfigurationAlreadyExists.comment": "An example of {path} is /foo/bar.", "NewManifestAlreadyExists": "A manifest is already present at {path}.", @@ -340,6 +347,7 @@ "NewOnlyOneVersionKind": "Only one of --version-relaxed, --version-date, or --version-string may be specified.", "NewSpecifyNameVersionOrApplication": "Either specify --name and --version to produce a manifest intended for C++ libraries, or specify --application to indicate that the manifest is not intended to be used as a port.", "NewVersionCannotBeEmpty": "--version cannot be empty.", + "NoCachedPackages": "No packages are cached.", "NoLocalizationForMessages": "No localized messages for the following: ", "NoRegistryForPort": "no registry configured for port {package_name}", "_NoRegistryForPort.comment": "An example of {package_name} is zlib.", @@ -357,8 +365,12 @@ "ParseControlErrorInfoWhileLoading": "while loading {path}:", "_ParseControlErrorInfoWhileLoading.comment": "Error messages are is printed after this. An example of {path} is /foo/bar.", "ParseControlErrorInfoWrongTypeFields": "The following fields had the wrong types:", + "PortDependencyConflict": "Port {package_name} has the following unsupported dependencies:", + "_PortDependencyConflict.comment": "An example of {package_name} is zlib.", "PortNotInBaseline": "the baseline does not contain an entry for port {package_name}", "_PortNotInBaseline.comment": "An example of {package_name} is zlib.", + "PortSupportsField": "(supports: \"{value}\")", + "_PortSupportsField.comment": "'{value}' is the value of the 'supports' field in the port's vcpkg.json.", "PreviousIntegrationFileRemains": "Previous integration file was not removed.", "ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.", "_ProcessorArchitectureMalformed.comment": "An example of {arch} is x64.", @@ -388,6 +400,8 @@ "StoredBinaryCache": "Stored binary cache: \"{path}\"", "_StoredBinaryCache.comment": "An example of {path} is /foo/bar.", "SuggestStartingBashShell": "Please make sure you have started a new bash shell for the change to take effect.", + "SupportedPort": "Port {package_name} is supported.", + "_SupportedPort.comment": "An example of {package_name} is zlib.", "SystemApiErrorMessage": "calling {system_api} failed with {exit_code} ({error_msg})", "_SystemApiErrorMessage.comment": "An example of {system_api} is CreateProcessW. An example of {exit_code} is 127. An example of {error_msg} is File Not Found.", "ToolFetchFailed": "Could not fetch {tool_name}.", @@ -407,6 +421,10 @@ "UnknownTool": "vcpkg does not have a definition of this tool for this platform.", "UnknownVariablesInTemplate": "invalid argument: url template '{value}' contains unknown variables: {list}", "_UnknownVariablesInTemplate.comment": "{value} is the value provided by the user and {list} a list of unknown variables seperated by comma", + "UnsupportedPort": "Port {package_name} is not supported.", + "_UnsupportedPort.comment": "An example of {package_name} is zlib.", + "UnsupportedPortDependency": "- dependency {value} is not supported.", + "_UnsupportedPortDependency.comment": "'{value}' is the name of a port dependency.", "UnsupportedSystemName": "Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.", "_UnsupportedSystemName.comment": "An example of {system_name} is Darwin.", "UnsupportedToolchain": "in triplet {triplet}: Unable to find a valid toolchain for requested target architecture {arch}.\nThe selected Visual Studio instance is at: {path}\nThe available toolchain combinations are: {list}", diff --git a/src/vcpkg/base/messages.cpp b/src/vcpkg/base/messages.cpp index bd5c8da46b..e99b4a1570 100644 --- a/src/vcpkg/base/messages.cpp +++ b/src/vcpkg/base/messages.cpp @@ -485,12 +485,14 @@ namespace vcpkg REGISTER_MESSAGE(CouldNotDeduceNugetIdAndVersion); REGISTER_MESSAGE(CreatedNuGetPackage); REGISTER_MESSAGE(CurlReportedUnexpectedResults); + REGISTER_MESSAGE(DefaultBrowserLaunched); REGISTER_MESSAGE(DefaultPathToBinaries); REGISTER_MESSAGE(DetectCompilerHash); REGISTER_MESSAGE(DownloadAvailable); REGISTER_MESSAGE(DownloadedSources); REGISTER_MESSAGE(DownloadingVcpkgCeBundle); REGISTER_MESSAGE(DownloadingVcpkgCeBundleLatest); + REGISTER_MESSAGE(EmailVcpkgTeam); REGISTER_MESSAGE(EmptyLicenseExpression); REGISTER_MESSAGE(EnvStrFailedToExtract); REGISTER_MESSAGE(ErrorDetectingCompilerInfo); @@ -522,6 +524,7 @@ namespace vcpkg REGISTER_MESSAGE(FailedToStoreBackToMirror); REGISTER_MESSAGE(FailedToStoreBinaryCache); REGISTER_MESSAGE(FailedVendorAuthentication); + REGISTER_MESSAGE(FeedbackAppreciated); REGISTER_MESSAGE(FishCompletion); REGISTER_MESSAGE(ForceSystemBinariesOnWeirdPlatforms); REGISTER_MESSAGE(FormattedParseMessageExpression); @@ -587,16 +590,18 @@ namespace vcpkg REGISTER_MESSAGE(LoadingOverlayTriplet); REGISTER_MESSAGE(LocalizedMessageMustNotContainIndents); REGISTER_MESSAGE(LocalizedMessageMustNotEndWithNewline); - REGISTER_MESSAGE(MissingExtension); REGISTER_MESSAGE(Missing7zHeader); + REGISTER_MESSAGE(MissingExtension); REGISTER_MESSAGE(MonoInstructions); REGISTER_MESSAGE(MsiexecFailedToExtract); + REGISTER_MESSAGE(NavigateToNPS); REGISTER_MESSAGE(NewConfigurationAlreadyExists); REGISTER_MESSAGE(NewManifestAlreadyExists); REGISTER_MESSAGE(NewNameCannotBeEmpty); REGISTER_MESSAGE(NewOnlyOneVersionKind); REGISTER_MESSAGE(NewSpecifyNameVersionOrApplication); REGISTER_MESSAGE(NewVersionCannotBeEmpty); + REGISTER_MESSAGE(NoCachedPackages); REGISTER_MESSAGE(NoLocalizationForMessages); REGISTER_MESSAGE(NoRegistryForPort); REGISTER_MESSAGE(NugetPackageFileSucceededButCreationFailed); @@ -607,7 +612,9 @@ namespace vcpkg REGISTER_MESSAGE(ParseControlErrorInfoTypesEntry); REGISTER_MESSAGE(ParseControlErrorInfoWhileLoading); REGISTER_MESSAGE(ParseControlErrorInfoWrongTypeFields); + REGISTER_MESSAGE(PortDependencyConflict); REGISTER_MESSAGE(PortNotInBaseline); + REGISTER_MESSAGE(PortSupportsField); REGISTER_MESSAGE(PreviousIntegrationFileRemains); REGISTER_MESSAGE(ProcessorArchitectureMalformed); REGISTER_MESSAGE(ProcessorArchitectureMissing); @@ -622,6 +629,7 @@ namespace vcpkg REGISTER_MESSAGE(SourceFieldPortNameMismatch); REGISTER_MESSAGE(StoredBinaryCache); REGISTER_MESSAGE(SuggestStartingBashShell); + REGISTER_MESSAGE(SupportedPort); REGISTER_MESSAGE(SystemApiErrorMessage); REGISTER_MESSAGE(ToolFetchFailed); REGISTER_MESSAGE(ToolInWin10); @@ -634,6 +642,8 @@ namespace vcpkg REGISTER_MESSAGE(UnknownParameterForIntegrate); REGISTER_MESSAGE(UnknownTool); REGISTER_MESSAGE(UnknownVariablesInTemplate); + REGISTER_MESSAGE(UnsupportedPort); + REGISTER_MESSAGE(UnsupportedPortDependency); REGISTER_MESSAGE(UnsupportedSystemName); REGISTER_MESSAGE(UnsupportedToolchain); REGISTER_MESSAGE(UpdateBaselineAddBaselineNoManifest); diff --git a/src/vcpkg/commands.autocomplete.cpp b/src/vcpkg/commands.autocomplete.cpp index f4b0551abe..b5df57960e 100644 --- a/src/vcpkg/commands.autocomplete.cpp +++ b/src/vcpkg/commands.autocomplete.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Autocomplete std::vector&& results) { const SortedVector sorted_results(results); - print2(Strings::join("\n", sorted_results), '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, Strings::join("\n", sorted_results)); Checks::exit_success(line_info); } diff --git a/src/vcpkg/commands.cache.cpp b/src/vcpkg/commands.cache.cpp index 765af4bb82..0f8836e480 100644 --- a/src/vcpkg/commands.cache.cpp +++ b/src/vcpkg/commands.cache.cpp @@ -43,7 +43,7 @@ namespace vcpkg::Commands::Cache const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) { - print2("No packages are cached.\n"); + msg::println(msgNoCachedPackages); Checks::exit_success(VCPKG_LINE_INFO); } @@ -51,7 +51,7 @@ namespace vcpkg::Commands::Cache { for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { - print2(binary_paragraph.displayname(), '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, binary_paragraph.displayname() + '\n'); } } else @@ -64,8 +64,7 @@ namespace vcpkg::Commands::Cache { continue; } - - print2(displayname, '\n'); + msg::write_unlocalized_text_to_stdout(Color::none, displayname + '\n'); } } diff --git a/src/vcpkg/commands.check-support.cpp b/src/vcpkg/commands.check-support.cpp index 5d2820e9d3..bfddaf5eac 100644 --- a/src/vcpkg/commands.check-support.cpp +++ b/src/vcpkg/commands.check-support.cpp @@ -66,34 +66,37 @@ namespace vcpkg::Commands if (is_top_level_supported) { // supported! - vcpkg::printf("port %s is supported\n", full_port_name(p)); + msg::println(msgSupportedPort, msg::package_name = full_port_name(p)); } else { - vcpkg::printf("port %s is not supported (supports: \"%s\")\n", full_port_name(p), p.supports_expr); + msg::println(msg::format(msgUnsupportedPort, msg::package_name = full_port_name(p)) + .append_raw("\n") + .append(msgPortSupportsField, msg::value = p.supports_expr)); } return; } - + auto message = msg::format(msgUnsupportedPort, msg::package_name = full_port_name(p)).append_raw("\n"); if (is_top_level_supported) { - vcpkg::printf("port %s is not supported due to the following dependencies:\n", full_port_name(p)); + message.append(msgPortDependencyConflict, msg::package_name = full_port_name(p)); } else { - vcpkg::printf( - "port %s is not supported (supports: \"%s\"), and has the following unsupported dependencies:\n", - full_port_name(p), - p.supports_expr); + message.append(msgPortSupportsField, msg::value = p.supports_expr) + .append_raw("\n") + .append(msgPortDependencyConflict, msg::package_name = full_port_name(p)); } for (const Port& reason : reasons) { - vcpkg::printf(" - dependency %s is not supported (supports: \"%s\")\n", - full_port_name(reason), - reason.supports_expr); + message.append_raw("\n") + .append_indent() + .append(msgUnsupportedPortDependency, msg::value = full_port_name(p)) + .append(msgPortSupportsField, msg::value = reason.supports_expr); } + msg::println(message); } } diff --git a/src/vcpkg/commands.contact.cpp b/src/vcpkg/commands.contact.cpp index ee857f15c3..5988c69f54 100644 --- a/src/vcpkg/commands.contact.cpp +++ b/src/vcpkg/commands.contact.cpp @@ -40,15 +40,16 @@ namespace vcpkg::Commands::Contact #if defined(_WIN32) cmd_execute(Command("start").string_arg("https://aka.ms/NPS_vcpkg")); - print2("Default browser launched to https://aka.ms/NPS_vcpkg; thank you for your feedback!\n"); + msg::println(msgDefaultBrowserLaunched, msg::url = "https://aka.ms/NPS_vcpkg"); + msg::println(msgFeedbackAppreciated); #else - print2("Please navigate to https://aka.ms/NPS_vcpkg in your preferred browser. Thank you for your " - "feedback!\n"); + msg::println(msgNavigateToNPS, msg::url = "https://aka.ms/NPS_vcpkg"); + msg::println(msgFeedbackAppreciated); #endif } else { - print2("Send an email to vcpkg@microsoft.com with any feedback.\n"); + msg::println(msgEmailVcpkgTeam, msg::url = "vcpkg@microsoft.com"); } Checks::exit_success(VCPKG_LINE_INFO); }