Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize commands3 #642

Merged
merged 20 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ namespace vcpkg
(msg::command_line),
"",
"'{command_line}' can only add one artifact at a time.");
DECLARE_MESSAGE(AddCommandFirstArg, (), "", "The first parameter to add must be 'artifact' or 'port'.");
DECLARE_MESSAGE(AddFirstArgument,
(msg::command_line),
"",
Expand Down Expand Up @@ -500,6 +501,7 @@ namespace vcpkg
"",
"Another installation is in progress on the machine, sleeping 6s before retrying.");
DECLARE_MESSAGE(AppliedUserIntegration, (), "", "Applied user-wide integration for this vcpkg root.");
DECLARE_MESSAGE(ArtifactsOptionIncompatibility, (msg::option), "", "--{option} has no effect on find artifact.");
DECLARE_MESSAGE(AssetSourcesArg, (), "", "Add sources for asset caching. See 'vcpkg help assetcaching'.");
DECLARE_MESSAGE(AttemptingToFetchPackagesFromVendor,
(msg::count, msg::vendor),
Expand Down Expand Up @@ -666,6 +668,10 @@ namespace vcpkg
(msg::value),
"'{value}' is a command option.",
"conflicting values specified for '--{value}'.");
DECLARE_MESSAGE(ControlAndManifestFilesPresent,
(msg::path),
"",
"Both a manifest file and a CONTROL file exist in port directory: {path}");
DECLARE_MESSAGE(CopyrightIsDir, (msg::path), "", "`{path}` being a directory is deprecated.");
DECLARE_MESSAGE(CouldNotDeduceNugetIdAndVersion,
(msg::path),
Expand Down Expand Up @@ -762,6 +768,7 @@ namespace vcpkg
(),
"",
"`vcpkg install` requires a list of packages to install in classic mode.");
DECLARE_MESSAGE(ErrorsFound, (), "", "Found the following errors:");
DECLARE_MESSAGE(
ErrorUnableToDetectCompilerInfo,
(),
Expand Down Expand Up @@ -796,6 +803,11 @@ namespace vcpkg
"expected value after '{value}'.");
DECLARE_MESSAGE(ExtendedDocumentationAtUrl, (msg::url), "", "Extended documentation available at '{url}'.");
DECLARE_MESSAGE(FailedToExtract, (msg::path), "", "Failed to extract \"{path}\":");
DECLARE_MESSAGE(FailedToFormatMissingFile,
(),
"",
"No files to format.\nPlease pass either --all, or the explicit files to format or convert.");
DECLARE_MESSAGE(FailedToObtainLocalPortGitSha, (), "", "Failed to obtain git SHAs for local ports.");
DECLARE_MESSAGE(FailedToParseBinParagraph,
(msg::error_msg),
"'{error_msg}' is the error message for failing to parse the Binary Paragraph.",
Expand All @@ -806,14 +818,21 @@ namespace vcpkg
(),
"",
"Failed to parse CMake console output to locate block start/end markers.");
DECLARE_MESSAGE(FailedToParseControl, (msg::path), "", "Failed to parse control file: {path}");
DECLARE_MESSAGE(FailedToParseJson, (msg::path), "", "Failed to parse JSON file {path}");
DECLARE_MESSAGE(FailedToParseManifest, (msg::path), "", "Failed to parse manifest file: {path}");
DECLARE_MESSAGE(FailedToProvisionCe, (), "", "Failed to provision vcpkg-ce.");
DECLARE_MESSAGE(FailedToRead, (msg::path, msg::error_msg), "", "Failed to read {path}: {error_msg}");
DECLARE_MESSAGE(FailedToReadParagraph, (msg::path), "", "Failed to read paragraphs from {path}");
DECLARE_MESSAGE(FailedToRemoveControl, (msg::path), "", "Failed to remove control file {path}");
DECLARE_MESSAGE(FailedToRunToolToDetermineVersion,
(msg::tool_name, msg::path),
"Additional information, such as the command line output, if any, will be appended on "
"the line after this message",
"Failed to run \"{path}\" to determine the {tool_name} version.");
DECLARE_MESSAGE(FailedToStoreBackToMirror, (), "", "failed to store back to mirror:");
DECLARE_MESSAGE(FailedToStoreBinaryCache, (msg::path), "", "Failed to store binary cache {path}");
DECLARE_MESSAGE(FailedToWriteManifest, (msg::path), "", "Failed to write manifest file {path}");
DECLARE_MESSAGE(FailedVendorAuthentication,
(msg::vendor, msg::url),
"",
Expand Down Expand Up @@ -1108,13 +1127,23 @@ 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(ManifestFormatCompleted, (), "", "Succeeded in formatting the manifest files.");
DECLARE_MESSAGE(MismatchedBinaryParagraphs,
(msg::url),
"A comparison of the original binary paragraph and serialized binary paragraph is expected.",
"[sanity check] The serialized binary paragraph was different from the original binary "
"paragraph.\nPlease open an issue at {url}, with the following output:");
DECLARE_MESSAGE(Missing7zHeader, (), "", "Unable to find 7z header.");
DECLARE_MESSAGE(MissingArgFormatManifest,
(),
"",
"format-manifest was passed --convert-control without '--all'.\nThis doesn't do anything: we will "
"automatically convert all control files passed explicitly.");
DECLARE_MESSAGE(MissingExtension, (msg::extension), "", "Missing '{extension}' extension.");
DECLARE_MESSAGE(MissingPortSuggestPullRequest,
(),
"",
"If your port is not listed, please open an issue at and/or consider making a pull request.");
DECLARE_MESSAGE(MissmatchedBinParagraphs,
(),
"",
Expand Down Expand Up @@ -1257,6 +1286,11 @@ namespace vcpkg
"",
"Specify the target architecture triplet. See 'vcpkg help triplet'.\n(default: '{env_var}')");
DECLARE_MESSAGE(StoredBinaryCache, (msg::path), "", "Stored binary cache: \"{path}\"");
DECLARE_MESSAGE(SuggestGitPull, (), "", "The result may be outdated. Run `git pull` to get the latest results.");
DECLARE_MESSAGE(SuggestResolution,
(msg::command_name, msg::option),
"",
"To attempt to resolve all errors at once, run:\nvcpkg {command_name} --{option}");
DECLARE_MESSAGE(SuggestStartingBashShell,
(),
"",
Expand Down Expand Up @@ -1458,4 +1492,4 @@ namespace vcpkg
"The message named {value} starts with warning:, it must be changed to prepend "
"WarningMessage in code instead.");
DECLARE_MESSAGE(WarningsTreatedAsErrors, (), "", "previous warnings being interpreted as errors");
}
}
18 changes: 18 additions & 0 deletions locales/messages.en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AddArtifactOnlyOne": "'{command_line}' can only add one artifact at a time.",
"AddCommandFirstArg": "The first parameter to add must be 'artifact' or 'port'.",
"AddFirstArgument": "The first argument to '{command_line}' must be 'artifact' or 'port'.",
"AddPortRequiresManifest": "'{command_line}' requires an active manifest file.",
"AddPortSucceeded": "Succeeded in adding ports to vcpkg.json file.",
Expand Down Expand Up @@ -37,6 +38,7 @@
"AlreadyInstalledNotHead": "{spec} is already installed -- not building from HEAD",
"AnotherInstallationInProgress": "Another installation is in progress on the machine, sleeping 6s before retrying.",
"AppliedUserIntegration": "Applied user-wide integration for this vcpkg root.",
"ArtifactsOptionIncompatibility": "--{option} has no effect on find artifact.",
"AssetSourcesArg": "Add sources for asset caching. See 'vcpkg help assetcaching'.",
"AttemptingToFetchPackagesFromVendor": "Attempting to fetch {count} package(s) from {vendor}",
"AuthenticationMayRequireManualAction": "One or more {vendor} credential providers requested manual action. Add the binary source 'interactive' to allow interactivity.",
Expand Down Expand Up @@ -81,6 +83,7 @@
"CommandFailed": "command:\n{command_line}\nfailed with the following results:",
"CompressFolderFailed": "Failed to compress folder \"{path}\":",
"ConflictingValuesForOption": "conflicting values specified for '--{value}'.",
"ControlAndManifestFilesPresent": "Both a manifest file and a CONTROL file exist in port directory: {path}",
"CopyrightIsDir": "`{path}` being a directory is deprecated.",
"CouldNotDeduceNugetIdAndVersion": "Could not deduce nuget id and version from filename: {path}",
"CreatedNuGetPackage": "Created nupkg: \"{path}\"",
Expand Down Expand Up @@ -121,6 +124,7 @@
"ErrorVsCodeNotFoundPathExamined": "The following paths were examined:",
"ErrorWhileParsing": "Errors occurred while parsing {path}.",
"ErrorWhileWriting": "Error occured while writing {path}",
"ErrorsFound": "Found the following errors:",
"ExceededRecursionDepth": "Recursion depth exceeded.",
"ExcludedPackage": "Excluded {spec}",
"ExpectedCharacterHere": "expected '{expected}' here",
Expand All @@ -130,12 +134,21 @@
"ExpectedValueForOption": "expected value after '{value}'.",
"ExtendedDocumentationAtUrl": "Extended documentation available at '{url}'.",
"FailedToExtract": "Failed to extract \"{path}\":",
"FailedToFormatMissingFile": "No files to format.\nPlease pass either --all, or the explicit files to format or convert.",
"FailedToObtainLocalPortGitSha": "Failed to obtain git SHAs for local ports.",
"FailedToParseBinParagraph": "[sanity check] Failed to parse a serialized binary paragraph.\nPlease open an issue at https://github.com/microsoft/vcpkg, with the following output:\n{error_msg}\nSerialized Binary Paragraph:",
"FailedToParseCMakeConsoleOut": "Failed to parse CMake console output to locate block start/end markers.",
"FailedToParseControl": "Failed to parse control file: {path}",
"FailedToParseJson": "Failed to parse JSON file {path}",
"FailedToParseManifest": "Failed to parse manifest file: {path}",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
"FailedToRead": "Failed to read {path}: {error_msg}",
"FailedToReadParagraph": "Failed to read paragraphs from {path}",
"FailedToRemoveControl": "Failed to remove control file {path}",
"FailedToRunToolToDetermineVersion": "Failed to run \"{path}\" to determine the {tool_name} version.",
"FailedToStoreBackToMirror": "failed to store back to mirror:",
"FailedToStoreBinaryCache": "Failed to store binary cache {path}",
"FailedToWriteManifest": "Failed to write manifest file {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}\".",
Expand Down Expand Up @@ -237,9 +250,12 @@
"LoadingOverlayTriplet": "-- [OVERLAY] Loading triplet configuration from: {path}",
"LocalizedMessageMustNotContainIndents": "The message named {value} contains what appears to be indenting which must be changed to use LocalizedString::append_indent instead.",
"LocalizedMessageMustNotEndWithNewline": "The message named {value} ends with a newline which should be added by formatting rather than by localization.",
"ManifestFormatCompleted": "Succeeded in formatting the manifest files.",
"MismatchedBinaryParagraphs": "[sanity check] The serialized binary paragraph was different from the original binary paragraph.\nPlease open an issue at {url}, with the following output:",
"Missing7zHeader": "Unable to find 7z header.",
"MissingArgFormatManifest": "format-manifest was passed --convert-control without '--all'.\nThis doesn't do anything: we will automatically convert all control files passed explicitly.",
"MissingExtension": "Missing '{extension}' extension.",
"MissingPortSuggestPullRequest": "If your port is not listed, please open an issue at and/or consider making a pull request.",
"MissmatchedBinParagraphs": "The serialized binary paragraph was different from the original binary paragraph. Please open an issue at https://github.com/microsoft/vcpkg with the following output:",
"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:",
Expand Down Expand Up @@ -291,6 +307,8 @@
"SpecifyHostArch": "Specify the host architecture triplet. See 'vcpkg help triplet'.\n(default: '{env_var}')",
"SpecifyTargetArch": "Specify the target architecture triplet. See 'vcpkg help triplet'.\n(default: '{env_var}')",
"StoredBinaryCache": "Stored binary cache: \"{path}\"",
"SuggestGitPull": "The result may be outdated. Run `git pull` to get the latest results.",
"SuggestResolution": "To attempt to resolve all errors at once, run:\nvcpkg {command_name} --{option}",
"SuggestStartingBashShell": "Please make sure you have started a new bash shell for the change to take effect.",
"SuggestUpdateVcpkg": "You may need to update the vcpkg binary; try running {command_line} to update.",
"SupportedPort": "Port {package_name} is supported.",
Expand Down
Loading