I personally like capital "V" for both Views and View as "Views" always seems to be capitalised, I thought it was a "branding" kind of thing because I don't see any other module in core always being capitalised - we don't make a point of writing "Comments" or "Nodes" the same way that we write "Views" everywhere.

Others have said lowercase "v" because a view object isn't a proper noun.

I really don't mind, but patches in #1757550: [Meta] Convert core theme functions to Twig templates have been double-rejected because of the changes in capitalisation.

If we pick one we can update #1823416: [Obsolete] Twig coding standards and #1913208: [policy] Standardize template preprocess function documentation or at least point to this issue.

I actually think it would be awful if discussion/bike-shedding here derailed #1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch so I'm going to mark it as a followup for the conversion and postpone it.

https://i.chzbgr.com/maxW500/4849576192/hDB19FA87/

Comments

joelpittet’s picture

lowercase and pink for the column;)

thedavidmeister’s picture

Title: Decide on capitalisation of the "v" in "view" and "views" when talking about a view object in Twig templates and preprocessors » Decide on capitalisation of the "v" in "view(s)" when talking about views objects/module in Twig templates and preprocessors

Then why is the views module called "Views" everywhere?

shanethehat’s picture

I asked TimPlunkett about this a couple of days ago, and he said:

when referring to the module, it is "Views". when referring to the object, it is either "a view" or "\Drupal\views\ViewStorageInterface"

thedavidmeister’s picture

#3 - ok, why is that? why does the Views module get special capitalisation when no other module in core does? we don't go out of our way to say "Number", "User" or "Path" when talking about other core modules, for example.

Since the Views modules is neither a person or a place, it isn't a proper noun http://en.wikipedia.org/wiki/Proper_noun

The only other reason for capitalisation in the english language (so, outside programming conventions like camel casing, etc..) is branding. If it's branding then the "Views" module is either the plural of the "View" or a made up word for branding. In the case of the latter, it seems pretty confusing that "Views" is a made up word with arbitrary capitalisation for branding purposes but then we're asserting that a "view" is a common noun and isn't capitalised.

I'm mostly looking at the Chevrolet example:

Chevrolet is similarly a proper name referring to a specific company. But unlike Microsoft, it is also used in the role of a common noun to refer to products of the named company: "He drove a Chevrolet" (a particular vehicle); "The Chevrolets of the 1960s" (classes of vehicles). In these uses, Chevrolet does not function as a proper name.

So really, if "views" is capitalised when it's a module but not when it's a singular "view" I'd actually say "I have a Views object" not "I have a view object" or "I have a View object".

thedavidmeister’s picture

Issue tags: +Twig, +VDC
markhalliwell’s picture

I think we do it because it's just another "drupalism" we adopted (with out even realizing it). It started as contrib, and given it's popularity, it probably has something to do with trying to differentiate it from other concepts in same doc blocks. For example: "The View used to display the teaser view". I don't know if that's an actual string anywhere, but you get the idea.

I don't think we should "brand" it at all. It's part of core now and Drupal is the "brand". Lets just lower case it and append the context of what we're referring to: "view object", "views module" and "view mode".

thedavidmeister’s picture

#6 - I can get behind this. It makes sense to me that now Views is in core it becomes views like every other core module.

joelpittet’s picture

I'm for lowercasing and keeping it consistent with all other core modules. Would like to get some people from VDC to chime in though too.

markhalliwell’s picture

Status: Postponed » Closed (won't fix)

If we get anymore "rejections" because of this, just reset the status and point them to this issue.

[12:12 AM] timplunkett:	 markcarver: "Display a link to the create content page if Node module is enabled"
[12:13 AM] markcarver:	 hmm
[12:13 AM] markcarver:	 so perhaps when we're referring to the module "Views" it's capitalized
[12:13 AM] markcarver:	 a "view" is not though
[12:14 AM] timplunkett:	 markcarver: "Test filtering Node content by language"
[12:15 AM] timplunkett:	 markcarver: i can cherry pick strings forever :)
[12:15 AM] markcarver:	 timplunkett: lmao
[12:15 AM] markcarver:	 timplunkett: well, so basically there's no standard
[12:16 AM] timplunkett:	 nope
[12:16 AM] timplunkett:	 nor do i think its worth trying to pick on
[12:16 AM] timplunkett:	 e
[12:16 AM] markcarver:	 because I know I've seen lower case "node" too
[12:16 AM] timplunkett:	 we have a hard enough time with coding standards
[12:16 AM] markcarver:	 true
[12:17 AM] markcarver:	 "I really don't mind, but patches in #1757550: [meta] Convert core theme functions to Twig templates have been double-rejected because of the changes in capitalisation."
[12:17 AM] markcarver:	 I think that's why it came up
[12:17 AM] markcarver:	 I know we (twig peeps) don't real care either way
[12:17 AM] markcarver:	 but it seems they got some flack for it
[12:18 AM] markcarver:	 ok, I'll close the issue and reference this chat
star-szr’s picture

Title: Decide on capitalisation of the "v" in "view(s)" when talking about views objects/module in Twig templates and preprocessors » [Policy] Decide on capitalisation of the "v" in "view(s)" when talking about views objects/module in documentation

Quick re-title to reflect what this issue is/was about.

star-szr’s picture

Issue summary: View changes

image link