Fix option --[no-]json-translate#337
Merged
4 commits merged intodevelopfrom Jun 7, 2023
unknown repository
Merged
Conversation
This was referenced May 31, 2023
tgreenx
previously approved these changes
May 31, 2023
mattias-p
reviewed
May 31, 2023
Author
|
Finally I went with a more complete solution were |
mattias-p
reviewed
May 31, 2023
added 3 commits
June 1, 2023 11:04
These prefixes are from Getopt::Long, see https://metacpan.org/pod/Getopt::Long#!
The default value of the `raw` property is removed and the `raw` property value is set later. Nice suggestion from @mattias-p.
Here are the different possibilities for the assignment of the "raw"
property:
∅ means that the option is not passed and the property undefined
0 means that the option is passed in its negated form (property = 0)
1 means that the option is passed in its positive form (property = 1)
+---------------+
| raw |
| ------------- |
| ∅ 0 1 |
+-----------------------+---------------+
| | ∅ | 0 0 1 |
| json_translate | 0 | 1 0 1 |
| | 1 | 0 0 1 |
+-----------------------+---------------+
assigned value to the "raw" property
Author
|
I've refactored the PR. There was a small glitch with your suggestion @mattias-p. If there is no option passed, the output should be translated ( |
mattias-p
approved these changes
Jun 7, 2023
tgreenx
approved these changes
Jun 7, 2023
Contributor
tgreenx
left a comment
There was a problem hiding this comment.
Tested and works as expected.
This pull request was closed.
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.
Purpose
This PR fixes 2 small error/bugs discovered during v2023.1 release testing.
Context
#308 #309
v2023.1 release testing comment #308 (comment)
v2023.1 release testing comment #309 (comment)
Changes
--no-json-translateoption--[no-]json_translateHow to test this PR
--[no-]json_translateoption gives a deprecation warning.--no-json-translatedoes not output themessagekey.