Skip to content

Commit

Permalink
Localization nitpicks. (#628)
Browse files Browse the repository at this point in the history
These are minor nitpick fixes observed after doing a full build for this week's release here: https://dev.azure.com/vcpkg/public/_build/results?buildId=75028&view=logs&j=f79cfdd7-47a8-597f-8f57-dc3e21a8f2ad&t=da63cf11-1f12-503b-6d64-3b2fb713c172

Note the new / extra single quotes in:

Uploaded binaries to '1' 'HTTP remotes'.

Changes:
* Removed the extra 's from UploadedBinaries
* Checked for other 's in messages and removed a few more where they didn't add anything
* Moved FuzzExpectedOneOf to the fuzz tester only
* Changed FailedToStoreBinaryCache to append the message internally on the next line
* Spell checked a few message names
  • Loading branch information
BillyONeal authored Jul 13, 2022
1 parent a5ce80a commit fb7e3b1
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 48 deletions.
25 changes: 9 additions & 16 deletions include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ namespace vcpkg
(msg::command_line),
"",
"'{command_line}' requires an active manifest file.");
DECLARE_MESSAGE(AddPortSucceded, (), "", "Succeeded in adding ports to vcpkg.json file.");
DECLARE_MESSAGE(AddPortSucceeded, (), "", "Succeeded in adding ports to vcpkg.json file.");
DECLARE_MESSAGE(AddTripletExpressionNotAllowed,
(msg::package_name, msg::triplet),
"",
Expand Down Expand Up @@ -645,7 +645,7 @@ namespace vcpkg
"command:\n"
"{command_line}\n"
"failed with the following results:");
DECLARE_MESSAGE(CompressFolderFailed, (msg::path), "", "Failed to compress folder '{path}':");
DECLARE_MESSAGE(CompressFolderFailed, (msg::path), "", "Failed to compress folder \"{path}\":");
DECLARE_MESSAGE(CouldNotDeduceNugetIdAndVersion,
(msg::path),
"",
Expand All @@ -664,9 +664,9 @@ namespace vcpkg
DECLARE_MESSAGE(DefaultPathToBinaries,
(msg::path),
"",
"Based on your system settings, the default path to store binaries is \n '{path}'. This consults "
"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.");
DECLARE_MESSAGE(DetectCompilerHash, (msg::triplet), "", "Detecting compiler hash for triplet \"{triplet}\"...");
DECLARE_MESSAGE(DetectCompilerHash, (msg::triplet), "", "Detecting compiler hash for triplet {triplet}...");
DECLARE_MESSAGE(DownloadAvailable,
(msg::env_var),
"",
Expand Down Expand Up @@ -739,7 +739,7 @@ namespace vcpkg
DECLARE_MESSAGE(ErrorVsCodeNotFound,
(msg::env_var),
"",
"Visual Studio Code was not found and the environment variable '{env_var}' is not set or invalid.");
"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(ExcludedPackage, (msg::spec), "", "Excluded {spec}");
DECLARE_MESSAGE(
Expand All @@ -750,18 +750,15 @@ namespace vcpkg
DECLARE_MESSAGE(ExpectedFailOrSkip, (), "", "expected 'fail', 'skip', or 'pass' here");
DECLARE_MESSAGE(ExpectedPortName, (), "", "expected a port name here");
DECLARE_MESSAGE(ExpectedTripletName, (), "", "expected a triplet name here");
DECLARE_MESSAGE(ExtendedDocumenationAtUrl, (msg::url), "", "Extended documentation available at '{url}'.");
DECLARE_MESSAGE(ExtendedDocumentationAtUrl, (msg::url), "", "Extended documentation available at '{url}'.");
DECLARE_MESSAGE(FailedToProvisionCe, (), "", "Failed to provision vcpkg-ce.");
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, msg::error_msg),
"",
"Failed to store binary cache '{path}':'{error_msg}'");
DECLARE_MESSAGE(FailedToStoreBinaryCache, (msg::path), "", "Failed to store binary cache {path}");
DECLARE_MESSAGE(FailedVendorAuthentication,
(msg::vendor, msg::url),
"",
Expand All @@ -776,10 +773,6 @@ namespace vcpkg
(msg::value),
"Example of {value} is 'x64 & windows'",
"on expression: {value}");
DECLARE_MESSAGE(FuzzExpectedOneOf,
(),
"the list after the colon should stay the same, they're literal values",
"expected one of: utf-8, json, platform-expr");
DECLARE_MESSAGE(GenerateMsgErrorParsingFormatArgs,
(msg::value),
"example of {value} 'GenerateMsgNoComment'",
Expand Down Expand Up @@ -819,7 +812,7 @@ namespace vcpkg
DECLARE_MESSAGE(InfoSetEnvVar,
(msg::env_var),
"In this context 'editor' means IDE",
"You can also set the environment variable '{env_var}' to your editor of choice.");
"You can also set the environment variable {env_var} to your editor of choice.");
DECLARE_MESSAGE(InstallingFromLocation,
(msg::path),
"'--' at the beginning must be preserved",
Expand Down Expand Up @@ -1132,7 +1125,7 @@ namespace vcpkg
(msg::url, msg::old_value, msg::new_value),
"example of {old_value}, {new_value} is '5507daa796359fe8d45418e694328e878ac2b82f'",
"updated registry '{url}': baseline '{old_value}' -> '{new_value}'");
DECLARE_MESSAGE(UploadedBinaries, (msg::count, msg::vendor), "", "Uploaded binaries to '{count}' '{vendor}'.");
DECLARE_MESSAGE(UploadedBinaries, (msg::count, msg::vendor), "", "Uploaded binaries to {count} {vendor}.");
DECLARE_MESSAGE(UploadedPackagesToVendor,
(msg::count, msg::elapsed, msg::vendor),
"",
Expand Down
19 changes: 9 additions & 10 deletions locales/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AddArtifactOnlyOne": "'{command_line}' can only add one artifact at a time.",
"AddFirstArgument": "The first argument to '{command_line}' must be 'artifact' or 'port'.",
"AddPortRequiresManifest": "'{command_line}' requires an active manifest file.",
"AddPortSucceded": "Succeeded in adding ports to vcpkg.json file.",
"AddPortSucceeded": "Succeeded in adding ports to vcpkg.json file.",
"AddTripletExpressionNotAllowed": "triplet expressions are not allowed here. You may want to change `{package_name}:{triplet}` to `{package_name}` instead.",
"AddVersionAddedVersionToFile": "added version {version} to {path}",
"AddVersionCommitChangesReminder": "Did you remember to commit your changes?",
Expand Down Expand Up @@ -72,11 +72,11 @@
"CiBaselineUnexpectedPass": "PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).",
"CmakeTargetsExcluded": "note: {count} additional targets are not displayed.",
"CommandFailed": "command:\n{command_line}\nfailed with the following results:",
"CompressFolderFailed": "Failed to compress folder '{path}':",
"CompressFolderFailed": "Failed to compress folder \"{path}\":",
"CouldNotDeduceNugetIdAndVersion": "Could not deduce nuget id and version from filename: {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 ===",
"DefaultPathToBinaries": "Based on your system settings, the default path to store binaries is \n '{path}'. This consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.",
"DetectCompilerHash": "Detecting compiler hash for triplet \"{triplet}\"...",
"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}...",
Expand All @@ -99,22 +99,21 @@
"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.",
"ErrorVsCodeNotFound": "Visual Studio Code was not found and the environment variable {env_var} is not set or invalid.",
"ErrorVsCodeNotFoundPathExamined": "The following paths were examined:",
"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",
"ExtendedDocumenationAtUrl": "Extended documentation available at '{url}'.",
"ExtendedDocumentationAtUrl": "Extended documentation available at '{url}'.",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
"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}':'{error_msg}'",
"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.",
"ForceSystemBinariesOnWeirdPlatforms": "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, and ppc64le platforms.",
"FormattedParseMessageExpression": "on expression: {value}",
"FuzzExpectedOneOf": "expected one of: utf-8, json, platform-expr",
"GenerateMsgErrorParsingFormatArgs": "parsing format string for {value}:",
"GenerateMsgIncorrectComment": "message {value} has an incorrect comment:",
"GenerateMsgNoArgumentValue": "{{{value}}} was specified in a comment, but was not used in the message.",
Expand All @@ -130,7 +129,7 @@
"HeaderOnlyUsage": "{package_name} is header-only and can be used from CMake via:",
"IllegalFeatures": "List of features is not allowed in this context",
"IllegalPlatformSpec": "Platform qualifier is not allowed in this context",
"InfoSetEnvVar": "You can also set the environment variable '{env_var}' to your editor of choice.",
"InfoSetEnvVar": "You can also set the environment variable {env_var} to your editor of choice.",
"InstallWithSystemManager": "You may be able to install this tool via your system package manager.",
"InstallWithSystemManagerMono": "Ubuntu 18.04 users may need a newer version of mono, available at {url}.",
"InstallWithSystemManagerPkg": "You may be able to install this tool via your system package manager ({command_line}).",
Expand Down Expand Up @@ -221,7 +220,7 @@
"UpdateBaselineNoUpdate": "registry '{url}' not updated: '{value}'",
"UpdateBaselineRemoteGitError": "git failed to fetch remote repository '{url}'",
"UpdateBaselineUpdatedBaseline": "updated registry '{url}': baseline '{old_value}' -> '{new_value}'",
"UploadedBinaries": "Uploaded binaries to '{count}' '{vendor}'.",
"UploadedBinaries": "Uploaded binaries to {count} {vendor}.",
"UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}",
"UploadingBinariesToVendor": "Uploading binaries for '{spec}' to '{vendor}' source '{path}'.",
"UploadingBinariesUsingVendor": "Uploading binaries for '{spec}' using '{vendor}' '{path}'.",
Expand Down
24 changes: 11 additions & 13 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_AddFirstArgument.comment": "An example of {command_line} is vcpkg install zlib.",
"AddPortRequiresManifest": "'{command_line}' requires an active manifest file.",
"_AddPortRequiresManifest.comment": "An example of {command_line} is vcpkg install zlib.",
"AddPortSucceded": "Succeeded in adding ports to vcpkg.json file.",
"AddPortSucceeded": "Succeeded in adding ports to vcpkg.json file.",
"AddTripletExpressionNotAllowed": "triplet expressions are not allowed here. You may want to change `{package_name}:{triplet}` to `{package_name}` instead.",
"_AddTripletExpressionNotAllowed.comment": "An example of {package_name} is zlib. An example of {triplet} is x64-windows.",
"AddVersionAddedVersionToFile": "added version {version} to {path}",
Expand Down Expand Up @@ -132,15 +132,15 @@
"_CmakeTargetsExcluded.comment": "An example of {count} is 42.",
"CommandFailed": "command:\n{command_line}\nfailed with the following results:",
"_CommandFailed.comment": "An example of {command_line} is vcpkg install zlib.",
"CompressFolderFailed": "Failed to compress folder '{path}':",
"CompressFolderFailed": "Failed to compress folder \"{path}\":",
"_CompressFolderFailed.comment": "An example of {path} is /foo/bar.",
"CouldNotDeduceNugetIdAndVersion": "Could not deduce nuget id and version from filename: {path}",
"_CouldNotDeduceNugetIdAndVersion.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.",
"DefaultPathToBinaries": "Based on your system settings, the default path to store binaries is \n '{path}'. This consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.",
"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}\"...",
"DetectCompilerHash": "Detecting compiler hash for triplet {triplet}...",
"_DetectCompilerHash.comment": "An example of {triplet} is x64-windows.",
"DownloadAvailable": "A downloadable copy of this tool is available and can be used by unsetting {env_var}.",
"_DownloadAvailable.comment": "An example of {env_var} is VCPKG_DEFAULT_TRIPLET.",
Expand Down Expand Up @@ -179,7 +179,7 @@
"_ErrorUnableToDetectCompilerInfo.comment": "failure output will be displayed at the top of this",
"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.",
"_ErrorVcvarsUnsupported.comment": "An example of {triplet} is x64-windows.",
"ErrorVsCodeNotFound": "Visual Studio Code was not found and the environment variable '{env_var}' is not set or invalid.",
"ErrorVsCodeNotFound": "Visual Studio Code was not found and the environment variable {env_var} is not set or invalid.",
"_ErrorVsCodeNotFound.comment": "An example of {env_var} is VCPKG_DEFAULT_TRIPLET.",
"ErrorVsCodeNotFoundPathExamined": "The following paths were examined:",
"ExcludedPackage": "Excluded {spec}",
Expand All @@ -189,21 +189,19 @@
"ExpectedFailOrSkip": "expected 'fail', 'skip', or 'pass' here",
"ExpectedPortName": "expected a port name here",
"ExpectedTripletName": "expected a triplet name here",
"ExtendedDocumenationAtUrl": "Extended documentation available at '{url}'.",
"_ExtendedDocumenationAtUrl.comment": "An example of {url} is https://github.com/microsoft/vcpkg.",
"ExtendedDocumentationAtUrl": "Extended documentation available at '{url}'.",
"_ExtendedDocumentationAtUrl.comment": "An example of {url} is https://github.com/microsoft/vcpkg.",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
"FailedToRunToolToDetermineVersion": "Failed to run {path} to determine the {tool_name} version.",
"_FailedToRunToolToDetermineVersion.comment": "Additional information, such as the command line output, if any, will be appended on the line after this message An example of {tool_name} is aria2. An example of {path} is /foo/bar.",
"FailedToStoreBackToMirror": "failed to store back to mirror:",
"FailedToStoreBinaryCache": "Failed to store binary cache '{path}':'{error_msg}'",
"_FailedToStoreBinaryCache.comment": "An example of {path} is /foo/bar. An example of {error_msg} is File Not Found.",
"FailedToStoreBinaryCache": "Failed to store binary cache {path}",
"_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.",
"ForceSystemBinariesOnWeirdPlatforms": "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, and ppc64le platforms.",
"FormattedParseMessageExpression": "on expression: {value}",
"_FormattedParseMessageExpression.comment": "Example of {value} is 'x64 & windows'",
"FuzzExpectedOneOf": "expected one of: utf-8, json, platform-expr",
"_FuzzExpectedOneOf.comment": "the list after the colon should stay the same, they're literal values",
"GenerateMsgErrorParsingFormatArgs": "parsing format string for {value}:",
"_GenerateMsgErrorParsingFormatArgs.comment": "example of {value} 'GenerateMsgNoComment'",
"GenerateMsgIncorrectComment": "message {value} has an incorrect comment:",
Expand All @@ -228,7 +226,7 @@
"_HeaderOnlyUsage.comment": "'header' refers to C/C++ .h files An example of {package_name} is zlib.",
"IllegalFeatures": "List of features is not allowed in this context",
"IllegalPlatformSpec": "Platform qualifier is not allowed in this context",
"InfoSetEnvVar": "You can also set the environment variable '{env_var}' to your editor of choice.",
"InfoSetEnvVar": "You can also set the environment variable {env_var} to your editor of choice.",
"_InfoSetEnvVar.comment": "In this context 'editor' means IDE An example of {env_var} is VCPKG_DEFAULT_TRIPLET.",
"InstallWithSystemManager": "You may be able to install this tool via your system package manager.",
"InstallWithSystemManagerMono": "Ubuntu 18.04 users may need a newer version of mono, available at {url}.",
Expand Down Expand Up @@ -385,7 +383,7 @@
"_UpdateBaselineRemoteGitError.comment": "An example of {url} is https://github.com/microsoft/vcpkg.",
"UpdateBaselineUpdatedBaseline": "updated registry '{url}': baseline '{old_value}' -> '{new_value}'",
"_UpdateBaselineUpdatedBaseline.comment": "example of {old_value}, {new_value} is '5507daa796359fe8d45418e694328e878ac2b82f' An example of {url} is https://github.com/microsoft/vcpkg.",
"UploadedBinaries": "Uploaded binaries to '{count}' '{vendor}'.",
"UploadedBinaries": "Uploaded binaries to {count} {vendor}.",
"_UploadedBinaries.comment": "An example of {count} is 42. An example of {vendor} is Azure.",
"UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}",
"_UploadedPackagesToVendor.comment": "An example of {count} is 42. An example of {elapsed} is 3.532 min. An example of {vendor} is Azure.",
Expand Down
4 changes: 4 additions & 0 deletions src/vcpkg-fuzz/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ using namespace vcpkg;

namespace
{
DECLARE_AND_REGISTER_MESSAGE(FuzzExpectedOneOf,
(),
"the list after the colon should stay the same, they're literal values",
"expected one of: utf-8, json, platform-expr");
DECLARE_AND_REGISTER_MESSAGE(FuzzHelpInput, (), "", "accepts input on stdin.");
DECLARE_AND_REGISTER_MESSAGE(FuzzHelpOptionKind, (), "", "one of {{utf-8, json, platform-expr}}");
DECLARE_AND_REGISTER_MESSAGE(FuzzHelpOptions, (), "", "options:");
Expand Down
Loading

0 comments on commit fb7e3b1

Please sign in to comment.