Sign up Sign in Samples Blog contact support
Inflections of Names

Idea

 

+issue

When a cardname is in a view, we can generally only view it as either the key or the name stored in the card table.  I want to be able to use standard inflection names like singularize, underscore, camelcase, and any other we might find useful.

 

+solution

Maybe just an view option, name:singular or inflection:singular, or if you like both inflect_name:plural.

 

 

+discussion

You may want more than one (comma separated?). Also could have one to get rid of the leading joint (this is all for display, not references). That might still be useful in the //absolute_name syntax later.

--Gerry Gleason.....2015-06-08 13:45:31 +0000

I like this idea. Have seen the need for it.

 

Re nomenclature: don't like "inflect" -- too geeky. Our typical vocabulary for this is name variant, so perhaps we could use either that or just "variant"? "Variant" encompasses more than inflection -- also capitalization, punctuation, and (for CamelCase, at least) spacing. I don't see too much danger of overloading here as long as we allow specifications of multiple kinds of variations in the value.

 

variant: lowercase plural

variant: camelcase singular

 

...might even support simple regexp...

 

Is that a situation where "you may want more than one"? You don't meant wanting more than one name, do you? I would think that would be multiple nests.

 

Could potentially support tenses for verbs for this, even.

--Ethan McCutchen.....2015-06-08 15:31:08 +0000

I meant like your examples, lowercase and plural and as with inflecting a string in ruby, order often matters. Name variant is probably better, and I would be happy with the feature whatever the name.

Generally, the idea is you are getting another name that would have the same key, so this logic is at least somewhat dependent on smartname key processing. In views, it can be considered similar to the link text where you are totally changing what is displayed.

--Gerry Gleason.....2015-06-08 21:50:33 +0000

+relevant user stories