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 binaryparagraph.cpp and sourceparagraph.cpp #631

Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
575fe0e
WIP
JavierMatosD Jul 11, 2022
bef0248
WIP
JavierMatosD Jul 12, 2022
f4f2cee
Adding messages
JavierMatosD Jul 12, 2022
d840466
WIP: Added message
JavierMatosD Jul 12, 2022
dd2786e
WIP
JavierMatosD Jul 12, 2022
d85eafb
Moved messages to messages.h/cpp
JavierMatosD Jul 12, 2022
9400523
Sorted Messages
JavierMatosD Jul 12, 2022
7829c56
WIP: Add msg
JavierMatosD Jul 12, 2022
102f2ec
Localizing messages
JavierMatosD Jul 12, 2022
38cd9e7
Localizing messages in sourceparagraph.cpp
JavierMatosD Jul 12, 2022
feb7dde
Merge branch 'main' into localization_vcpkgcmdarguments
JavierMatosD Jul 14, 2022
ad461a2
Merge branch 'main' into localization_continued
JavierMatosD Jul 14, 2022
9e3ce1e
LM
JavierMatosD Jul 14, 2022
db70510
Formatting change
JavierMatosD Jul 14, 2022
85f6db3
Split large message in binaryparagraph.cpp
JavierMatosD Jul 15, 2022
642aaee
All messages are localized.
JavierMatosD Jul 15, 2022
258292b
Sorted Messages
JavierMatosD Jul 15, 2022
6e69b6e
WIP
JavierMatosD Jul 15, 2022
1265b0c
UndeterminedToolChainForTriplet
JavierMatosD Jul 15, 2022
57a045a
return_code lambda
JavierMatosD Jul 15, 2022
462127b
FailedToFindDependencyAbi
JavierMatosD Jul 15, 2022
f84aec4
InvalidCrtILinkage
JavierMatosD Jul 15, 2022
ae5e896
Rename: InvalidCrtLinkage -> InvalidLinkage
JavierMatosD Jul 15, 2022
805920b
InvalidLinkage re-use
JavierMatosD Jul 15, 2022
da5170a
UnknownPolicySetting
JavierMatosD Jul 15, 2022
6bcc262
InvalidBuildInfo
JavierMatosD Jul 15, 2022
f130f2d
UnknownSettingForBuildType
JavierMatosD Jul 15, 2022
b578ecc
Sort
JavierMatosD Jul 15, 2022
0f639b3
Update: FailedToFindDependencyAbi
JavierMatosD Jul 15, 2022
d8ba3db
Update: IncorrectNumberOfArgs
JavierMatosD Jul 15, 2022
9190e0d
Update:SpecifiedFeatureTurnedOff
JavierMatosD Jul 15, 2022
9fc4655
Edit: ConflictingValuesForOption
JavierMatosD Jul 15, 2022
f0fb958
PR feedback
JavierMatosD Jul 15, 2022
3d7b751
WIP
JavierMatosD Jul 15, 2022
dbb507d
update clang format
JavierMatosD Jul 15, 2022
4d3d4ee
Fix format
JavierMatosD Jul 15, 2022
b8a0624
Fix paths
JavierMatosD Jul 15, 2022
93d96bc
Fix paths
JavierMatosD Jul 15, 2022
cc597cf
Fix paths
JavierMatosD Jul 15, 2022
3beb0c7
Split BinaryParagraphDescription to avoid re-useing replacement varia…
JavierMatosD Jul 16, 2022
9abcac5
Sorted messages
JavierMatosD Jul 16, 2022
1c96ade
Revert CMakeSettings.json
JavierMatosD Jul 18, 2022
5791d4a
Revert CMakeSettings
JavierMatosD Jul 18, 2022
bc747d6
Revert CMakeSettings
JavierMatosD Jul 18, 2022
78019b6
Response to PR feedback
JavierMatosD Jul 18, 2022
071d8d7
Merge branch 'main' into localization_vcpkgcmdarguments
JavierMatosD Jul 18, 2022
b1498f2
Merge branch 'main' into localization_vcpkgcmdarguments
JavierMatosD Jul 18, 2022
36847bf
Merge branch 'main' into localization_vcpkgcmdarguments
JavierMatosD Jul 19, 2022
dcc61b4
Removed BinParagraph messages
JavierMatosD Jul 19, 2022
27812b2
Response to feedback
JavierMatosD Jul 19, 2022
de5967b
Merge branch 'main' into localization_binaryparagraph.cpp_and_sourcep…
JavierMatosD Jul 19, 2022
f61cc7d
resolve merge conflicts
JavierMatosD Jul 19, 2022
4a7ea97
Grammer fix + ensure environment variable goes through its formatter
JavierMatosD Jul 19, 2022
2512707
grammer fixes
JavierMatosD Jul 19, 2022
aea2345
Removed the format_env_variable for consistency
JavierMatosD Jul 19, 2022
e74d2dd
added -- to all options and scanned for command_name replacements tha…
JavierMatosD Jul 19, 2022
482d571
Update src/vcpkg/sourceparagraph.cpp
JavierMatosD Jul 19, 2022
3c6b6bd
Update src/vcpkg/sourceparagraph.cpp
JavierMatosD Jul 19, 2022
6afcd01
Update src/vcpkg/sourceparagraph.cpp
JavierMatosD Jul 19, 2022
177985f
Update src/vcpkg/build.cpp
JavierMatosD Jul 19, 2022
781eed3
update json
JavierMatosD Jul 20, 2022
9e83a72
Merge branch 'main' into localization_vcpkgcmdarguments
JavierMatosD Jul 21, 2022
3c3bbbd
Merge branch 'localization_vcpkgcmdarguments' into localize_build.cpp
JavierMatosD Jul 21, 2022
6ca19a5
Merge branch 'localize_build.cpp' into localization_binaryparagraph.c…
JavierMatosD Jul 21, 2022
10d7c5c
Feedback
JavierMatosD Jul 21, 2022
73f0919
Merge branch 'main' into localization_binaryparagraph.cpp_and_sourcep…
JavierMatosD Jul 21, 2022
27de5c3
wip
JavierMatosD Jul 21, 2022
9fe5448
wip
JavierMatosD Jul 21, 2022
efa5f3f
Merge branch 'main' into localization_binaryparagraph.cpp_and_sourcep…
JavierMatosD Jul 21, 2022
2dd2576
sort
JavierMatosD Jul 21, 2022
805643c
Update src/vcpkg/binaryparagraph.cpp
JavierMatosD Jul 21, 2022
53c2afb
Update src/vcpkg/binaryparagraph.cpp
JavierMatosD Jul 21, 2022
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
47 changes: 46 additions & 1 deletion include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ namespace vcpkg
DECLARE_MESSAGE(ErrorNoVSInstanceAt, (msg::path), "", "at \"{path}\"");
DECLARE_MESSAGE(ErrorNoVSInstanceFullVersion, (msg::version), "", "with toolset version prefix {version}");
DECLARE_MESSAGE(ErrorNoVSInstanceVersion, (msg::version), "", "with toolset version {version}");
DECLARE_MESSAGE(ErrorParsingBinaryParagraph, (msg::spec), "", "while parsing the Binary Paragraph for {spec}");
DECLARE_MESSAGE(ErrorRequireBaseline,
(),
"",
Expand All @@ -777,6 +778,8 @@ namespace vcpkg
"",
"Visual Studio Code was not found and the environment variable {env_var} is not set or invalid.");
DECLARE_MESSAGE(ErrorVsCodeNotFoundPathExamined, (), "", "The following paths were examined:");
DECLARE_MESSAGE(ErrorWhileParsing, (msg::path), "", "Errors occurred while parsing {path}.");
DECLARE_MESSAGE(ErrorWhileWriting, (msg::path), "", "Error occured while writing {path}");
DECLARE_MESSAGE(ExcludedPackage, (msg::spec), "", "Excluded {spec}");
DECLARE_MESSAGE(
ExpectedCharacterHere,
Expand All @@ -790,8 +793,14 @@ namespace vcpkg
(msg::value),
"'{value}' is a command option.",
"expected value after '{value}'.");
DECLARE_MESSAGE(ExtendedDocumenationAtUrl, (msg::url), "", "Extended documentation available at '{url}'.");
DECLARE_MESSAGE(ExtendedDocumentationAtUrl, (msg::url), "", "Extended documentation available at '{url}'.");
JavierMatosD marked this conversation as resolved.
Show resolved Hide resolved
DECLARE_MESSAGE(FailedToExtract, (msg::path), "", "Failed to extract \"{path}\":");
DECLARE_MESSAGE(FailedToParseBinParagraph,
(msg::error_msg),
"'{error_msg}' is the error message for failing to parse the Binary Paragraph.",
"[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:");
DECLARE_MESSAGE(FailedToParseCMakeConsoleOut,
(),
"",
Expand Down Expand Up @@ -976,10 +985,16 @@ namespace vcpkg
"",
"invalid argument: binary config '{binary_source}' requires a SAS token without a "
"preceeding '?' as the second argument");
DECLARE_MESSAGE(InvalidBuildInfo, (msg::error_msg), "", "Invalid BUILD_INFO file for package: {error_msg}");
DECLARE_MESSAGE(InvalidFormatString,
(msg::actual),
"{actual} is the provided format string",
"invalid format string: {actual}");
DECLARE_MESSAGE(
InvalidLinkage,
(msg::system_name, msg::value),
"'{value}' is the linkage type vcpkg would did not understand. (Correct values would be static ofr dynamic)",
"Invalid {system_name} linkage type: [{value}]");
DECLARE_MESSAGE(JsonErrorFailedToParse, (msg::path), "", "failed to parse {path}:");
DECLARE_MESSAGE(JsonErrorFailedToRead, (msg::path, msg::error_msg), "", "failed to read {path}: {error_msg}");
DECLARE_MESSAGE(JsonErrorMustBeAnObject, (msg::path), "", "Expected \"{path}\" to be an object.");
Expand Down Expand Up @@ -1057,6 +1072,10 @@ namespace vcpkg
(msg::value),
"Example of {value} is 'unknownlicense'",
"Unknown license identifier '{value}'. Known values are listed at https://spdx.org/licenses/");
DECLARE_MESSAGE(ListOfValidFieldsForControlFiles,
(),
"",
"This is the list of valid fields for CONTROL files (case-sensitive):");
DECLARE_MESSAGE(LoadingCommunityTriplet,
(msg::path),
"'-- [COMMUNITY]' at the beginning must be preserved",
Expand All @@ -1080,6 +1099,11 @@ 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(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(MissingExtension, (msg::extension), "", "Missing '{extension}' extension.");
DECLARE_MESSAGE(MonoInstructions,
Expand Down Expand Up @@ -1117,6 +1141,7 @@ namespace vcpkg
(msg::path),
"",
"NuGet package creation succeeded, but no .nupkg was produced. Expected: \"{path}\"");
DECLARE_MESSAGE(MultiArch, (msg::option), "", "Multi-Arch must be 'same' but was {option}");
DECLARE_MESSAGE(PackageFailedtWhileExtracting,
(msg::value, msg::path),
"'{value}' is either a tool name or a package name.",
Expand Down Expand Up @@ -1219,6 +1244,10 @@ namespace vcpkg
(),
"",
"Please make sure you have started a new bash shell for the change to take effect.");
DECLARE_MESSAGE(SuggestUpdateVcpkg,
(msg::command_line),
"",
"You may need to update the vcpkg binary; try running {command_line} to update.");
DECLARE_MESSAGE(SupportedPort, (msg::package_name), "", "Port {package_name} is supported.");
DECLARE_MESSAGE(SystemApiErrorMessage,
(msg::system_api, msg::exit_code, msg::error_msg),
Expand All @@ -1230,6 +1259,12 @@ namespace vcpkg
(msg::value),
"'{value}' is a feature flag.",
"Both '{value}' and -'{value}' were specified as feature flags.");
DECLARE_MESSAGE(UndeterminedToolChainForTriplet,
(msg::triplet, msg::system_name),
"",
"Unable to determine toolchain use for {triplet} with with CMAKE_SYSTEM_NAME {system_name}. Did "
"you mean to use "
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE?");
DECLARE_MESSAGE(UnexpectedErrorDuringBulkDownload, (), "", "an unexpected error occurred during bulk download.");
DECLARE_MESSAGE(UnexpectedExtension, (msg::extension), "", "Unexpected archive extension: '{extension}'.");
DECLARE_MESSAGE(UnexpectedFormat,
Expand All @@ -1256,6 +1291,16 @@ namespace vcpkg
"'{value}' is a user-supplied command line option. For example, given vcpkg integrate frobinate, "
"{value} would be frobinate.",
"Unknown parameter '{value}' for integrate.");
DECLARE_MESSAGE(UnknownPolicySetting,
(msg::option, msg::value),
"'{value}' is the policy in question. These are unlocalized names that ports use to control post "
"build checks. Some examples are VCPKG_POLICY_DLLS_WITHOUT_EXPORTS, "
"VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES, or VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT",
"Unknown setting for policy '{value}': {option}");
DECLARE_MESSAGE(UnknownSettingForBuildType,
(msg::option),
"",
"Unknown setting for VCPKG_BUILD_TYPE {option}. Valid settings are '', 'debug', and 'release'.");
DECLARE_MESSAGE(UnknownTool, (), "", "vcpkg does not have a definition of this tool for this platform.");
DECLARE_MESSAGE(
UnknownVariablesInTemplate,
Expand Down
15 changes: 14 additions & 1 deletion locales/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,24 @@
"ErrorNoVSInstanceAt": "at \"{path}\"",
"ErrorNoVSInstanceFullVersion": "with toolset version prefix {version}",
"ErrorNoVSInstanceVersion": "with toolset version {version}",
"ErrorParsingBinaryParagraph": "while parsing the Binary Paragraph for {spec}",
"ErrorRequireBaseline": "this vcpkg instance requires a manifest with a specified baseline in order to interact with ports. Please add 'builtin-baseline' to the manifest or add a 'vcpkg-configuration.json' that redefines the default registry.",
"ErrorRequirePackagesList": "`vcpkg install` requires a list of packages to install in classic mode.",
"ErrorUnableToDetectCompilerInfo": "vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.",
"ErrorVcvarsUnsupported": "in triplet {triplet}: Use of Visual Studio's Developer Prompt is unsupported on non-Windows hosts.\nDefine 'VCPKG_CMAKE_SYSTEM_NAME' or 'VCPKG_CHAINLOAD_TOOLCHAIN_FILE' in the triplet file.",
"ErrorVsCodeNotFound": "Visual Studio Code was not found and the environment variable {env_var} is not set or invalid.",
"ErrorVsCodeNotFoundPathExamined": "The following paths were examined:",
"ErrorWhileParsing": "Errors occurred while parsing {path}.",
"ErrorWhileWriting": "Error occured while writing {path}",
"ExcludedPackage": "Excluded {spec}",
"ExpectedCharacterHere": "expected '{expected}' here",
"ExpectedFailOrSkip": "expected 'fail', 'skip', or 'pass' here",
"ExpectedPortName": "expected a port name here",
"ExpectedTripletName": "expected a triplet name here",
"ExpectedValueForOption": "expected value after '{value}'.",
"ExtendedDocumenationAtUrl": "Extended documentation available at '{url}'.",
"ExtendedDocumentationAtUrl": "Extended documentation available at '{url}'.",
"FailedToExtract": "Failed to extract \"{path}\":",
"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.",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
"FailedToRunToolToDetermineVersion": "Failed to run \"{path}\" to determine the {tool_name} version.",
Expand Down Expand Up @@ -199,7 +203,9 @@
"InvalidArgumentRequiresSourceArgument": "invalid argument: binary config '{binary_source}' requires at least one source argument",
"InvalidArgumentRequiresTwoOrThreeArguments": "invalid argument: binary config '{binary_source}' requires 2 or 3 arguments",
"InvalidArgumentRequiresValidToken": "invalid argument: binary config '{binary_source}' requires a SAS token without a preceeding '?' as the second argument",
"InvalidBuildInfo": "Invalid BUILD_INFO file for package: {error_msg}",
"InvalidFormatString": "invalid format string: {actual}",
"InvalidLinkage": "Invalid {system_name} linkage type: [{value}]",
"JsonErrorFailedToParse": "failed to parse {path}:",
"JsonErrorFailedToRead": "failed to read {path}: {error_msg}",
"JsonErrorMustBeAnObject": "Expected \"{path}\" to be an object.",
Expand All @@ -222,15 +228,18 @@
"LicenseExpressionImbalancedParens": "There was a close parenthesis without an opening parenthesis.",
"LicenseExpressionUnknownException": "Unknown license exception identifier '{value}'. Known values are listed at https://spdx.org/licenses/exceptions-index.html",
"LicenseExpressionUnknownLicense": "Unknown license identifier '{value}'. Known values are listed at https://spdx.org/licenses/",
"ListOfValidFieldsForControlFiles": "This is the list of valid fields for CONTROL files (case-sensitive):",
"LoadingCommunityTriplet": "-- [COMMUNITY] Loading triplet configuration from: {path}",
"LoadingDependencyInformation": "Loading dependency information for {count} packages...",
"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.",
"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.",
"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:",
"MultiArch": "Multi-Arch must be 'same' but was {option}",
"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}.",
Expand Down Expand Up @@ -276,11 +285,13 @@
"SpecifyTargetArch": "Specify the target architecture triplet. See 'vcpkg help triplet'.\n(default: '{env_var}')",
"StoredBinaryCache": "Stored binary cache: \"{path}\"",
"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.",
"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.",
"TwoFeatureFlagsSpecified": "Both '{value}' and -'{value}' were specified as feature flags.",
"UndeterminedToolChainForTriplet": "Unable to determine toolchain use for {triplet} with with CMAKE_SYSTEM_NAME {system_name}. Did you mean to use VCPKG_CHAINLOAD_TOOLCHAIN_FILE?",
"UnexpectedErrorDuringBulkDownload": "an unexpected error occurred during bulk download.",
"UnexpectedExtension": "Unexpected archive extension: '{extension}'.",
"UnexpectedFormat": "Expected format is [{expected}], but was [{actual}].",
Expand All @@ -289,6 +300,8 @@
"UnknownBinaryProviderType": "unknown binary provider type: valid providers are 'clear', 'default', 'nuget', 'nugetconfig','nugettimeout', 'interactive', 'x-azblob', 'x-gcs', 'x-aws', 'x-aws-config', 'http', and 'files'",
"UnknownOptions": "Unknown option(s) for command '{command_name}':",
"UnknownParameterForIntegrate": "Unknown parameter '{value}' for integrate.",
"UnknownPolicySetting": "Unknown setting for policy '{value}': {option}",
"UnknownSettingForBuildType": "Unknown setting for VCPKG_BUILD_TYPE {option}. Valid settings are '', 'debug', and 'release'.",
"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.",
Expand Down
Loading