Skip to content

Commit

Permalink
Consistently ensure the word 'overlay' is printed when talking about …
Browse files Browse the repository at this point in the history
…overlays. (#1345)
  • Loading branch information
BillyONeal authored Feb 21, 2024
1 parent 05320e4 commit 42dbe07
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
23 changes: 7 additions & 16 deletions include/vcpkg/base/message-data.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1712,14 +1712,11 @@ DECLARE_MESSAGE(InstalledBy, (msg::path), "", "Installed by {path}")
DECLARE_MESSAGE(InstalledPackages, (), "", "The following packages are already installed:")
DECLARE_MESSAGE(InstalledRequestedPackages, (), "", "All requested packages are currently installed.")
DECLARE_MESSAGE(InstallFailed, (msg::path, msg::error_msg), "", "failed: {path}: {error_msg}")
DECLARE_MESSAGE(InstallingFromLocation,
(msg::path),
"'--' at the beginning must be preserved",
"-- Installing port from location: {path}")
DECLARE_MESSAGE(InstallingMavenFile,
(msg::path),
"Printed after a filesystem operation error",
"{path} installing Maven file")
DECLARE_MESSAGE(InstallingOverlayPort, (), "", "installing overlay port from here")
DECLARE_MESSAGE(InstallingPackage,
(msg::action_index, msg::count, msg::spec),
"",
Expand Down Expand Up @@ -2012,18 +2009,16 @@ DECLARE_MESSAGE(LinkageDynamicRelease, (), "", "Dynamic Release (/MD)")
DECLARE_MESSAGE(LinkageStaticDebug, (), "", "Static Debug (/MTd)")
DECLARE_MESSAGE(LinkageStaticRelease, (), "", "Static Release (/MT)")
DECLARE_MESSAGE(ListHelp, (), "", "Lists installed libraries")
DECLARE_MESSAGE(LoadingCommunityTriplet,
(msg::path),
"'-- [COMMUNITY]' at the beginning must be preserved",
"-- [COMMUNITY] Loading triplet configuration from: {path}")
DECLARE_MESSAGE(LoadedCommunityTriplet,
(),
"",
"loaded community triplet from here. Community triplets are not built in the curated registry and are "
"thus less likely to succeed.")
DECLARE_MESSAGE(LoadedOverlayTriplet, (), "", "loaded overlay triplet from here")
DECLARE_MESSAGE(LoadingDependencyInformation,
(msg::count),
"",
"Loading dependency information for {count} packages...")
DECLARE_MESSAGE(LoadingOverlayTriplet,
(msg::path),
"'-- [OVERLAY]' at the beginning must be preserved",
"-- [OVERLAY] Loading triplet configuration from: {path}")
DECLARE_MESSAGE(LocalPortfileVersion,
(),
"",
Expand Down Expand Up @@ -2848,10 +2843,6 @@ DECLARE_MESSAGE(UseEnvVar,
"-- Using {env_var} in environment variables.")
DECLARE_MESSAGE(UserWideIntegrationDeleted, (), "", "User-wide integration is not installed.")
DECLARE_MESSAGE(UserWideIntegrationRemoved, (), "", "User-wide integration was removed.")
DECLARE_MESSAGE(UsingCommunityTriplet,
(msg::triplet),
"'--' at the beginning must be preserved",
"-- Using community triplet {triplet}. This triplet configuration is not guaranteed to succeed.")
DECLARE_MESSAGE(UsingManifestAt, (msg::path), "", "Using manifest file at {path}.")
DECLARE_MESSAGE(Utf8ConversionFailed, (), "", "Failed to convert to UTF-8")
DECLARE_MESSAGE(VcpkgCeIsExperimental,
Expand Down
2 changes: 2 additions & 0 deletions include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ namespace vcpkg
LocalizedString internal_error_prefix();
inline constexpr StringLiteral MessagePrefix = "message: ";
LocalizedString message_prefix();
inline constexpr StringLiteral InfoPrefix = "info: ";
LocalizedString info_prefix();
inline constexpr StringLiteral NotePrefix = "note: ";
LocalizedString note_prefix();
inline constexpr StringLiteral WarningPrefix = "warning: ";
Expand Down
11 changes: 3 additions & 8 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,9 @@
"_InstalledBy.comment": "An example of {path} is /foo/bar.",
"InstalledPackages": "The following packages are already installed:",
"InstalledRequestedPackages": "All requested packages are currently installed.",
"InstallingFromLocation": "-- Installing port from location: {path}",
"_InstallingFromLocation.comment": "'--' at the beginning must be preserved An example of {path} is /foo/bar.",
"InstallingMavenFile": "{path} installing Maven file",
"_InstallingMavenFile.comment": "Printed after a filesystem operation error An example of {path} is /foo/bar.",
"InstallingOverlayPort": "installing overlay port from here",
"InstallingPackage": "Installing {action_index}/{count} {spec}...",
"_InstallingPackage.comment": "An example of {action_index} is 340. An example of {count} is 42. An example of {spec} is zlib:x64-windows.",
"IntegrateBashHelp": "Enable bash tab-completion. Non-Windows only",
Expand Down Expand Up @@ -1142,12 +1141,10 @@
"LinkageStaticDebug": "Static Debug (/MTd)",
"LinkageStaticRelease": "Static Release (/MT)",
"ListHelp": "Lists installed libraries",
"LoadingCommunityTriplet": "-- [COMMUNITY] Loading triplet configuration from: {path}",
"_LoadingCommunityTriplet.comment": "'-- [COMMUNITY]' at the beginning must be preserved An example of {path} is /foo/bar.",
"LoadedCommunityTriplet": "loaded community triplet from here. Community triplets are not built in the curated registry and are thus less likely to succeed.",
"LoadedOverlayTriplet": "loaded overlay triplet from here",
"LoadingDependencyInformation": "Loading dependency information for {count} packages...",
"_LoadingDependencyInformation.comment": "An example of {count} is 42.",
"LoadingOverlayTriplet": "-- [OVERLAY] Loading triplet configuration from: {path}",
"_LoadingOverlayTriplet.comment": "'-- [OVERLAY]' at the beginning must be preserved An example of {path} is /foo/bar.",
"LocalPortfileVersion": "Using local portfile versions. To update the local portfiles, use `git pull`.",
"ManifestConflict": "Found both a manifest and CONTROL files in port \"{path}\"; please rename one or the other",
"_ManifestConflict.comment": "An example of {path} is /foo/bar.",
Expand Down Expand Up @@ -1596,8 +1593,6 @@
"_UseEnvVar.comment": "An example of env_var is \"HTTP(S)_PROXY\"'--' at the beginning must be preserved An example of {env_var} is VCPKG_DEFAULT_TRIPLET.",
"UserWideIntegrationDeleted": "User-wide integration is not installed.",
"UserWideIntegrationRemoved": "User-wide integration was removed.",
"UsingCommunityTriplet": "-- Using community triplet {triplet}. This triplet configuration is not guaranteed to succeed.",
"_UsingCommunityTriplet.comment": "'--' at the beginning must be preserved An example of {triplet} is x64-windows.",
"UsingManifestAt": "Using manifest file at {path}.",
"_UsingManifestAt.comment": "An example of {path} is /foo/bar.",
"Utf8ConversionFailed": "Failed to convert to UTF-8",
Expand Down
1 change: 1 addition & 0 deletions src/vcpkg/base/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ namespace vcpkg
LocalizedString error_prefix() { return LocalizedString::from_raw(ErrorPrefix); }
LocalizedString internal_error_prefix() { return LocalizedString::from_raw(InternalErrorPrefix); }
LocalizedString message_prefix() { return LocalizedString::from_raw(MessagePrefix); }
LocalizedString info_prefix() { return LocalizedString::from_raw(InfoPrefix); }
LocalizedString note_prefix() { return LocalizedString::from_raw(NotePrefix); }
LocalizedString warning_prefix() { return LocalizedString::from_raw(WarningPrefix); }
}
Expand Down
19 changes: 15 additions & 4 deletions src/vcpkg/commands.build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,17 +934,28 @@ namespace vcpkg

if (Strings::starts_with(triplet_file_path, triplet_db.community_triplet_directory))
{
msg::println_warning(msgUsingCommunityTriplet, msg::triplet = triplet.canonical_name());
msg::println(msgLoadingCommunityTriplet, msg::path = triplet_file_path);
msg::print(LocalizedString::from_raw(triplet_file_path)
.append_raw(": ")
.append_raw(InfoPrefix)
.append(msgLoadedCommunityTriplet)
.append_raw('\n'));
}
else if (!Strings::starts_with(triplet_file_path, triplet_db.default_triplet_directory))
{
msg::println(msgLoadingOverlayTriplet, msg::path = triplet_file_path);
msg::print(LocalizedString::from_raw(triplet_file_path)
.append_raw(": ")
.append_raw(InfoPrefix)
.append(msgLoadedOverlayTriplet)
.append_raw('\n'));
}

if (!Strings::starts_with(scfl.control_path, paths.builtin_ports_directory()))
{
msg::println(msgInstallingFromLocation, msg::path = scfl.port_directory());
msg::print(LocalizedString::from_raw(scfl.port_directory())
.append_raw(": ")
.append_raw(InfoPrefix)
.append(msgInstallingOverlayPort)
.append_raw('\n'));
}

const auto& abi_info = action.abi_info.value_or_exit(VCPKG_LINE_INFO);
Expand Down

0 comments on commit 42dbe07

Please sign in to comment.