-
Notifications
You must be signed in to change notification settings - Fork 266
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
Delete Strings::format and no longer used unlocalized infrastructure. #909
Conversation
6220f6a
to
a86608b
Compare
e1b97d3
to
7edf251
Compare
7edf251
to
43e69f7
Compare
@@ -91,25 +91,26 @@ namespace vcpkg::CMakeVars | |||
const auto& fs = paths.get_filesystem(); | |||
std::string extraction_file; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could construct extraction_file with the initial prelude.
@@ -193,19 +193,17 @@ namespace vcpkg::Commands::DependInfo | |||
for (const auto& package : depend_info) | |||
{ | |||
const std::string name = package.package; | |||
nodes.append(Strings::format("<Node Id=\"%s\" />", name)); | |||
fmt::format_to(std::back_inserter(nodes), "<Node Id=\"{}\" />", name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[no change requested] This should really use XmlSerializer...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah :(
This kind of broke the output format of duration.
After:
|
Since this PR
|
@@ -466,7 +465,7 @@ namespace vcpkg::Commands::Integrate | |||
.string_arg("-ExecutionPolicy") | |||
.string_arg("Bypass") | |||
.string_arg("-Command") | |||
.string_arg(Strings::format("& {& '%s' }", script_path)); | |||
.string_arg(fmt::format("& {& '{}' }", script_path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the reason for the following crash: microsoft/vcpkg#30283
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can solve the problem of {}
in the parsing path.
This PR is the ultimate result of merging the following localization PRs:
This fixes all known localization problems and makes future ones less likely by mostly removing the infrastructure to print unlocalized messages outright.
Audited:
print2
(deleted)vcpkg::printf
(deleted)Checks::not-msg
(deleted)Strings::format
(deleted)ExpectedS
(deleted)Strings::append
(retained)Strings::concat
(retained)add_generic_error
(retained)