Change word choice in table information display

Created on 13 January 2021, almost 4 years ago
Updated 31 January 2024, 10 months ago

Problem/Motivation

The table information is currently set to be Start @START to @END of @TOTAL entries
So when populated it would read Start 1 to 25 of 471 entries for example

This would make more sense if it read Showing instead of Start

Steps to reproduce

In any datatables view with multiple pages check the Enable the table information display. box under Widgets & Elements

Proposed resolution

Change the word "Start" to "Showing"

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States mrdrewkeller

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France Chris64 France

    What about this issue? My opinion is I am agree with @mrdrewkeller and its ask, and I prefer Showing to Start. For me telling showing ... to ... is clear, and start ... to ... is less clear. Moreover in the datatables code,

    datatables.module:174:    'sInfo' => t('Start @START to @END of @TOTAL entries', [
    datatables.module:179:    'sInfoEmpty' => t('Showing 0 to 0 of 0 entries'),

    The two writings are use. So the ask is also to make a choice. The text is translatable. An other possibility, Displaying, but longer.

  • πŸ‡«πŸ‡·France Chris64 France

    Just in case, the corresponding patch for 2x-dev. Same change than #2 πŸ› Change word choice in table information display Needs work

  • Status changed to Needs review about 1 year ago
  • πŸ‡«πŸ‡·France Chris64 France
  • πŸ‡«πŸ‡·France Chris64 France

    More arguments about this choice #6. Found in the DataTables library,

    datatables/media/src/model/model.defaults.js:1467:         "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
    datatables/media/src/model/model.defaults.js:1486:         "sInfoEmpty": "Showing 0 to 0 of 0 entries",

    Same choice than the parent library choice seems a good choice.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    As written in #5 please use the same wording as Drupal Views does. @Chris64 could you please prepare a MR accordingly?

  • Merge request !14Change word choice 7.patch β†’ (Merged) created by Chris64
  • πŸ‡«πŸ‡·France Chris64 France

    MR ready.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks, I changed this to be 1:1 consistent with views. Views uses:
    Displaying @start - @end of @total

    I'm unsure if we should better use a different text for
    'sInfoEmpty' => t('Showing 0 to 0 of 0 entries'),
    which for now I also changed to
    Displaying 0 - 0 of 0
    to be consistent, but I don't really like it at all this way. But we don't have to focus on this here.

    @Chris64 could you please review my final changes?

  • Status changed to RTBC 12 months ago
  • πŸ‡«πŸ‡·France Chris64 France

    @Anybody, in core there is,

    modules/views/src/Plugin/views/area/Result.php:25:
          'default' => $this->t('Displaying @start - @end of @total'),

    Your choice,

        'sInfo' => t('Displaying @start - @end of @total', [
        'sInfoEmpty' => t('Displaying 0 - 0 of 0'),

    match with it, therefore OK for me. Perhaps make the change and see the feed back.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks, yes let @diqidoq decide what to do with the empty message. Anything else is fine now and we could just keep the empty message like this for now or change it. Should not eat too much time ;)

  • Status changed to Needs work 12 months ago
  • πŸ‡«πŸ‡·France Chris64 France

    @Anybody, in fact there is a problem, a phpcs one, and the change

          '@total' => '_TOTAL_'
    ->
          '@total' => '_TOTAL_',

    should be done. See πŸ“Œ Fix the issues reported by phpcs Needs work .

  • Status changed to Needs review 12 months ago
  • πŸ‡«πŸ‡·France Chris64 France

    Some mistakes from trying to edit directly in the Drupal Git. To ignore.
    Here the MR corresponding to the asked small change.

  • Status changed to RTBC 10 months ago
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Excellently investigated and finally completed! Agreed 100%. Thanks @ all.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin
  • Status changed to Fixed 10 months ago
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024