Skip to content

Commit

Permalink
Localize commands.x.cpp (#637)
Browse files Browse the repository at this point in the history
* NoCachedPackages

SupportedPorts

* UnsupportedPort

* PortSupportsField

PortDependencyConflict
UnsupportePort

* UnsupportedPortDependency

* FeedbackAppreciated

DefaultBrowserLaunched
NavigateToNPS
EmailVcpkgTeam

* Sorted messages

* Sorted Messages

* update json

Co-authored-by: Javier Matos <[email protected]>
  • Loading branch information
JavierMatosD and JavierMatosD authored Jul 20, 2022
1 parent afba751 commit dde37b1
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 22 deletions.
21 changes: 20 additions & 1 deletion include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -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),
"",
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
(),
"",
Expand All @@ -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),
"",
Expand All @@ -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,
Expand All @@ -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),
Expand Down Expand Up @@ -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),
"",
Expand Down Expand Up @@ -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),
"",
Expand Down
10 changes: 10 additions & 0 deletions locales/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@
"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}.",
"DownloadedSources": "Downloaded sources for {spec}",
"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:",
Expand Down Expand Up @@ -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}",
Expand Down Expand Up @@ -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: ",
Expand All @@ -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.",
Expand All @@ -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.",
Expand All @@ -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.",
Expand Down
18 changes: 18 additions & 0 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}...",
Expand All @@ -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:",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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}.",
Expand All @@ -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.",
Expand All @@ -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.",
Expand Down Expand Up @@ -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}.",
Expand All @@ -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}",
Expand Down
Loading

0 comments on commit dde37b1

Please sign in to comment.