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

Bucket needs initial-capital-only variable expansion #121

Open
dgw opened this issue Aug 2, 2018 · 0 comments
Open

Bucket needs initial-capital-only variable expansion #121

dgw opened this issue Aug 2, 2018 · 0 comments

Comments

@dgw
Copy link
Collaborator

dgw commented Aug 2, 2018

Properly capitalizing complete-sentence responses that begin with a variable is, um… kind of impossible. Not only does Bucket refuse to touch the capitalization of a value if it contains a capital letter anywhere, but if the value is all-lowercase the only altered capitalization options are ALL CAPS and Title Case. There's no Initial capital only option.

This might not actually be a variable-expansion thing, but a new pre-output filter, I'm not sure. Honestly I haven't spent a huge amount of time thinking about the implementation, but I do think there's a need.

The main barrier I have to building a plugin right now is that there's not really room in the existing syntax for this. $Variable already means Title Case, and changing that to mean Initial capital would mean needing to edit all existing factoids that currently use it for Title Case. (While Bucket could theoretically run a one-time migration against the database, I'd be worried about edge cases. And Bucket's database isn't currently versioned.) The alternatives for indicating Title Case are also all messy in certain situations—$TitleCase looks awful for single-word variables like the ever-popular $NoUn, for example, and TWocaps is just objectively ugly.

Alternatively, individual tidbits (not entire factoids) could be flagged as "Always capitalize this", but that probably needs a database schema change, which I would rather avoid doing. (Bucket's schema also already has enough unused columns.) And then there would need to be esoteric, probably op-only, commands for setting and removing the "capitalize this factoid" flag. Just building the UX for that would be icky, especially because it differs from e.g. protect x (which affects an entire set of factoids, not just one).

So instead of showing up with an example plugin, I have this placeholder issue. Either I'll come up with better ideas and add them here, or someone else will. (Or no one will, and this issue will remain open until GitHub eventually shuts down… 😆)

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

No branches or pull requests

1 participant