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

Enum member names do not properly preserve pluralization #7

Open
nullstyle opened this issue May 6, 2015 · 3 comments
Open

Enum member names do not properly preserve pluralization #7

nullstyle opened this issue May 6, 2015 · 3 comments
Labels

Comments

@nullstyle
Copy link
Contributor

stellar/js-stellar-base#3

@nullstyle nullstyle added the bug label May 6, 2015
@thejollyrogers
Copy link
Contributor

Additionally, the variable offerID in CreateOfferOp gets converted to offerId

@thejollyrogers
Copy link
Contributor

This brings up a question, why are we changing the .x file names at all in the compiled javascript?

@nullstyle
Copy link
Contributor Author

@thejollyrogers offerID getting normalized to offerId is by design and is expected. Rather than building an mainting a list of acronyms that shouldn't be inflected appropriately for the target language, I treat consecutive capital letters as a separate word. That means that blahID becomes blahId, accountURL becomes accountUrl, etc.

In addition, the transformation of identifier names is designed to map the xdr assigned name to a language-appropriate name. Ruby maps attributes to snake-cased, javascript is camelcased, etc.

I'm willing to accept a PR that turns off identifier normalization, but I don't really need or want it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants