While working on Issue #2560049, I realized that the defaults for views pagers is to be lowercase. Should these be capitalized by default? Seems like we do that most everywhere else.

So this:

<< first < previous ... next > last >>

Would become this, by default:

<< First < Previous ... Next > Last >>

This would likely mean altering all of the install/config YAML files as well as other base themes that define defaults in their respective pager.html.twig files.

Comments

chrisfree created an issue. See original summary.

snehi’s picture

Assigned: chrisfree » snehi
Status: Needs work » Needs review
StatusFileSize
new2.29 KB

Please review the attached patch.

phantomvish’s picture

Status: Needs review » Needs work
StatusFileSize
new1.12 KB

The patch doesn't work. It seems to be for only 'classy' theme and the pager text doesn't get capitalised after installing patch.
After patch

cilefen’s picture

Priority: Minor » Normal

Is this a regression from Drupal 7?

If they are lower-cased on purpose it could be because the expectation is the theme layer will do it.

cilefen’s picture

Title: Capitalize Pager Defaults » Paging links are lowercased by default
hass’s picture

Status: Needs work » Closed (duplicate)
chrisfree’s picture

Status: Closed (duplicate) » Needs work

It was my understanding that the values for pagers can be customized within views. This is why the template uses {{ items.previous.text|default('‹ Previous'|t) }} instead of simply hard coding the values for first, last, etc.

Since we're changing the defaults in the theme I thought we should also change the defaults installed with views setup with core. Maybe I'm missing something though!

hass’s picture

This patch changes the same lines!? I guess since views is using default pager there is nothing more to do here.

chrisfree’s picture

Assigned: snehi » Unassigned

This patch does use the same lines as the other issue, so no reason to commit this one. However, regardless of what is in the template as a default, the values stored in the view itself will takeover. The default is lowercase. I'm wondering if we should change these as well (stored in installation yml files) so that the default set in the theme matches what comes with stock views. I suppose you could argue for either in this case.

hass’s picture

Status: Needs work » Closed (duplicate)

Yes, that is a good point. Let's integrate these view settings in the other case patch, please.