Skip to content
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

Update command line to handle nested json objects #7

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

jacalata
Copy link

change from simple iteration over input to a recursive call

to run from the command line I had to start with 'node'. I could be missing something about the usual workflow as I'm pretty new to node plugins.
change from simple iteration over input to a recursive call
@bunkat
Copy link
Owner

bunkat commented Oct 3, 2014

Thanks for the pull request. Would you be able to add a test case for nested objects as well?

@jacalata
Copy link
Author

jacalata commented Oct 4, 2014

What kind of test case were you thinking? The only place that json objects are handled are within the command line program, which doesn't currently have test cases. I added a nested object to the example.json file, would you prefer it to be separate eg example-nested.json?

@bunkat
Copy link
Owner

bunkat commented Oct 4, 2014

Ah, I didn't look at the pull request carefully enough. By only updating the command line tool, this functionality isn't available to tools using the API.

I thought you had added a new function to pseudoloc to handle objects (something like pseudoloc.obj which would internally use pseudoloc.str). You could then switch the command line to just use pseudoloc.obj. This function could then be extended to handle things like arrays or dates without needing to update the command line tool again. And you would be able to add test cases like the other API calls.

I probably won't merge this change as is, but if you wanted to refactor the code a little that would be great. Otherwise, I'll do the refactor the next time I touch the code. Sorry about the confusion.

sierawski and others added 25 commits April 3, 2016 14:03
Recursively search whole object and pseudolocalize each string value.
changed author name (included credit to bunkat)
Updated Extend section in Readme
- Migrate additional tasks to npm scripts
- Remove files related to tasks that no longer exist:
  - coverage
  - component.json
Update build process (remove MAKE and add npm scripts)
probertson-hv and others added 11 commits June 19, 2018 17:26
I missed this before when I was doing cleanup on the old build system.
Remove one more reference to 'pseudoloc.cov'
- Changed padding characters so that they are all supplementary characters (above U+FFFF).
  Previously only one of the padding characters was above U+FFFF.
  This change guarantees that all padding characters are supplementary.
- Changed the test case to reflect this.
  Previous test case actually failed on some runs - it was expecting a length of 32, which wasn't the case if the algorithm chose the single supplementary character.
  (JavaScript counts supplementary character as being of length 2.)
- Fixed typo in Readme
Fixes to padding algorithm and tests
so that `pseudoloc` is available on the command-line after a npm install.

re: bunkat#11
Add bin configuration to package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants