Hello everyone.

Kudos on the great work with this module.

I have it up and running on a page I'm working on, but I have a weird problem, the pager shows the letter 'P' instead of the letter 'A'.

The pager itself works, letter 'P' is correctly referring to the view link with the letter 'A', it's just the letter on the pager.

I think it happens because the language on the site is set to spanish. When I see the page with the admin user, which uses english, the pager correctly displays letter 'A'.

You can check it out at:

http://beta.todo-hd.com/peliculas-6-alfabetico

I hope you can tell where to look or suggest a solution. Thanks in advance for your time reading this.

CommentFileSizeAuthor
#5 wrong-letter-in-pager.2845135.5.patch655 byteselusivemind

Comments

bielo created an issue. See original summary.

JeroenD’s picture

I have exactly the same issue, except the letter E is shown as O. My website default language is set to Dutch. If I switch the default language back to English the alphabet is displayed correctly.

JeroenD’s picture

Apparently the letter E was translated to O in the interface. No idea who or how that happend.
May I ask why the labels are wrapped in a t() function as I can't think of a use case where you want to translate a letter into something else.

@bielo: Check your interface translations, for whatever reason the English letter A most likely will be translated to P for Spanish.

rudi teschner’s picture

I have the same problem, that the letters 'E' and 'Q' are translated to different values.
While it might be the case that it gets faulty translated, I think it would be better if the pagination letters would not be translated at all.

To fix this issue for me, i removed the t() in views/alpha_pagination_handler_pagination.inc.

      $numeric = is_numeric($key);
      $active = (string) $key === (string) $this->view->args[0];
      $is_link = !$active && ($all || $is_link);
-     $label = $all ? $all_label : t(drupal_ucfirst($key));
+     $label = $all ? $all_label : drupal_ucfirst($key);
elusivemind’s picture

StatusFileSize
new655 bytes

Attached is a patch to test this issue

elusivemind’s picture

Status: Active » Needs review

  • ElusiveMind committed a989993 on 7.x-1.x
    Issue #2845135 by ElusiveMind, Rudi Teschner: Wrong letter in pager
    
elusivemind’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.