Repository navigation
sort: keep numeric-looking file names verbatim in errors - #15565
Merged
Merged
Conversation
The error messages passed file names to translate!, which hands any value that parses as a number to Fluent as a number, so "1e3" was reported as "1000" and an output directory named "007" as "7". Use translate_text! for the messages that carry a file name, so they are printed as given, like GNU sort. Found with behave (https://github.com/emirmrkaljevic/behave).
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #15533.
sortpassed file names totranslate!, which gives Fluent any value that parses as a number as a number, so numeric-looking names were reformatted in error messages:This switches the sort messages that carry a file name to
translate_text!, the same change as in #15534, #15541, #15544 and #15548. Output now matches GNU sort.Added an rstest case per message in
test_sort.rs; they fail on main and pass with the fix.Found with behave.